AM3517之SD卡启动盘恢复NAND flash的数据:uImage(四)

更新存贮在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 指定置』

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值