-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Hi,
I encountered an issue when attempting to rebuild the kernel in the CVA6 SDK after adding a significant amount of data (around 10GB) to the root filesystem (rootfs). During the build process, I receive multiple warnings, followed by a fatal error related to memory layout conflicts. Here is the relevant part of the build log:
/media/.../riscv64-buildroot-linux-gnu-ld: warning: dot moved backwards before .init.pi' /media/.../riscv64-buildroot-linux-gnu-ld: section .init.data VMA wraps around address space /media/.../riscv64-buildroot-linux-gnu-ld: section .init.pi LMA [0000000051af7600,0000000051af9a72] overlaps section .init.data LMA [0000000000800000,00000000d1af75ff] ... arch/riscv/mm/init.o: in function
.L251':
init.c:(.init.text+0xbfc): relocation truncated to fit: R_RISCV_CALL_PLT against symbol __pi_set_satp_mode_from_cmdline' defined in .init.pi.text section in arch/riscv/kernel/pi/cmdline_early.pi.o arch/riscv/kernel/pi/cmdline_early.pi.o: in function
_pi.L0 ':
__pi_cmdline_early.c:(.init.pi.text+0x8e): relocation truncated to fit: R_RISCV_CALL_PLT against symbol __pi_strlen' defined in .text section in arch/riscv/lib/strlen.o arch/riscv/kernel/pi/string.pi.o: in function
__pi_strlcpy':
__pi_string.c:(.init.pi.text+0x14a): relocation truncated to fit: R_RISCV_CALL_PLT against symbol __pi_strlen' defined in .text section in arch/riscv/lib/strlen.o arch/riscv/kernel/pi/lib-fdt.pi.o: in function
__pi_fdt_first_subnode':
__pi_fdt.c:(.init.pi.text+0x5b2): relocation truncated to fit: R_RISCV_CALL_PLT against symbol __pi_strlen' defined in .text section in arch/riscv/lib/strlen.o arch/riscv/kernel/pi/lib-fdt_ro.pi.o: in function
__pi_fdt_get_name':
__pi_fdt_ro.c:(.init.pi.text+0x404): relocation truncated to fit: R_RISCV_CALL_PLT against symbol `__pi_strlen' defined in .text section in arch/riscv/lib/strlen.o
make[4]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
make[3]: *** [Makefile:1250: vmlinux] Error 2
make[2]: *** [package/pkg-generic.mk:293: /media/.../cva6-sdk/buildroot/output/build/linux-v6.5/.stamp_built] Error 2
make[1]: *** [Makefile:82: _all] Error 2
make[1]: Leaving directory '/media/.../cva6-sdk/buildroot'
make: *** [Makefile:113: /media.../cva6-sdk/install64/vmlinux] Error 2
This error appears to be related to the increased size of the rootfs and its interaction with the .init sections, particularly .init.text, .init.data, and .init.pi in the memory layout.
Steps to Reproduce:
1.Add approximately 10GB of files to the rootfs.
2. Rebuild the linux : make images
Do I need to adjust the memory layout for the .init.text, .init.data, or any other sections to prevent overlapping, and if so, what parameters should be changed?
Is there a maximum rootfs size that the current setup supports, and what would be the best approach to handle such a large rootfs?
Thanks for your help.