Chinaunix首页 | 论坛 | 博客
  • 博客访问: 548173
  • 博文数量: 105
  • 博客积分: 3274
  • 博客等级: 中校
  • 技术积分: 1161
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-21 12:14
文章分类

全部博文(105)

文章存档

2011年(1)

2010年(104)

分类: LINUX

2010-03-28 20:31:39

接下来我们看看怎样对nand flash系统映像进行更新
以下是基于MMC卡。首先将x-load.bin.ift,uboot.bin,uImage,ubi.img映像文件拷贝到SD卡中,将SD卡插入开发板.
烧写x-load.bin.ift
通过SD卡启动后进入u-boot
OMAP3 DevKit8000 # mmcinit
这句是用来启动mmc

OMAP3 DevKit8000 # fatload mmc 0:1 80000000 x-load.bin.ift
reading x-load.bin.ift
17316 bytes read
先查看下fatload的用法,如下
usage: fatload [bytes]
所以fatload mmc 0:1 80000000 x-load.bin.ift就表示把SD卡里面的x-load.bin.ift读到SDRAM的地址0x80000000里面去。
OMAP3 DevKit8000 # nand unlock
device 0 whole chip
nand_unlock: start: 00000000, length: 134217728!
NAND flash successfully unlocked
nand unlock表示给nand 解锁。地址从0开始,总共134217728个字节,也就是128M
OMAP3 DevKit8000 # nand ecc sw
这句非常重要,如果没有运行此句,就进行后面的擦除或者写操作,将再也不能从nand运行。只能全部擦除了。
Note: The command nandecc hw is essential here! X-Loader is started by OMAP3 boot ROM. This uses HW ECC while reading the NAND, so while writing, we have to use OMAP3 HW ECC, too. If you don't use HW ECC boot ROM can't boot from NAND any more.
以下的就比较好理解了。
OMAP3 DevKit8000 # nand erase 0 80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 DevKit8000 # nand write.i 80000000 0 80000

NAND write: device 0 offset 0x0, size 0x80000
Writing data at 0x7f800 -- 100% complete.
 524288 bytes written: OK
OMAP3 DevKit8000 #
同理,可以利用SD卡把u-boot,uImage,ubi.img等都写入到nand flash
阅读(2187) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~