Linux DNW烧写实例

1、安装linux DNW

http://blog.csdn.net/sanlinux/archive/2010/04/09/5465012.aspx

2、在u-boot中选择需烧写的项,如内核、文件系统等。

 

#####    Boot for Nand Flash Main Menu  #####

[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash

[2] Download Eboot to Nand Flash

[3] Download Linux Kernel to Nand Flash

[5] Download CRAMFS image to Nand Flash

[6] Download YAFFS image to Nand Flash

[7] Download Program (uCOS-II or TQ2440_Test) to SDRAM and Run it

[8] Boot the system

[9] Format the Nand Flash

[0] Set the boot parameters

[a] Download User Program (eg: uCOS-II or TQ2440_Test)

[b] Download LOGO Picture (.bin) to Nand  Flash 

[l] Set LCD Parameters 

[r] Reboot u-boot

[q] quit from menu

Enter your selection: 6

USB host is connected. Waiting a download.

 

Now, Downloading [ADDRESS:30000000h,TOTAL:55866634]

RECEIVED FILE SIZE:55866634 (443KB/S, 123S)

 

NAND erase: device 0 offset 0x400000, size 0x3c00000

Skipping bad block at  0x01798000                                            

Skipping bad block at  0x02504000                                            

Erasing at 0x3ffc000 -- 100% complete.

OK

 

3、在PC端使用dnw传送需烧写的文件。

 

sudo dnw root_qtopia_2.2.0_2.6.30.4_64MB.bin

file name : root_qtopia_2.2.0_2.6.30.4_64MB.bin

file size : 55866624 bytes

Writing data...

23%      55866634 bytes     OK

 

4、说明:如果要了解整个烧写的过程,重点还是要分析uboot烧写的实现源码。

common目录下包含了uboot的内嵌命令(如usbslave, loady等),需分析研究。

 

5、在烧写文件系统时,我们往往会烧写文件系统的实际大小,而不是分配的最大值。获取文件大小,并转化为十六进制的sh表达式为:

du -b file | awk '{printf "%x", $1}'

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值