移植Linux2.6.8内核+GNU3.4.1过程出现的错误

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).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值