JFFS2: endian problem ?
Hi all,
I am trying to have a working JFFS2 on an RPX-CLLF card (Motorola 860, big endian).
It happens that every time I mount the jfss2, the flash gets formatted. I dumped the flash block, and the bytes seem to be in the wrong order (e.g. magic number and nodetype swapped, and also magic number with the two bytes swapped). I tested it against a jffs2 image build for big endian with mkfs.jffs2, and the order of bytes is reversed. Reading a flash block containing e.g. card FW is ok. I am using the latest mtd on a 2.4.2 kernel.
Anyone can help me ?
Thanks a lot
Paolo Marini
Quoted 10 lines · [email protected] said:
I am trying to have a working JFFS2 on an RPX-CLLF card (Motorola 860, big endian).
It happens that every time I mount the jfss2, the flash gets formatted. I dumped the flash block, and the bytes seem to be in the wrong order (e.g. magic number and nodetype swapped, and also magic number with the two bytes swapped). I tested it against a jffs2 image build for big endian with mkfs.jffs2, and the order of bytes is reversed. Reading a flash block containing e.g. card FW is ok. I am using the latest mtd on a 2.4.2 kernel.
Update to v1.13 of rpxlite.c. You'll probably need to enable CONFIG_MTD_CFI_ADV_OPTIONS and then choose the CONFIG_MTD_CFI_LE_BYTE_SWAP option too.
--
dwmw2