[U-Boot-Users] CramFS endianness

Bernhard Nemec bnemec at ganssloser.com
Fri Feb 29 17:28:17 CET 2008


Laurent Pinchart <laurent.pinchart <at> tbox.biz> writes:
> I recently had a problem with cramfs endianness. cramfs tools generates a 
> host-endian file system, which was incompatible with my big-endian MPC8260 
> system. I patched mkcramfs to reverse the bit order, and was able to read the 
> cramfs image from Linux.
> 
> However, even though Linux doesn't do any byte swapping, U-Boot assumes 
> little-endian byte order and swap bytes on big-endian architectures. Why is 
> that ? U-Boot and Linux are clearly not compatible on big-endian 
> architectures, and I'd like to fix the problem in the right place.

Searching this list and the U-Boot repository, I found that this problem was
already acknowledged by Wolfgang once back in 2004:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/12197

Soon after that, there was this fix ("Fix endianess problem in cramfs code"):
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=36c728774edcfca54766f6828173fe24d3d8aa0b

But then, this fix got reverted by the following change in 2005:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=b66eb5282d568225abad5b3b61cc0968be35fc0d

At last, the issue popped up on the list again in 2006 (the post that I'm
replying to):
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/22846

Thus, I suggest that the original fix should be re-applied.

Bernhard





More information about the U-Boot mailing list