当前位置: 技术问答>linux和unix
Arm9 linux系统 flash读写问题
来源: 互联网 发布时间:2016-11-23
本文导语: Arm9 linux系统 flash读写问题 当前板子环境: (a)16MiB Nor FLASH(默认从Nor Flash启动) (b)32MiB Nand FLASH (c)环境参数 ~ $ Please stand by while rebooting the system. Restarting system. NAND: NAND_ECC_NONE selected by board driver. This i...
Arm9 linux系统 flash读写问题
当前板子环境:
(a)16MiB Nor FLASH(默认从Nor Flash启动)
(b)32MiB Nand FLASH
(c)环境参数
~ $
Please stand by while rebooting the system.
Restarting system.
NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
32 MiB
U-Boot 2008.10 (Sep 29 2010 - 09:20:06)
DRAM: 256 MB
Flash: 16 MB
In: serial
Out: serial
Err: serial
Press CTRL-C to abort autoboot in hilinux # printenv
baudrate=115200
bootfile="uImage"
ethaddr=5E:4E:27:EB:59:7F
bootcmd=bootm 0x80100000
bootdelay=1
bootargs=mem=32M console=ttyAMA0,115200 root=1f01 rootfstype=jffs2 mtdparts=physmap-flash.0:3M(boot),13M(rootfs) pcimod=host pciclksel=1
filesize=2A0378
fileaddr=80300000
netmask=255.255.0.0
ipaddr=10.22.4.205
serverip=10.22.4.52
stdin=serial
stdout=serial
stderr=serial
verify=n
ver=U-Boot 2008.10 (Sep 29 2010 - 09:20:06)
Environment size: 421/131068 bytes
hilinux #
(d)烧写的固件皆为华为官方SDK 目录pub/img中提供,硬件参考Hi3515dmeb_ver_a版本
出现的主要问题:
(1)NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
关于nor flash和Nand flash共存的情况下,nand如何初始化,是否需要更改内核或uboot原码
(2)
Scanning device for bad blocks
Bad eraseblock 0 at 0x00000000
Bad eraseblock 1 at 0x00004000
该错误是nand flash存在坏块,该如何解决.
u-boot下直接擦除不成功,
(3)jffs2文件系统不可写,写入重启后丢失
jffs2_scan_inode_node(): CRC failed on node at 0x002a0510: Read 0x709b3df2, calculated 0xe9287682
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0000: 0x1905 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0004: 0x000c instead
该错误的可能原因是什么,该如何解决
(4)以下错误如何解决,是否与制作jffs2文件系统有关
Node totlen on flash (0x00000004) != totlen from node ref (0x00000044)
Auto login as root ...
Node totlen on flash (0x0000002f) != totlen from node ref (0x00000070)
当前板子环境:
(a)16MiB Nor FLASH(默认从Nor Flash启动)
(b)32MiB Nand FLASH
(c)环境参数
~ $
Please stand by while rebooting the system.
Restarting system.
NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
32 MiB
U-Boot 2008.10 (Sep 29 2010 - 09:20:06)
DRAM: 256 MB
Flash: 16 MB
In: serial
Out: serial
Err: serial
Press CTRL-C to abort autoboot in hilinux # printenv
baudrate=115200
bootfile="uImage"
ethaddr=5E:4E:27:EB:59:7F
bootcmd=bootm 0x80100000
bootdelay=1
bootargs=mem=32M console=ttyAMA0,115200 root=1f01 rootfstype=jffs2 mtdparts=physmap-flash.0:3M(boot),13M(rootfs) pcimod=host pciclksel=1
filesize=2A0378
fileaddr=80300000
netmask=255.255.0.0
ipaddr=10.22.4.205
serverip=10.22.4.52
stdin=serial
stdout=serial
stderr=serial
verify=n
ver=U-Boot 2008.10 (Sep 29 2010 - 09:20:06)
Environment size: 421/131068 bytes
hilinux #
(d)烧写的固件皆为华为官方SDK 目录pub/img中提供,硬件参考Hi3515dmeb_ver_a版本
出现的主要问题:
(1)NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
关于nor flash和Nand flash共存的情况下,nand如何初始化,是否需要更改内核或uboot原码
(2)
Scanning device for bad blocks
Bad eraseblock 0 at 0x00000000
Bad eraseblock 1 at 0x00004000
该错误是nand flash存在坏块,该如何解决.
u-boot下直接擦除不成功,
(3)jffs2文件系统不可写,写入重启后丢失
jffs2_scan_inode_node(): CRC failed on node at 0x002a0510: Read 0x709b3df2, calculated 0xe9287682
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0000: 0x1905 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002c0004: 0x000c instead
该错误的可能原因是什么,该如何解决
(4)以下错误如何解决,是否与制作jffs2文件系统有关
Node totlen on flash (0x00000004) != totlen from node ref (0x00000044)
Auto login as root ...
Node totlen on flash (0x0000002f) != totlen from node ref (0x00000070)
|
1.nand的初始化应该在内核中加载相应的驱动就可以了。
2.nand flash存在坏块的话,你在擦除时可用uboot命令:
nand write.jffs2:向Nand Flash写入数据,如果NandFlash相应的区域有坏块,可以跳过坏块。
3.jffs2文件系统写入的原因应该是对应的nand区域块没有擦除干净,我之前在nor flash上写入jffs2文件系统时也有遇过这个问题,擦除之后就ok了。
4.这个或许是jffs2的原因吧,具体不清楚。。
2.nand flash存在坏块的话,你在擦除时可用uboot命令:
nand write.jffs2:向Nand Flash写入数据,如果NandFlash相应的区域有坏块,可以跳过坏块。
3.jffs2文件系统写入的原因应该是对应的nand区域块没有擦除干净,我之前在nor flash上写入jffs2文件系统时也有遇过这个问题,擦除之后就ok了。
4.这个或许是jffs2的原因吧,具体不清楚。。
|
nand flash有坏块很正常吧,驱动会处理的吧。经常看见这个坏块的错误