首先我安装了cross-tool,然后我构建了工具链,然后我想构建内核但是在为内核编译内核2.6.34时,反复得到错误

root@kali:~/felabs/sysdev/tinysystem/linux-2.6.34# make ARCH=arm CROSS-COMPILE=arm-linux-

scripts/kconfig/conf -s arch/arm/Kconfig

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

gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’

gcc: note: valid arguments to ‘-mabi=’ are: ms sysv

gcc: error: unrecognized command line option ‘-mlittle-endian’

gcc: error: unrecognized command line option ‘-mapcs’

gcc: error: unrecognized command line option ‘-mno-sched-prolog’

gcc: error: unrecognized command line option ‘-mno-thumb-interwork’

/root/felabs/sysdev/tinysystem/linux-2.6.34/./Kbuild:35: recipe for target 'kernel/bounds.s' failed

make[1]: *** [kernel/bounds.s] Error 1

Makefile:986: recipe for target 'prepare0' failed

make: *** [prepare0] Error 2

答案

你应该将TOOLCHAIN_PREFIX添加到你的行,以显示准确使用的编译器:

〜/ felabs / sysdev / tinysystem / linux-2.6.34 #make ARCH = arm CROSS-COMPILE = arm-linux-TOOLCHAIN_PREFIX = / gcc-linaro-SOMETHIN-x86_64_arm-linux-gnueabihf / bin / arm-linux-gnueabihf-

只要确保 - 最后。

亲切的问候!

Logo

更多推荐