Mount-failure (jffs2_scan_empty()) mounting SmartMedia with jffs2
Hi there,
I'm attempting to mount a jffs2-filesystem on a SmartMedia card but it's not quite successfull (read: it doesn't work at all). Some info:
* On startup the kernel informs me of the following:
SmartMedia card inserted.
NAND device: Manufacture ID: 0xec, Chip ID: 0x75 (Samsung KM29U256T)
* The /proc/mtd contains the following:
dev: size erasesize name
mtd0: 00200000 00010000 "Physically mapped flash"
mtd1: 00840000 00000420 "Atmel AT45DB642"
mtd2: 02000000 00004000 "Samsung KM29U256T"
i.e. the flash-device I'm trying to use is "mtd2".
* Running "eraseall /dev/mtd/2" works like a charm.
* I try to create a small filesystem with the command:
mkfs.jffs2 --eraseblock=0x4000 --pad --root=/usr/adm --output=/tmp/image
* I copied the filesystem to the device: "cp /tmp/image /dev/mtd/2"
* ...and tried to mount it: "mount -t jffs2 /dev/mtdblock/2 /mnt/mtd" but this is where the sky falls down - I get tons of messages like the following:jffs2_scan_empty(): Empty block at 0x0000001c ends at 0x00000200 (with 0x0000000 0)! Marking dirty
<%%%% SNIP %%%%>
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
And now I'm lost... Any ideas of how to get any further?
Regards,
Martin Egholm Nielsen
Quoted 1 line · Martin Egholm Nielsen
And now I'm lost... Any ideas of how to get any further?
Can you read back the contents of the flash after writing, and compare with the image you attempted to write?
Signature · 1 line
dwmw2
Quoted 3 lines
Quoted 1 line
And now I'm lost... Any ideas of how to get any further?
Can you read back the contents of the flash after writing, and compare with the image you attempted to write?
Heh, good point! I tried the following:
# dd if=/tmp/image of=/dev/mtd/2 32+0 records in 32+0 records out
# dd if=/dev/mtd/2 of=/tmp/copy count=32 bs=512 32+0 records in 32+0 records out
# ls -l /tmp -rw-r--r-- 1 root root 16384 Jan 1 00:00 image -rw-r--r-- 1 root root 16384 Jan 1 00:01 copy
# diff /tmp/image /tmp/copy Binary files /tmp/image and /tmp/copy differ
I.e. not the same, no... You know why?
Regards,
Martin Egholm Nielsen