[U-Boot-Users] CramFS endianness

Wolfgang Denk wd at denx.de
Fri Feb 29 22:08:08 CET 2008


In message <loom.20080229T161725-122 at post.gmane.org> you wrote:
> 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

Argh... I wish we had had git available by then. Obviously the  patch
checked  in was based on older code (without the fix included), and I
missed this.

> 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.

I agree. Can somebody please submit a proper patch?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Often it is fatal to live too long.                          - Racine




More information about the U-Boot mailing list