[U-Boot-Users] cramfs byte order

Hello all,
It seems there is a problem with cramfs support in u-boot. u-boot implementation of cramfs do swap bytes on big endian machines (ppc) and linux never swap bytes and expects the file system to be in the machine byte order.
This is from linuxsrc/Documentation/filesystems/cramfs.txt: Currently, cramfs must be written and read with architectures of the same endianness.
The result is the file system can be read or from linux or from u-boot but not from both of them.
The other problem is when I am trying to load a file from cramfs (fsload filename) I am getting the following error: ### CRAMFS LOAD ERROR<ffffffff> for vmlinuz! What can it be?
Thank you.
-- Gleb.

Hallo Robert & Kai-Uwe,
in message 20040421140505.GA14721@nbase.co.il Gleb Natapov wrote:
It seems there is a problem with cramfs support in u-boot. u-boot implementation of cramfs do swap bytes on big endian machines (ppc) and linux never swap bytes and expects the file system to be in the machine byte order.
This is from linuxsrc/Documentation/filesystems/cramfs.txt: Currently, cramfs must be written and read with architectures of the same endianness.
The result is the file system can be read or from linux or from u-boot but not from both of them.
Gleb is right. The comments in your code about cramfs being little- endian and teh code itself is wrong. Can you please submit a patch to clean up this problem, i. e. remove all the byte-swapping code and the custom macros you added to the Linux code?
Thanks in advance.
Best regards,
Wolfgang Denk
participants (2)
-
gleb@nbase.co.il
-
Wolfgang Denk