PXA255平台U-Boot编译问题的解决

Author :Jeffrey  
My Email: [email protected] QQ:64801518
My Blog: http://blog.csdn.net/gueter/  

最近手头接了块板子,是intel sitsang-400,pxa255的,xscale架构,手头什么资料都没,在网上下了些东西,主要网站有:

sitsang 主页:

http://www-static.cc.gatech.edu/systems/architecture/sitsang

华中大ftp:

http://so.hustonline.net/sitelist.aspx?id=7C33A9A7CCEB12B0&dir=A523FCDED1F31EC56BCE9683752EF4C5

pxa255也叫pxa250++,所以我下的资料都是pxa250的,uboot编译过程中遇到问题及解决办法如下:

错误一:
#make sitsang_config
#make
arm-linux-gcc -g  -Os   -fno-strict-aliasing  -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0xa3f00000 -I/opt/project/bootldr/opt/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/include -pipe  -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -mtune=strongarm1100 -Wall -Wstrict-prototypes -c -o stubs.o stubs.c
cc1: error: invalid option `short-load-bytes'
make[1]: *** [stubs.o] Error 1
make[1]: Leaving directory `/opt/project/bootldr/opt/u-boot/examples'
make: *** [examples] Error 2
解决方法:
在uboot目录下cpu下找到相应的cpu,修改其config.mk文件中的mshort-load-bytes为-malignment-traps

错误二:
ld: cannot open cpu/pxa/start.o: 没有那个文件或目录
解决办法:修改uboot的makefile 文件,
把SUBDIRS = tools /
          examples/
          post /
          post/cpu
改成:
SUBDIRS = tools /
          post /
          post/cpu

  
错误三:
出现好几个:make[1]: Nothing to be done for `all'提示
解决办法:
在make之前先运行一个ldconfig即可.

错误四:
arm-linux-ld: ERROR: /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_divsi3.oS) uses VFP instructions, whereas u-boot does not
File in wrong format: failed to merge target specific data of file /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_divsi3.oS)
arm-linux-ld: ERROR: /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_umodsi3.oS) uses VFP instructions, whereas u-boot does not
File in wrong format: failed to merge target specific data of file /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_umodsi3.oS)
arm-linux-ld: ERROR: /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_modsi3.oS) uses VFP instructions, whereas u-boot does not
File in wrong format: failed to merge target specific data of file /opt/project/arm-linux/arm-linux/bin/../lib/gcc/arm-linux/3.4.3/libgcc.a(_modsi3.oS)
make: *** [u-boot] Error 1

分析:关键:libgcc.a(_divsi3.oS) 使用 VFP(Vector Float Point)矢量浮点格式指令,而u-boot没有使用,这是经典的浮点问题,Inter Xscale微构架兼容aRMv5TE ISa指令集,
不过不支持浮点指令集。这是为了节省处理器芯片体积和降低运行功耗,XScale体系结构没有实现昂贵的浮点运算部件和除法部件。这些是嵌入式应用中不常用的运算。当需要这类运算时,要通过软件方法实现。而交叉编译器却使用了浮点运算。

修改arm-linux-gcc配置文件,或者在uboot的cpu目录下找相应架构的配置文件,去除软浮点运算

你可能感兴趣的:(ARM,&,Linux)