1. use of old and new-style options to set FPU type
错误描述:
#make zImage
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-arm
SPLIT include/linux/autoconf.h -> include/config/*
HOSTCC scripts/conmakehash
HOSTCC scripts/kallsyms
CC scripts/empty.o
Assembler messages:
Error: use of old and new-style options to set FPU type
make[1]: *** [scripts/empty.o] Error 1
make: *** [scripts] Error 2
如在编译核心过程中出现类似以上错误use of old and new-style options to set FPU type时,请试着修改编译platform下的Makefile.
例如:编译目标为arm(内核根目录下的Makefile中ARCH值) ,则修改arch/arm/Makefile
查找
CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
换成:
CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -malignment-traps -msoft-float
AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
简而言之就是把-Wa,-mno-fpu和-Uarm去掉就是了。
2.arch/arm/kernel/asm-offsets.c:97: error: invalid application of `sizeof' to incomplete type `machine_desc'
解决:将include下的链接文件asm改为链接到asm-arm(默认是链接到asm-i386).