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

 

按照正常的步骤, 一次性通过编译.

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