something wrong about jffs2dump change a JFFS2 file system to a little-endian file

2k views Asked by At

i have a JFFS2 file system ,it's a big-endian.

my computer: x86 Linux,little-endian.

i used jffs2dump to changed my JFFS2 file to a little-endian.

eg: (# jffs2dump -c -v -b -e B070.jffs2 B070.w).

there's some wrong come out:

│Wrong bitmask at 0x00b3ffd8, 0x0000
│Wrong bitmask at 0x00b3ffdc, 0x0000
│Wrong bitmask at 0x00b3ffe0, 0x0000
│Wrong bitmask at 0x00b3ffe4, 0x0000
│Wrong bitmask at 0x00b3ffe8, 0x0000
│Wrong bitmask at 0x00b3ffec, 0x0000
│Wrong bitmask at 0x00b3fff0, 0x0000
│Wrong bitmask at 0x00b3fff4, 0x0000
│Wrong bitmask at 0x00b3fff8, 0x0000
│Wrong bitmask at 0x00b3fffc, 0x0000
│Wrong bitmask at 0x00b5fff4, 0x0000
│Wrong bitmask at 0x00b5fff8, 0x0000
│Wrong bitmask at 0x00b5fffc, 0x0000
│Wrong bitmask at 0x00b7fffc, 0x0000
│Wrong bitmask at 0x00ba0000, 0x8bf5
│Wrong bitmask at 0x00ba0004, 0x0000
│Wrong bitmask at 0x00ba0008, 0x0000
│Wrong bitmask at 0x00ba000c, 0x0000
│Wrong bitmask at 0x00ba0010, 0x0000 ......

1

There are 1 answers

0
kirsche40 On

This question is rather old but I give an answer for others having trouble with this tool too.

I can confirm that jffs2dump - my version of mtd-tools is 1.5.0 - is broken. You can check this by converting a working image from BE to LE and back to BE. The resulting image is different but should not. In my case during boot of the converted image I got the messages:

Unknown JFFS2 compression type 0x07
Error: jffs2_decompress returned -5

A binary diff shows some 0xC0 are changed into 0xE0.

In addition you can see a difference in using the -c switch. If I use it to convert a working BE image to LE I get no error warning at all. If I don't use it I get some errors like

Wrong hdr_crc
Unknown node type