[U-Boot] cross compiling fw_printenv on big endian

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Mar 17 15:22:21 CET 2010



Wolfgang Denk <wd at denx.de> wrote on 2010/03/17 12:57:31:
>
> Dear Joakim Tjernlund,
>
> In message <OFF4AB0804.BE309218-ONC12576E9.003A69DF-C12576E9.
> 003B4D86 at transmode.se> you wrote:
> >
> > hmm, I recently discovered that normal user space headers always define
> > both __LITTLE_ENDIAN and __BIG_ENDIAN so therefore a
> > # ifdef __LITTLE_ENDIAN
> > #  define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)
> > # else
> > #  define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
> > # endif
> >
> > Wont work. One have to use
> >  #if __BYTE_ORDER == __LITTLE_ENDIAN
> > instead.
>
> Wenn...

>
>     Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
>
>
> Looks as if this were your very own commit. Do you have a fix in the
> works?

I know, but I don't have anything ATM. I am too busy debugging serious
customer problems.

     Jocke



More information about the U-Boot mailing list