编译linux内核出现的错误

czypf   2011-5-7 00:15 楼主

小弟初学arm,按照书上的一些介绍做好了linux内核配置,在make zImage时,出现下面问题:不知道是什么原因,请高手帮忙解答一下。。。

warning: (NETFILTER_XT_MATCH_REALM) selects NET_CLS_ROUTE which has unmet direct dependencies (NET && NET_SCHED)
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC      kernel/bounds.s
cc1: error: invalid option `abi=aapcs-linux'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

回复评论 (2)

出错信息:CC      kernel/bounds.s
cc1: error: invalid option `abi=aapcs-linux'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
原因:旧编译器可能是用OABI的,而配置内核时又选择了使用EABI的,修改内核配置:
    Kernel Features ---->Use the ARM EABIto compile the kernel
不选该项。
点赞  2011-5-7 08:18

把那个选项去掉后,能够往下编译了,编译到后面出现了这个错误;

kernel/built-in.o(.text+0x1c740): In function `alloc_pid':
include/asm-generic/cmpxchg-local.h:43: undefined reference to `wrong_size_cmpxchg'
net/built-in.o(.text+0x19ba4): In function `neigh_resolve_output':
include/asm-generic/cmpxchg-local.h:43: undefined reference to `wrong_size_cmpxchg'
net/built-in.o(.text+0x19d18):include/asm-generic/cmpxchg-local.h:43: undefined reference to `wrong_size_cmpxchg'
net/built-in.o(.text+0x19e28):include/asm-generic/cmpxchg-local.h:43: undefined reference to `wrong_size_cmpxchg'
net/built-in.o(.text+0x2ba5c): In function `rt_bind_peer':
include/asm-generic/cmpxchg-local.h:43: undefined reference to `wrong_size_cmpxchg'
net/built-in.o(.text+0x2f2e0):include/asm-generic/cmpxchg-local.h:43: more undefined references to `wrong_size_cmpxchg' follow
make: *** [vmlinux] Error 1

点赞  2011-5-7 13:16
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复