更新存贮在nandflash 里的uImage
AM3517_EVM # mmc init 『初始化sd 卡』
mmc1 is available
AM3517_EVM # mw.b 0x80000000 0xff 500000 『初始化使用的内存,全部置1』
AM3517_EVM # nand erase 280000 500000 『擦除nandflash 中存放uImage 区域』
NAND erase: device 0 offset 0x280000, size 0x500000
Erasing at 0x760000 -- 100% complete.
AM3517_EVM # fatload mmc1 0 0x80000000 uImage 『从sd 卡读uImage 到内存』
reading uImage
2284888 bytes readWriting to Nand... done
AM3517_EVM # nandecc sw 『设定ecc 校验为软件校验』
SW ECC selected
AM3517_EVM # nand write.i 0x80000000 280000 500000 『存uImage 到nandflash 指定置』
NAND write: device 0 offset 0x280000, size 0x500000
5242880 bytes written: OK
AM3517_EVM #
1初始化SD卡
2初始化内存0x80000000---0x80500000区域,全部写1
3擦除nandflash中的0x280000----0x780000区域,这段区域用于以后存放uImage
4将SD卡中的uImage文件读到内存中的0x80000000---??区域
5设置nand flash的ECC校验为软件校验
6将在内存中的uImage文件(0x80000000---0x80500000区域)写入到nandflash中的0x280000----0x780000区域
到此为止完成了U-boot的恢复。
简洁的来看是:
AM3517_EVM # mmc init 『初始化sd 卡』
AM3517_EVM # mw.b 0x80000000 0xff 500000 『初始化使用的内存,全部置1』
AM3517_EVM # nand erase 280000 500000 『擦除nandflash 中存放uImage 区域』
AM3517_EVM # fatload mmc1 0 0x80000000 uImage 『从sd 卡读uImage 到内存』
AM3517_EVM # nandecc sw 『设定ecc 校验为软件校验』
AM3517_EVM # nand write.i 0x80000000 280000 500000 『存uImage 到nandflash 指定置』