文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>u-boot-1.1.4编译过程中问题的解决

u-boot-1.1.4编译过程中问题的解决

时间:2006-07-16  来源:a-ki

刚才从sourceforge下载了u-boot-1.1.4。在编译的时候出现下面的错误:
make[1]: Entering directory `/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/drivers'
arm-linux-gcc -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DTEXT_BASE=0x21f00000 -I/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/host/armv4l/lib/gcc-lib/armv4l-unknown-linux/2.95.2/include -pipe  -DCONFIG_ARM -D__ARM__ -march=armv4 -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o cfi_flash.o cfi_flash.c
cc1: Invalid option `abi=apcs-gnu'
用google搜了一下,在郭步高的blog上发现在了一个解决方法http://www.blogcn.com/u/18/59/guobg/blog/33007243.html

然后又出现In file included from cfi_flash.c:48:
/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/include/asm/processor.h:52: parse error before `1'
/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/include/asm/processor.h:52: warning: no semicolon at end of struct or union
/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/include/asm/processor.h:54: parse error before `}'
/home/zzc/at91rm9200/u-boot/u-boot-1.1.4/include/asm/processor.h:58: field `insn' has incomplete type
的错误,
1.In include/asm-arm/processor.h,line 52,rename "arm;" to "Arm"
union debug_insn {
   u32   Arm;
   u16   thumb;
};

Reason:
Error:
//////////////////////////////////////////////////////////////////////////////////////
In file included from cfi_flash.c:48:
/u/code/denx/u-boot/include/asm/processor.h:52: parse error before `1'
/u/code/denx/u-boot/include/asm/processor.h:52: warning: no semicolon
at end of struct or union
/u/code/denx/u-boot/include/asm/processor.h:54: parse error before `}'
/u/code/denx/u-boot/include/asm/processor.h:58: field `insn' has incomplete type
////////////////////////////////////////////////////////////////////////////////////////
I think,  at least for that version of the toolchain,  it implicitly
defines "arm",  and I suspect it defines it to be "1",  thus the errors
you are seeing.  You may be able to add a -Uarm to eth build line.
It did solve the problem. Thank you!

> Would you please explain a little bit more why the toolchain
> implicitly defines "arm"? Should or should not for a toolchain to
> define this? Or we can simply re-name "arm" in struct debug_insn to
> another name?

Most compilers predefine a number of things to help coders port/identify
what the code is being built for.  For example,  on a coldfire target
__mcf5200 may be defined.  Have a look at:

   http://www.ucdot.org/article.pl?sid=02/10/02/035241

I don't think the newer gcc's define "arm" and I cannot recall why the
current 2.95.3 compiler does,  but if you can easily change the name of
that field in the structure it would be the safest option IMO,

Cheers,
Davidm
参照上面修改后,编译终于算是通过了。不行了眼睛有点痛了,该睡觉了,再说新做的9200的板还没法用,少了一个1.8V的LDO,等周一再说吧。

打算把这次的整个开发过程给记录下来,一个省得过几天自己也给忘了,同时也希望能给大家做个参考。

相关阅读 更多 +
排行榜 更多 +
逃脱游戏监狱少年

逃脱游戏监狱少年

休闲益智 下载
火力覆盖冲锋队安卓版

火力覆盖冲锋队安卓版

飞行射击 下载
火柴人之疯狂射击最新版

火柴人之疯狂射击最新版

飞行射击 下载