内核编译初期有关问题,大家指教

内核编译初期有关问题,大家指教

内核编译初期问题,大家指教
 

UPD include/linux/compile.h
  CC init/version.o
  CC init/do_mounts.o
  CC init/do_mounts_rd.o
  CC init/do_mounts_initrd.o
  CC init/do_mounts_md.o
  LD init/mounts.o
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
ld: init/do_mounts.o: Relocations in generic ELF (EM: 40)
init/do_mounts.o: could not read symbols: File in wrong format
make[1]: *** [init/mounts.o] Error 1
make: *** [init] Error 2

以上是错误提示。
之前已经设置了
export CC=arm-linux-gcc
export AR=arm-linux-ar
export AS=arm-linux-as
export LD=arm-linux-ld
export NM=arm-linux-nm
export RANLIB=arm-linux-ranlib
export STRIP=arm-linux-strip
export SIZE=arm-linux-size
这些环境变量,并取消了kernel menuconfig上的elf

目标板为2440,编译器应该是没问题,请问高人问题在哪里?


你只需要修改 kernel 根目录下的 Makefile

ARCH ?= arm
CROSS_COMPILE=arm-linux-

就可以了,不要
export CC=arm-linux-gcc 

因为编译内核时,有些东西是要用 gcc 去编译的,你把 CC 改成 arm gcc ,自然会出错。


貌似是交叉编译器版本的问题


你这是一开始编译就出现这样的错误还是编译了一会才出现的啊?
我觉得也是gcc的版本问题,换个低点的版本试试。

内核编译初期有关问题,大家指教

相关文章:

你感兴趣的文章:

标签云: