jffs2 mount failing

Hi All,

I am facing a problem while mounting a devices to use jffs2 filesystem. Once i erase the device, mount is successful. But if i write a file, it is throwing some crc errors if i unmount it and mount it again, it fails with same errors.

Can anyone tell me what is going here.

# mount -t jffs2 /dev/mtdblock3 /test/ Magic bitmask is backwards at offset 0x00000000. Wrong endian filesystem? jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008:

0x60f0 instead JFFS2: Erase block at 0x00000000 is not formatted. It will be erased Magic bitmask is backwards at offset 0x00020000. Wrong endian filesystem? jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0x60f0 instead JFFS2: Erase block at 0x00020000 is not formatted. It will be erased ... ... Magic bitmask is backwards at offset 0x007c0000. Wrong endian filesystem? jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x007c0008: 0x60f0 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x007c000c: 0x8519 instead

Further such events for this erase block will not be printed JFFS2: Erase block at 0x007c0000 is not formatted. It will be erased Magic bitmask is backwards at offset 0x007e0000. Wrong endian filesystem? jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x007e0008:

0x60f0 instead JFFS2: Erase block at 0x007e0000 is not formatted. It will be erased Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes empty_blocks 0, bad_blocks 0, c->nr_blocks 64

# eraseall /dev/mtd3 Erased 8192 Kibyte @ 0 -- 100% complete. # mount -t jffs2 /dev/mtdblock3 /test #cd /test # tftp -g 10.131.17.53 -r .config Node CRC 974d5d84 != calculated CRC 9bab4047 for node at 007c07d0 Node CRC eab4e132 != calculated CRC b1b3e1b7 for node at 007c0c70 Node CRC eab4e132 != calculated CRC b1b3e1b7 for node at 007c0c70 Node CRC eab4e132 != calculated CRC b1b3e1b7 for node at 007c0c70 ....

Reply to
vamshi
Loading thread data ...

I suggest initializing the file system with mkfs.jffs2 before mounting it.

I don't think you can use mkfs.jffs2 to write directly into your MTD device so create an image file and burn it with nandwrite.

Take care to choose the same endianness as your target CPU.

I also suggest padding the file system with 0xFF in full length. I have seen systems which end up with 0 byte values in image and mount fails.

-- Kind regards, Tarmo Kuuse

Reply to
Tarmo Kuuse

.

Thank you for your inputs, my flash is a nor chip. can i still use nandwrite?

Regards, Vamshi

Reply to
vamshi

I have no idea (I use an external BDM interface for programming flash). Check with "man nandwrite" and google.

-- Kind regards, Tarmo Kuuse

Reply to
Tarmo Kuuse

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.