本文共 2591 字,大约阅读时间需要 8 分钟。
记一次由于rootfs过大引起的内核编译错误
前些日子一直在用NFS作为rootfs启动。今日想用initramfs作为rootfs制作独立运行的系统。 可是内核编译到链接阶段一直报这个错误 LD .tmp_vmlinux1 arch/arm/kernel/head.o: In function `__enable_mmu_end': /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:32: relocation truncated to fit: R_ARM_CALL against symbol `printascii' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:34: relocation truncated to fit: R_ARM_CALL against symbol `printhex8' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:36: relocation truncated to fit: R_ARM_CALL against symbol `printascii' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:43: relocation truncated to fit: R_ARM_CALL against symbol `printhex8' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:45: relocation truncated to fit: R_ARM_CALL against symbol `printch' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:48: relocation truncated to fit: R_ARM_CALL against symbol `printascii' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:50: relocation truncated to fit: R_ARM_CALL against symbol `printch' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:55: relocation truncated to fit: R_ARM_CALL against symbol `printascii' defined in .text section in arch/arm/kernel/built-in.o arch/arm/kernel/head.o: In function `__error_p': /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:254: relocation truncated to fit: R_ARM_CALL against symbol `printascii' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:256: relocation truncated to fit: R_ARM_CALL against symbol `printhex8' defined in .text section in arch/arm/kernel/built-in.o /home/skykingf/devlop/linux-2.6.38.2/arch/arm/kernel/head-common.S:258: additional relocation overflows omitted from the output make: *** [.tmp_vmlinux1] Error 1 实在看不出内核哪里出了问题,那个头大啊。 google了国内外中英文的site,有说是编译器版本低了,有说是编译器的bug,有说是内核配的不正确,反反复复编译多次,都找不到正确的原因。 用了之前已经编译好的2.6.33.3内核也报这个错误,看来是rootfs的问题了。 忽然想到是不是rootfs的尺寸问题,前几日在移植mtd-utils时,cp了很多库文件到/lib目录下。 于是在/lib下rm -fr *, 之后再把以前备份的最小lib库放进来,重新编译kernel,通过。 不知道偶是不是第一个把2.6.38.2移植到s3c2440平台上的 ^_^转载地址:http://wepsi.baihongyu.com/