[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] MTD and JFFS with BigEndian uClinux systems
I get a deja vu.
I see the same effects in my current trials to use jffs2 on top of a MTD
Firstly, it found the wrong filesystem signature (wrong bitmask, found
0x2003 instead of 0x1985). But 2003 is the neighboured word to 1985 in the
dword in the flash memory.
I recognized it is due a global 16bit-word order read problem. The chip
driver writes from a BigEndian memory in 16bit steps to a LitteEndian flash
memory, but the map driver reads in 32bit steps (due the use of memcpy() in
..._copy_from()), and in my opinion, this only does work for LittleEndian
uClinux platforms but not for the BigEndian-based microblaze. The 32bit read
access to the flash splits it in 2 16bit read accesses but they result in
the wrong word order (because of the transition from LittleEndian flash to
Next I fixed that problem by not using microblazes memcpy() for reading and
writing, I use a slightly tweaked copy of it. I had a proper mount now but
further fixes in the chip driver's write function were necessary. The word
order during writing byte arrays must be fixed there too. Now it nearly
works, just some CRC failures after I copied files in the jffs2 file system
and remount actions. It seems to me the byte copying in memcpy's head and
tail also mixes up some byte...
My suspicion is noone ever has successfully get a jffs2 filesystem work on
the microblaze, maybe except just for booting a read-only kernel image from
it, but not for real file copy/move/delete actions. Is this true?
microblaze-uclinux mailing list
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/