加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-15 18:37:05 所属栏目:百科 来源:网络整理
导读:更新存贮在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 区域』 N

更新存贮在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

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的恢复。

简洁的来看是:

mmc init?『初始化sd 卡』
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 指定置』

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读