Skip to contentSkip to conversation

JFFS2 for ST M29W320DT

DISCUSSION Yuzuru Nitta 2 participants 3 messages Feb 26, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi all,

I am trying to install an JFFS2 filesystem on our original board(CPU SH3).

It is fine about jffs2 filesystem on "ST M29W640DT", but it doesn't work very well about "ST M29W320DT" ...

Here is the memory map(FlashROM). /---------------------------------------------------------
address size device buswidth
/---------------------------------------------------------
0x00000000 - 0x01FFFFFF 32MB ST M29W640DT x4 (32bit)
/---------------------------------------------------------
0x02000000 - 0x027FFFFF 8MB ST M29W320DT x2 (32bit)
/---------------------------------------------------------

The boot log is:
/============================================================================ Kernel command line: root=/dev/mtdblock2 sh_mv=ToughSoB console=ttySC2,115200 ether=11,0x300,0,0,eth0

...

JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.

...

TOUGHSOB FLASH: Found 2 x16 devices at 0x1000000 in 32-bit mode
Amd/Fujitsu Extended Query Table v0.3 at 0x0040
TOUGHSOB FLASH: JEDEC Device ID is 0xDE. Assuming broken CFI table. TOUGHSOB FLASH: Swapping erase regions for broken CFI table. number of CFI chips: 2
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Amd/Fujitsu Extended Query Table v1.0 at 0x0040
TOUGHSOB FLASH(LOG AREA): JEDEC Device ID is 0xCA. Assuming broken CFI table. TOUGHSOB FLASH(LOG AREA): Swapping erase regions for broken CFI table. number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness. Creating 3 MTD partitions on "TOUGHSOB FLASH":
0x00000000-0x00020000 : "IPL"
mtd: Giving out device 0 to IPL
0x00020000-0x00120000 : "KERNEL IMAGE"
mtd: Giving out device 1 to KERNEL IMAGE
0x00120000-0x02000000 : "FS IMAGE"
mtd: Giving out device 2 to FS IMAGE
Creating 1 MTD partitions on "TOUGHSOB FLASH(LOG AREA)":
0x00000000-0x00800000 : "LOG AREA"
mtd: Giving out device 3 to LOG AREA

....

ToughSoB login:
/============================================================================

And, I mounted the LOG AREA ...

/============================================================================

Quoted 1 line

mount -t jffs2 /dev/mtdblock3 /mnt/mtd3

root@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@ToughSoB:~# Newly-erased block contained word 0x2003ffff at offset 0x00660000
Newly-erased block contained word 0x2003ffff at offset 0x00640000
root@ToughSoB:~#
/============================================================================

so, I copy some textfile to /mnt/mtd3 ,and remount /mnt/mtd3, I get the following message ...

/============================================================================

root@ToughSoB:/mnt/mtd3# ls -l
Unknown INCOMPAT nodetype FFFF at 005613B8

...

Unknown INCOMPAT nodetype FFFF at 00560558
jffs2_read_inode(): No data nodes found for ino #652
ls: sometextfile: Input/output error
total 0
root@ToughSoB:/mnt/mtd3# /============================================================================

I just mistake making 'Mapping drivers for chip access' ? I can't find where the plobrem is.

Thanks
Joe

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

mailto: [email protected]
http://www.hht.co.jp

#1 lore raw
Quoted 7 lines · Yuzuru Nitta

/---------------------------------------------------------
address size device buswidth
/---------------------------------------------------------
0x00000000 - 0x01FFFFFF 32MB ST M29W640DT x4 (32bit)
/---------------------------------------------------------
0x02000000 - 0x027FFFFF 8MB ST M29W320DT x2 (32bit)
/---------------------------------------------------------

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

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

Signature · 1 line
dwmw2
#2 lore raw

Thank you for reply.

Quoted 3 lines

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.

Quoted 4 lines

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@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@ToughSoB:~# /============================================================================

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

/============================================================================

root@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@ToughSoB:~#
Newly-erased block contained word 0xc002ffff at offset 0x005e04e0 Newly-erased block contained word 0x2003ffff at offset 0x00760000 root@ToughSoB:~# /============================================================================

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

/============================================================================

root@ToughSoB:~# cp textfile.txt /mnt/mtd3/
root@ToughSoB:~# cd /mnt/mtd3/
root@ToughSoB:/mnt/mtd3# ls -l
total 566
-rw-r--r--    1 root     root       578863 Jan  1 09:13 textfile.txt
root@ToughSoB:~# umount /mnt/mtd3/
mtdblock_release
ok
root@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@ToughSoB:~# Newly-erased block contained word 0x2003ffff at offset 0x00660000
Newly-erased block contained word 0x2003ffff at offset 0x00640000

root@ToughSoB:~# /============================================================================

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

/============================================================================

root@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@ToughSoB:/mnt/mtd3# /============================================================================

What am I missing?

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

mailto: [email protected]
http://www.hht.co.jp