用tftp在u_boot下烧写uImage到Nand Flash

用tftp在u_boot下烧写uImage到Nand Flash(参考申嵌入的)

将uImage拷贝至/tftpboot/

 

在SecureCRT中依次输入:

SMDK2440A>tftp 0x30008000 uImage    //把uImage 写到内存的0x3000 8000开始的单元里 掉电后就没有的啦

SMDK2440A>nand erase 60000 500000   //擦除 nandflash中以0x6000单元开始的大小为0x50 0000(即5M存储空间 其实内核才2M多点)

SMDK2440A>nand write 0x30008000 0x60000 0x50 0000 

//把内存中0x3000 8000单元开始的大小为0x50 0000内容写到 nandflash中以0x 6 0000单元开始的存储空间中 (掉电后,还是有的)

 

实验执行过程及结果:

[u-boot@SMDK2440A]# printenv

bootargs=console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.72:/opt/rootfs ip=192.168.1.226:192.168.1.72:192.168.1.72:255.255.255.0:smdk2440a.embedclub.com:eth0:off

bootcmd=nand read 0x30008000 60000 500000;bootm 0x30008000

bootdelay=1

baudrate=115200

ethaddr=08:08:11:18:12:27

netmask=255.255.255.0

embedclub=bmp d 70000

 stdin=serial

stdout=serial

stderr=serial

lcdtype=w

ethact=dm9000

serverip=192.168.1.108

ipaddr=192.168.1.266

gatewayip=192.168.1.1

 

Environment size: 451/131068 bytes

[u-boot@SMDK2440A]# tftp 30008000 uImage

dm9000 i/o: 0x20000300, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 08:08:11:18:12:27

operating at 100M full duplex mode

Using dm9000 device

TFTP from server 192.168.1.108; our IP address is 192.168.1.10

Filename 'uImage'.

Load address: 0x30008000

Loading: T #################################################################

         #################################################################

         ##########################

done

Bytes transferred = 2286828 (22e4ec hex)

[u-boot@SMDK2440A]# nand erase 60000 500000

 

NAND erase: device 0 offset 0x60000, size 0x500000

Erasing at 0x54000002800000 --   0% complete.

OK

[u-boot@SMDK2440A]# nand write 30008000 60000 500000

 

NAND write: device 0 offset 0x60000, size 0x500000

Writing at 0x54000000020000 -- 100% is complete. 5242880 bytes written: OK

[u-boot@SMDK2440A]#boot  //启动  成功的啦

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值