[U-Boot] [PATCH 2/2] fit: Fix little endian target support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Nov 18 11:19:55 CET 2008


On 10:52 Tue 18 Nov     , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20081118093333.GK20874 at game.jcrosoft.org> you wrote:
> >
> > > Hm.... do you consider this a style cleanup, or is there any real
> > > problem that needs fixing?
> > on little endian it does not compile
> 
> What do you mena - on little endian? I didn't see any build problems
> for any of the ARM or le MIPS boards?
> 
> > > >  #if __BYTE_ORDER == __LITTLE_ENDIAN
> > > > +#ifdef USE_HOSTCC
> > > >  #define fdt32_to_cpu(x)		bswap_32(x)
> > > >  #define cpu_to_fdt32(x)		bswap_32(x)
> > > >  #define fdt64_to_cpu(x)		bswap_64(x)
> > > >  #define cpu_to_fdt64(x)		bswap_64(x)
> > > >  #else
> > > > +#define fdt32_to_cpu(x)		cpu_to_be32(x)
> > > > +#define cpu_to_fdt32(x)		cpu_to_be32(x)
> > > > +#define fdt64_to_cpu(x)		cpu_to_be64(x)
> > > > +#define cpu_to_fdt64(x)		cpu_to_be64(x)
> > > > +#endif /* USE_HOSTCC */
> > > 
> > > This is IMO wrong. If we implement such a change,  then  fdt32_to_cpu
> > > should translate to be32_to_cpu, and fdt64_to_cpu should translate to
> > > be64_to_cpu.
> > > 
> > > But actually I do not see the need for this change.
> > I've try some arm little endian platfrom without it it does not compile at all
> 
> What exactly is the error?
bswap_32 and bswap_64 not found when compilling u-boot itself

Best Regards,
J.


More information about the U-Boot mailing list