为什么内核编译老出错呢?

先说明一下,我是Linux菜鸟一个,现在由于工作需要自学Linux。我在网上下载了一个内核(Linux-2.6.36),原版编译通过!然后按照书本所述,修改了一行代码,原为ARCH       ?=$(SUBARCH)   改为ARCH        :=arm   。再编译的时候就出现了错误!现将代码列出来,请高手指点迷津......
[root@localhost ~]# cd /usr/src/kernels/linux-2.6.36.tar.bz2_FILES/linux-2.6.36
[root@localhost linux-2.6.36]# menuconfig
bash: menuconfig: command not found
[root@localhost linux-2.6.36]# make menuconfig
scripts/kconfig/mconf arch/arm/Kconfig
#
# configuration written to .config
#


*** End of Linux kernel configuration.
*** Execute 'make' to build the kernel or try 'make help'.

[root@localhost linux-2.6.36]# make zImage
scripts/kconfig/conf --silentoldconfig arch/arm/Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
  CC      kernel/bounds.s
cc1: 错误:无效选项 ‘little-endian’
cc1: 错误:无效选项 ‘apcs’
cc1: 错误:无效选项 ‘no-sched-prolog’
cc1: 错误:无效选项 ‘abi=apcs-gnu’
kernel/bounds.c:1: 错误:-march= 所带参数(armv4t)不正确
kernel/bounds.c:1: 错误:-mtune= 所带参数(arm9tdmi)不正确
make[1]: *** [kernel/bounds.s] 错误 1
make: *** [prepare0] 错误 2
[root@localhost linux-2.6.36]#

作者: happyccy   发布时间: 2010-11-04

编译器设置不正确

作者: shenhao0129   发布时间: 2010-11-04

修改ARCH为
ARCH            := arm
后修改下一行
CROSS_COMPILE   :=
了吗?
这个是配置编译器的.

作者: 2400小兵   发布时间: 2010-11-04