NAND flash write goes wrong

borasah at gmail.com borasah at gmail.com
Thu May 10 17:37:08 EDT 2007


Hi Josh,

> > I have a MIPS based board and want to use its NAND flash for storage.
> > NAND chip is a Samsung part: K9F1208UDA. It has 16KB erase block size and
> > 512 byte page size.
> > 	cat /proc/mtd
> > 	dev:    size   erasesize  name
> > 	mtd0: 02000000 00020000 "mtdram test device"
> > 	mtd1: 00800000 00004000 "NAND FS 0"
> > 	mtd2: 03800000 00004000 "NAND FS 1"
> >
> > As you see there are two partitions on it. I want to use "NAND FS
> > 1"(56MB) for rootFS storage. I obtained mtd-utils from the site and
> > compiled them for both the host and the target. I am using "mkfs.jffs2
> > command on the host" to generate a jffs2 image.
> > 	./mkfs.jffs2 -p 0x3800000 -s 0x200 -e 0x4000 -r rootfs -o img -l
> > Then on the target I do
> > 	flash_eraseall -j /dev/mtd
>
> Could you try without the -j and see if it fares any better?

Thanks for your suggestion. I tried it. But seems the same...

jffs2: Erase block size too small (16KiB). Using virtual blocks size (32KiB) 
instead
CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
Empty flash at 0x00003f5c ends at 0x00004000
CLEANMARKER node found at 0x00004000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00008000 has totlen 0xc != normal 0x0
Empty flash at 0x0000bffc ends at 0x0000c000
CLEANMARKER node found at 0x0000c000 has totlen 0xc != normal 0x0
CLEANMARKER node found at 0x00010000 has totlen 0xc != normal 0x0
mtd->read(0x7a50 bytes from 0x105b0) returned ECC error
Empty flash at 0x00013ffc ends at 0x00014000
CLEANMARKER node found at 0x00014000 has totlen 0xc != normal 0x0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000151c8: 0x004f 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000151cc: 0xfbba 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000151d0: 0x00ff 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000151d4: 0x9400 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000151d8: 0xff82 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000153ec: 0x81ed 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000153f0: 0x03e8 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000153f4: 0x69e8 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000153f8: 0x4fd0 
instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000153fc: 0x4fd0 
instead
Further such events for this erase block will not be printed
...
Inode #265 was a directory with children - removing those too...
Inode #266 was a directory with children - removing those too...
Inode #342 was a directory with children - removing those too...
...
mtd->read(0x118 bytes from 0x1d973c) returned ECC error
jffs2_get_inode_nodes(): Data CRC failed on node at 0x001d96f8: Read 
0x0dbe310a, calculated 0x6853096b
...


--
Bora SAHIN





More information about the linux-mtd mailing list