TI中文支持网
TI专业的中文技术问题搜集分享网站

关于DM8168 nand flash启动的问题求解

关于DM8168 nand flash启动,想向各位请教。谢谢~
 
我目前可以从SD卡启动进入系统,但无法实现从nand flash启动。以下是我的具体实施方法:
我将u-boot.noxip.bin;uImage ;rd-jffs2.bin 放在SD卡BOOT分区下。
 
SW3设置为SD mode;同时SW4 nand使能(16bit nand flash),开机进入Uboot命令行输入以下指令:
首先烧写UBoot
mmc rescan 0
mw.b 0x81000000 0xFF 0x260000
fatload mmc 0 81000000 u-boot.noxip.bin
nand erase 0x0 0x260000
nandecc hw 2
nand write.i 0x81000000 0x0 0x260000
nandecc hw 0
烧写内核uImage
mw.b 0x81000000 0xFF 0x440000
fatload mmc 0 81000000 uImage
nand erase 0x00280000 0x00440000
nand write 0x81000000 0x00280000 0x00280800(内核大小为2,622,736字节)
烧写文件系统rd-jffs2.bin
mw.b 0x81000000 0xFF 0x0C820000
fatload mmc 0 81000000 rd-jffs2.bin
nand erase clean 0x006C0000 0x0C820000
nand write 0x81000000 0x006C0000 0x00e00000(文件系统大小为14,679,872字节)
SW3设置为Nand flash mode,SW4 nand使能;开机启动设置env变量
setenv bootcmd 'nandecc sw;nand read 81000000 280000 440000;bootm 81000000'
setenv bootargs 'console=ttyO2,115200n8 root=/dev/mtdblock7 rw rootfstype=jffs2 mem=100M earlyprintk'
开机启动报以下信息:
Hit any key to stop autoboot:  0                                                
SW ECC selected                                                                
                   
NAND read: device 0 offset 0x280000, size 0x440000                              
NAND read from offset 280000 failed -74                                        
 
4456448 bytes read: ERROR                                                      
## Booting kernel from Legacy Image at 81000000 …                            
   
Image Name:   Linux-2.6.37                                                  
   
Image Type:   ARM Linux Kernel Image (uncompressed)                          
   
Data Size:    2622672 Bytes = 2.5 MiB                                        
   
Load Address: 80008000                                                      
   
Entry Point:  80008000                                                      
   
Verifying Checksum … Bad Data CRC                                          
ERROR: can't get kernel image!                                                  
TI8168_EVM#
Eason Wang:

 你用的是哪个版本的RDK为什么是SW ECC?

hu hu:

回复 Eason Wang:

您好 ,感谢您的回复。。

目前我的板子使用的EZSDK5.05,您说的RDK版本是不是指的DVRRDK的版本。

我很新手,所以不大知道为什么SW ECC。

具体我也是根据DM8168心得之从sd卡烧写到nand  http://blog.csdn.net/luhao806/article/details/7341439 进行操作的。

hu hu:

回复 Louis:

您好,我将kerenl的也设置成ECC BCH8,将bootcmd中nandecc sw去掉。系统可以加载启动了。但是一直循环报下列错误:

hub 1-0:1.0: over-current change on port 1hub 2-0:1.0: over-current change on port 1

mtd->read(0x800 bytes from 0xcde000) returned ECC error   from 后一直再变化

hu hu:

回复 Louis:

mtd->read(0x800 bytes from 0xdfe800) returned ECC error                         

Read of newly-erased block at 0x06c40000 failed: -74. Putting on bad_list       

Read of newly-erased block at 0x06c40000 failed: -74. Putting on bad_list       

JFFS2: marking eraseblock at 06c40000

大概报错几分钟后,就不再报错了。。上面为最后4行指令

hu hu:

回复 Louis:

噢 这样啊。谢谢。我是有个现成的jffs2的文件系统,所以才用这个的。那我弄个UBIFS再试试吧

hu hu:

回复 Louis:

我使用UBI文件系统进行flash启动,移植可以成功但在启动过程报错

setenv bootargs 'console=ttyO2,115200n8 noinitrd ip=off mem=256M rootwait=1 rw ubi.mtd=7,2048 rootfstype=ubifs root=ubi0:rootfs init=/init'

错误如下:

VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)                Please append a correct "root=" boot option; here are the available partitions: 1f00              64 mtdblock0  (driver?)                                       1f02              64 mtdblock2  (driver?)                                       1f04            2432 mtdblock4  (driver?)                                       1f05             128 mtdblock5  (driver?)                                       1f06            4352 mtdblock6  (driver?)                                       1f07          204928 mtdblock7  (driver?)                                       1f08           50304 mtdblock8  (driver?)                                       Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 我在网上看到相关内容,但是其他人的错误,是在上述指令之前,还报有以下的错误,我这边并没有报该错误。UBIFS error (pid 1): ubifs_check_node: bad CRC: calculated 0x9f186f96, read 0x3baee010UBIFS error (pid 1): ubifs_check_node: bad node at LEB 0:0UBIFS error (pid 1): ubifs_read_node: expected node type 6

hu hu:

回复 Louis:

UBIFS镜像的对齐要求是2048的整数倍吧,这点我设置是2048的整数倍。

我有把整个nand擦掉,重新烧入,还是报一样的错误。

我向上查看信息,有这么几句指令:

omap2-nand driver initializing                                                  NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron )                     Creating 5 MTD partitions on "omap2-nand.0":                                    0x000000000000-0x000000260000 : "U-Boot"                                        0x000000260000-0x000000280000 : "U-Boot Env"                                    0x000000280000-0x0000006c0000 : "Kernel"                                        0x0000006c0000-0x00000cee0000 : "File System"                                   0x00000cee0000-0x000010000000 : "Reserved"                                      UBI: attaching mtd7 to ubi0                                                     UBI: physical eraseblock size:   131072 bytes (128 KiB)                         UBI: logical eraseblock size:    126976 bytes                                   UBI: smallest flash I/O unit:    2048                                           UBI: sub-page size:              512                                            UBI: VID header offset:          2048 (aligned 2048)                            UBI: data offset:                4096                                           ata1: SATA link down (SStatus 0 SControl 300)                                   ata2: SATA link down (SStatus 0 SControl 300)                                   UBI: max. sequence number:       0                                              UBI error: ubi_read_volume_table: the layout volume was not found               UBI error: ubi_init: cannot attach mtd7

赞(0)
未经允许不得转载:TI中文支持网 » 关于DM8168 nand flash启动的问题求解
分享到: 更多 (0)