|
|
|
Re: Building image with large initrd fails | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Daniel Mack wrote: > Building a kernel with a somewhat larger (250M) initrd fails with lots > of messages like these: > > LD .tmp_vmlinux1 > init/built-in.o: In function `prepare_namespace': > /home/daniel/src/p0/linux-2.6/init/do_mounts.c:418: relocation > truncated to fit: R_ARM_JUMP24 against symbol `sys_chroot' defined in > .text section in fs/built-in.o > init/built-in.o: In function `do_linuxrc': > /home/daniel/src/p0/linux-2.6/init/do_mounts_initrd.c:38: relocation > truncated to fit: R_ARM_JUMP24 against symbol `kernel_execve' defined > in .text section in arch/arm/kernel/built-in.o > init/built-in.o: In function `calibrate_delay': > /home/daniel/src/p0/linux-2.6/init/calibrate.c:173: relocation > truncated to fit: R_ARM_JUMP24 against symbol `printk' defined in > .text.unlikely section in kernel/built-in.o > arch/arm/kernel/built-in.o: In function `build_tag_list': > /home/daniel/src/p0/linux-2.6/arch/arm/kernel/compat.c:100: relocation > truncated to fit: R_ARM_JUMP24 against symbol `printk' defined in > .text.unlikely section in kernel/built-in.o > /home/daniel/src/p0/linux-2.6/arch/arm/kernel/compat.c:211: relocation > truncated to fit: R_ARM_JUMP24 against symbol `memmove' defined in > .text section in arch/arm/lib/lib.a(memmove.o) > > Searching the archives didn't show anything relevant, so I considered > asking for some pointers here. Is there any hard limit one should be > aware of? > > Thanks, > Daniel > > > ------------------------------------------------------------------- > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php > > ARM branches use 24bit for PC-relative jumps. So the maximal distance a branch can be defined for is about 16MB. The Initrd/Initramfs built into the kernel resides at the end of the .init section which will be freed after initialization (including moving the initramfs into a real ramfs) is done. The init section is followed by the .text section where runtime functions reside. Because functions in the init section use utility functions from the kernel, and so "jump over" the initrd part on a regular basis. Assuming (worst case) some utility function, reside at the end of the .text section, lowers the maximal size of the initrd to about 13MB (depending on the size of the kernel and the init section). The linker is able to make this math by its own and informs you about the fact, that it can't make any relocations (that is inserting branches) from the init section into the text section, because of the size of the init section. Greetings, Andreas ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM (vger)] [Linux ARM MSM] [Linux Omap] [Linux Arm] [Fedora ARM] [eCos] [Linux Fastboot] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
![]() |