[U-Boot-Users] Little endian

Ed Okerson eokerson at texasconnect.net
Wed Nov 26 22:01:47 CET 2003

On Wed, 26 Nov 2003, Wolfgang Denk wrote:

> Dear Ed,
> in message <Pine.LNX.4.44.0311261130170.20886-100000 at dallas.texasconnect.net> you wrote:
> > How much testing has been done on little-endian mode of u-boot?  Does
> > everyone pretty much just use big-endian, or is there a mix?  I am working
> Frankly, I don't  understand  your  question.  Both  endianesses  are
> equally  well  supported  - PowerPC is by default bigendian, most ARM
> systems are little-endian.

That is all I was asking.

> > there was special handling done in common/cmd_ide.c for input_swap_data(),
> > but not for input_data().  It would seem to me that if one of them was
> > in the wrong endian mode, the other other would be as well, or did I miss
> IIRC this has been discussed before.

Yes it has, but the current workaround requires byteswapping the entire CF
card on the PC platform before it can be used by the AU1500.  This will be
very inconvenient for my application.  I want to correct that so the CF
card can be moved between the PC and AU1500 with standard partitions and
filesystems.  In looking at the code I only saw where the little-endian
issue was addressed for only one function and I didn't know if that was
really the only place it needed to be addressed.  My initial experiments
seem to suggest that at least the input_data_shorts() function also needs
to handle things differently for little-endian, at least on the AU1500.
Making it swap bytes makes the AU1500 able to read at least the partition
table on a CF card without the bytes being swapped.  This led me to wonder
if anyone else was having these problems in little-endian mode or if it
was just me.

Ed Okerson

More information about the U-Boot mailing list