u-boot編譯

已經是前幾天的事情了.記下來.

希望用u-boot的原因是mx1使用的bootloader是針對windows開發平臺的.利用USB"彈出"這個特性作爲燒寫信號,

每次下載根文件系統都要換到XP(文檔上是windows 2000 only). 在ubuntu上使用umount是無法觸發燒寫的,使用eject可以觸發,可以"正常" 燒寫, 但是無法正常運行.這個問題需要時間去研究一下.呵呵.

還有, 想嘗試一下大名鼎鼎的u-boot

重要的是,發現u-boot上已經有針對mx1的移植了!

編譯u-boot的關鍵是交叉編譯器要"合適"

開始的時候下載的u-boot(2009)是最新的,而我的工具

gcc-3.2.3

binutils-2.13.90

glibc-2.25

用上面的工具編譯時,出現下面問題

start.S: Assembler messages:
start.S:187: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:188: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:210: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:211: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:375: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:376: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:381: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:382: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:387: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:388: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:393: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:394: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:399: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:400: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:424: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:425: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:430: Error: internal_relocation (type: OFFSET_IMM) not fixed up
start.S:431: Error: internal_relocation (type: OFFSET_IMM) not fixed up
make[1]: *** [start.o] Error 1
make[1]: Leaving directory `/home/ochapman/u-boot/cpu/arm920t'
make: *** [cpu/arm920t/start.o] Error 2

在start.S上187,188行是

    ldr    r2, _armboot_start
    ldr    r3, _bss_start

對比其他CPU的start.S對應的地方,發現跟arm920t的一樣, 不可能是u-boot上錯了.

可能是u-boot使用了gcc的新特性,於是:

gcc-3.3.2

glibc-2.3.2

binutils就不清楚了,這是在imxl_imx1ads_v2-BSP-b12.iso(freescale上可以下載)裏面的工具.

修改環境變量.

爲了保險,呵呵,下載了u-boot-1.3.4

 

按照正常的步驟, 一次性通過編譯.

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