首先我安装了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
答案 0 :(得分:0)
您应该在行中添加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-
请确保在结尾处加上-。
亲切的问候!