移植u-boot-2011.11的一些問題解決

目標板:FL2440
硬件資源:64M SDRAM/256M nandflash(k9f2g08u0a)/4M nor flash(JS28F320)

開發環境:ubuntu 10.04

源碼:u-boot-2009.11

交叉編譯器arm-linux-gcc-3.3.2

一、建立開發板項目、測試並編譯環境

以下是出現的錯誤

1、arm-linux-ld: ERROR: /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_udivsi3.oS) uses hardware FP, whereas u-boot uses software FP
沒有更多的歸檔文件: failed to merge target specific data of file /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_udivsi3.oS)
arm-linux-ld: ERROR: /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP
沒有更多的歸檔文件: failed to merge target specific data of file /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_divsi3.oS)
arm-linux-ld: ERROR: /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_umodsi3.oS) uses hardware FP, whereas u-boot uses software FP
沒有更多的歸檔文件: failed to merge target specific data of file /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_umodsi3.oS)
arm-linux-ld: ERROR: /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_dvmd_lnx.oS) uses hardware FP, whereas u-boot uses software FP
沒有更多的歸檔文件: failed to merge target specific data of file /usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libgcc.a(_dvmd_lnx.oS)
make: *** [u-boot] 錯誤 1

出現這樣的錯誤時發現忘了修改cpu/arm920t/config.mk原文是下面這樣的

PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float


PLATFORM_CPPFLAGS += -march=armv4
# =========================================================================
#
# Supply options according to compiler version
#
# =========================================================================
PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

修改爲:

PLATFORM_RELFLAGS += -fno-common -ffixed-r8 


PLATFORM_CPPFLAGS += -march=armv4
# =========================================================================
#
# Supply options according to compiler version
#
# =========================================================================
PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

接下來

make xxx_config

make

可是還是出現同樣的錯誤,google了一下找到一篇http://heyunhuan513.blog.163.com/blog/static/16020422009210112035734/

解決不了問題啊!大哭

決定換編譯器試試,把編譯器換成了4.3.2的

make xxx_config

make

上面的問題解決了,又出現新的問題。

2、arm-linux-ld: ERROR: Source object lib_generic/libgeneric.a(crc16.o) has EABI version 0, but target u-boot has EABI version 5
arm-linux-ld: failed to merge target specific data of file lib_generic/libgeneric.a(crc16.o)
arm-linux-ld: ERROR: Source object lib_generic/libgeneric.a(ctype.o) has EABI version 0, but target u-boot has EABI version 5
arm-linux-ld: failed to merge target specific data of file lib_generic/libgeneric.a(ctype.o)
arm-linux-ld: ERROR: Source object lib_generic/libgeneric.a(string.o) has EABI version 0, but target u-boot has EABI version 5
arm-linux-ld: failed to merge target specific data of file lib_generic/libgeneric.a(string.o)
make: *** [u-boot] 錯誤 1

看了很多帖子可大多是跟我的相反的

arm-linux-ld: ERROR: Source object lib_generic/libgeneric.a(ctype.o) has EABI version 5, but target u-boot has EABI version 0

沒找到什麼好的解決方法,在無意中敲入下面的命令

make distclean

make xxx_config

make

哈哈!完全通過了!大笑

後來有把編譯器換到3.3.2

make distclean

make xxx_config

make

嘿嘿!也通過了!

看來make distclean很重要哦!

折騰了半天原來都是少敲入一個make distclean啊!

繼續下面的工作吧



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章