JFFS2 for ST M29W320DT

Yuzuru Nitta nitta at hht.co.jp
Thu Feb 26 06:33:14 EST 2004



Thank you for reply.

> 
> So your 640DT devices are each in 8-bit mode, and the 320DT devices are
> in 16-bit mode? Are you sure about that?

Yes, ST320DT devices are 16-bit mode exactly.

> 
> Ignore JFFS2 and write data to the chips directly via /dev/mtd<N>. See
> if there's a recognisable pattern.
> 


I tried to copy "jffs2 Image" via /dev/mtdblock3.
I made the Image like this ...
prom> mkfs.jffs2 -r target-fs-0007/ -e 0x20000 -l -p -o jffs2.img;



Here is the message log when I tried to copy ,
/============================================================================
root at ToughSoB:~# cp hitntp-logarea.img /dev/mtdblock3 
mtdblock_open
ok
mtdblock: write on "LOG AREA" at 0x0, size 0x1000

...

mtdblock: write on "LOG AREA" at 0x20000, size 0x1000
mtdblock: writing cached data for "LOG AREA" at 0x0, size 0x20000
mtdblock: write on "LOG AREA" at 0x21000, size 0x1000

...

mtdblock: write on "LOG AREA" at 0x40000, size 0x1000
mtdblock: writing cached data for "LOG AREA" at 0x20000, size 0x20000
mtdblock: write on "LOG AREA" at 0x41000, size 0x1000

...
...
...

mtdblock: write on "LOG AREA" at 0x560000, size 0x1000
mtdblock: writing cached data for "LOG AREA" at 0x540000, size 0x20000
mtdblock: write on "LOG AREA" at 0x561000, size 0x1000

...

mtdblock: write on "LOG AREA" at 0x57f000, size 0x1000
mtdblock_release
mtdblock: writing cached data for "LOG AREA" at 0x560000, size 0x20000
ok
root at ToughSoB:~#
/============================================================================

And I tried to mount "/dev/mtdblock3".

/============================================================================
root at ToughSoB:~# mount -t jffs2 /dev/mtdblock3 /mnt/mtd3/
mtdblock_open
ok
jffs2_scan_eraseblock(): Node at 0x00000000 {0x1985, 0xe002, 0x0000002b) has invalid CRC 0xfddb6ee6 
(calculated 0xfbb21c48)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x002b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x6ee6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x0001 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0002 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x4762 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0403 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x0065 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0xa45a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x6d74 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x000082b8
You cannot use older JFFS2 filesystems with newer kernels
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased

...

JFFS2: Erase block at 0x00020000 is not formatted. It will be erased

...
...
...

JFFS2: Erase block at 0x005e0000 is not formatted. It will be erased
Inode #6 was a directory with children - removing those too...
Inode #12 was a directory with children - removing those too...
Inode #13 was a directory with children - removing those too...
Inode #14 was a directory with children - removing those too...
Inode #45 was a directory with children - removing those too...
Inode #46 was a directory with children - removing those too...
Inode #49 was a directory with children - removing those too...
Inode #50 was a directory with children - removing those too...
Inode #51 was a directory with children - removing those too...
root at ToughSoB:~# 
Newly-erased block contained word 0xc002ffff at offset 0x005e04e0
Newly-erased block contained word 0x2003ffff at offset 0x00760000
root at ToughSoB:~# 
/============================================================================

Then, I copied textfile to the /mnt/mtd3, and I unmounted and mounted it
again.

/============================================================================
root at ToughSoB:~# cp textfile.txt /mnt/mtd3/
root at ToughSoB:~# cd /mnt/mtd3/
root at ToughSoB:/mnt/mtd3# ls -l
total 566
-rw-r--r--    1 root     root       578863 Jan  1 09:13 textfile.txt
root at ToughSoB:~# umount /mnt/mtd3/
mtdblock_release
ok
root at ToughSoB:~# mount -t jffs2 /dev/mtdblock3 /mnt/mtd3/
mtdblock_open
ok
jffs2_scan_eraseblock(): Node at 0x00080000 {0x1985, 0x2003, 0x00000834) has invalid CRC 0xe41e0a39 
(calculated 0xdf923147)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004: 0x0834 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008: 0x0a39 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008000c: 0x00b1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080010: 0x008e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080014: 0x81ed instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008001c: 0x1404 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080020: 0x4763 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080024: 0x4763 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080028: 0x4763 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00093c94
You cannot use older JFFS2 filesystems with newer kernels
Old JFFS2 bitmask found at 0x000968c4
You cannot use older JFFS2 filesystems with newer kernels
JFFS2: Erase block at 0x00080000 is not formatted. It will be erased

...

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00760008: 0xffff instead
JFFS2: Erase block at 0x00760000 is not formatted. It will be erased
root at ToughSoB:~# Newly-erased block contained word 0x2003ffff at offset 0x00660000
Newly-erased block contained word 0x2003ffff at offset 0x00640000

root at ToughSoB:~#
/============================================================================

And I put "ls -l" command, following logs appeared. I cannot access the
textfile.

/============================================================================
root at ToughSoB:/mnt/mtd3# ls -l
Unknown INCOMPAT nodetype FFFF at 0063FA64
Unknown INCOMPAT nodetype FFFF at 0063EA20

...

Unde(): No data nodes found for ino #652
ls: textfile.txt: Input/output error
total 0
root at ToughSoB:/mnt/mtd3#
/============================================================================


What am I missing?

Best Regards,
Joe
---
Nitta (Joe) Yuzuru
HIJI HIGH-TECH CO.,LTD.
System Solution Group


mailto: nitta at hht.co.jp
http://www.hht.co.jp




More information about the linux-mtd mailing list