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

AM3352 nandflash 无法加载ubi文件系统

硬件平台:AM3352+ nandflash M29F2G08ABAEA
通过烧写程序出现如下问题
1.通过uboot加载程序,内核加载完成以后出现ubi文件系统挂载不起问题,打印如下
加载命令:
rootfs:
mw.b 0x82000000 0xFF 0x3000000;loadb 0x82000000
nand erase 0xA00000 0x3100000;nandecc sw;nand write 0x82000000 0xA00000 0x3000000
打印log:
[ 2.302067] UBI: attaching mtd9 to ubi0
[ 2.307178] UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.319648] UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.332081] UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.344509] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
2.通过uboot调试空的ubi文件系统,打印如下:
U-Boot# nand erase.part NAND.rootfsNAND erase.part: device 0 offset 0xa00000, size 0xf600000
Erasing at 0xffe0000 — 100% complete.
OK
U-Boot# ubi part NAND.rootfs
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=9"
UBI: MTD device size: 246 MiB
UBI: number of good PEBs: 1968
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1945
UBI: total number of reserved PEBs: 23
UBI: number of PEBs reserved for bad PEB handling: 19
UBI: max/mean erase counter: 1/0
U-Boot# ubi create NAND.file-system
No size specified -> Using max size (250951680)
Creating dynamic volume NAND.file-system of size 250951680
U-Boot# ubi write 0x82000000 NAND.rootfs 0x02420000
Volume NAND.rootfs not found!
U-Boot# ubi write 0x82000000 NAND.file-system 0x02420000
37879808 bytes written to volume NAND.file-system
U-Boot# ubi part
Device 0: nand0, partition NAND.rootfs

问题1:什么原因导致UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes,怎么解决?

问题2:为什么空的ubi文件系统创建没有问题?

附 ubi文件系统制作命令:

mkfs.ubifs –F -q -r ./rootfs -m 2048 -e 129024 -c 2047 -o rootfs_05252200.img
ubinize -o rootfs_05252200.img -m 2048 -p 128KiB -s 512 ubinize.cfg

yongqing wang:

ECC校验问题,可能是你改了代码里有bug

yongqing wang:

回复 yongqing wang:

看一下是否修改了pmecc

jianzhong hu:

回复 yongqing wang:

这个是哪里修改的呢?

Shine:

看上去像是ECC的问题,请看一下nand ecc scheme用的是什么?SDK是哪个版本?

jianzhong hu:

回复 Shine:

SDK 我用的是am335x-evm-sdk-src-07.00.00.00.tar.gz,nandecc scheme 我用的是bch8,我在uboot源码里面增加了static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])这个nandecc命令,程序写入nand的时候用了nandecc hw bch8

yongqing wang:

回复 jianzhong hu:

意思是你在要来代码的基础上加的东西有bug,影响到了ECC

赞(0)
未经允许不得转载:TI中文支持网 » AM3352 nandflash 无法加载ubi文件系统
分享到: 更多 (0)