1. build linux kernel的错误
cc1: error: unrecognized command line option
"-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=aapcs-linux"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
arch/arm/kernel/asm-offsets.c:1: error: bad value (armv5t) for -march= switch
arch/arm/kernel/asm-offsets.c:1: error: bad value (strongarm) for -mtune= switch
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mabi=aapcs-linux"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
arch/arm/kernel/asm-offsets.c:1: error: bad value (armv5t) for -march= switch
arch/arm/kernel/asm-offsets.c:1: error: bad value (strongarm) for -mtune= switch
原因是CROSS_COMPILER路径没有设置正确
使用命令:
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
或修改makefile:
#ARCH ?= $(SUBARCH)
ARCH = arm
#CROSS_COMPILE ?=
CROSS_COMPILE = arm-linux-uclibc-
本文主要探讨了在编译kernel过程中遇到的错误,并深入解析了错误产生的原因,特别是针对ARM架构下的交叉编译问题。通过设置ARCH为arm以及CROSS_COMPILE为arm-linux-uclibc-来配置编译环境。
1194

被折叠的 条评论
为什么被折叠?



