分类: 嵌入式
2015-11-24 11:48:27
实验内容:OK6410开发板手工烧写Linux
实验心得:1、DNW工具识别PC机USB口:USB连接线需使用OK6410开发板原厂线,否则DNW工具识别不到开发板USB DEVICE口(即DNW工具窗口标题栏显示为USBx状态)
2、需要在PC机SecureCRT工具命令提示行中输入执行DNW 50008000后,DNW工具窗口标题栏方显示为USBok状态。
实验结果:昨天晚上试验不顺利,未作出实验手册的结果。Bootloader、Linux内核、根文件系统均烧写成功,但开发板未能启动Linux,触摸屏未显示Linux系统画面。
OK6410开发板配置如下:
SMDK6410 # nand scrub
NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
There is no reliable way to recover them.
Use this command only for testing purposes if you
are sure of what you are doing!
Really scrub this NAND flash?
scrub aborted
SMDK6410 # nand erase
NAND erase: device 0 whole chip
Skipping bad block at 0x00000000
Skipping bad block at 0x00080000
Skipping bad block at 0x00100000
Skipping bad block at 0x26f00000
Skipping bad block at 0x7f400000
Erasing at 0x7ff80000 -- 100% complete.
OK
SMDK6410 # dnw 50008000
Insert a OTG cable into the connector!
OTG cable Connected!
Now, Waiting for DNW to transmit data
Download Done!! Download Address: 0x50008000, Download Filesize:0x30000
Checksum is being calculated.
Checksum O.K.
SMDK6410 # nand erase 0 100000
NAND erase: device 0 offset 0x0, size 0x100000
Skipping bad block at 0x00000000
Skipping bad block at 0x00080000
OK
SMDK6410 # nand write.uboot 50008000 0 100000
NAND write: device 0 offset 0x0, size 0x100000
1032192 bytes written: OK
SMDK6410 # dnw 50008000
Insert a OTG cable into the connector!
OTG cable Connected!
Now, Waiting for DNW to transmit data
Download Done!! Download Address: 0x50008000, Download Filesize:0x36bba0
Checksum is being calculated....
Checksum O.K.
SMDK6410 # nand erase 100000 300000
NAND erase: device 0 offset 0x100000, size 0x300000
Skipping bad block at 0x00100000
Erasing at 0x380000 -- 100% complete.
OK
SMDK6410 # nand write.e 50008000 100000 300000
NAND write: device 0 offset 0x100000, size 0x300000
Bad block at 0x100000 in erase block from 0x100000 will be skipped
Writing data at 0x47f000 -- 100% complete.
3145728 bytes written: OK
SMDK6410 # dnw 50008000
Insert a OTG cable into the connector!
OTG cable Connected!
Now, Waiting for DNW to transmit data
Download Done!! Download Address: 0x50008000, Download Filesize:0x5a3a000
Checksum is being calculated...........................................................................................
Checksum O.K.
SMDK6410 # nand erase 400000 2000000
NAND erase: device 0 offset 0x400000, size 0x2000000
Erasing at 0x2380000 -- 100% complete.
OK
SMDK6410 # nand write.e 50008000 400000 2000000
NAND write: device 0 offset 0x400000, size 0x2000000
Writing data at 0x23ff000 -- 100% complete.
33554432 bytes written: OK
SMDK6410 #
解决方案初探:擦写nand flash时,出现如上标红的命令提示信息,此时感觉应为问题的根源。首先硬性擦除存储器命令nand scrub 执行中断,未出现100%擦出提示信息。其次整片擦除命令nand erase命令出现跳过坏逻辑块提示信息。
从网上找到相似的问题处理方案,准备试一试!问题处理方案如下:
OK6410 烧写LINUX系统的问题与解决
OK6410是一款设计优良,性价比出众的基于S3C6410X-66的ARM11开发板产品。官方提供了wince6 linux android 的支持与DEMO程序。根据其手册,烧写WINCE没有什么大问题。但如果原来是WINCE,想改烧写U-boot就会出现一些问题。
按照手册,在用SD卡启动后,下载u-boot到开发板上,用u-boot 来 erase nand flash的时候,会出现如下错误。
$nand erase 0 100000
SKipping bad block at 0x00000000
SKipping bad block at 0x00020000
SKipping bad block at 0x00040000
SKipping bad block at 0x00060000
SKipping bad block at 0x00080000
SKipping bad block at 0x000a0000
Erasing at 0xc0000 ---- 87complete
Erasing at 0xe0000 ----100 complete
这显然是不合理的错误。
从现像上看,应该是u-boot的nand flash的erase过程不正确造成,应该是个软毛病。但回忆在烧写wince的过程中没有类似问题,那么wince的烧写程序应该是正确的。于是改用wince的e-boot先来执行擦除过程,再改用u-boot来写,结果过程就正常了。
具体操作就是:在按手册的烧写过程之前,先使用sd卡下载方式,下载并执行wince的e-boot,来执行A命令(erase all blocks),这样就能清除所有块的内容。再按linux手册的方式下载u-boot执行,再用nand erase 0 100000,就不会出错了。
本文是转载yubao7920的博客