[U-Boot] [PATCH v3] MIPS: fix endianess handling

Mike Frysinger vapier at gentoo.org
Fri Dec 16 19:12:55 CET 2011


On Sunday 11 December 2011 11:53:11 Daniel Schwierzeck wrote:
> --- a/README
> +++ b/README
> @@ -374,6 +374,12 @@ The following options need to be configured:
>  		Defines the string to utilize when trying to match PCIe device
>  		tree nodes for the given platform.
> 
> +- Generic CPU options:
> +		CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN
> +
> +		Defines the endianess of the CPU. Implementation of those
> +		values is arch specific.

might be useful to describe what these do.  something like:
Adds options to explicitly add compiler flags that select the desired 
endianness.  Otherwise, the endian will be whatever the toolchain defaults to.

> --- a/arch/mips/cpu/mips32/config.mk
> +++ b/arch/mips/cpu/mips32/config.mk
> 
> +ifdef CONFIG_SYS_LITTLE_ENDIAN
> +ENDIANNESS := -EL
> +endif
> +
> +ifdef CONFIG_SYS_BIG_ENDIAN
> +ENDIANNESS := -EB
> +endif

the GNU linker should treat -EL/-EB the same for all targets.  so we should be 
able to add to the common .mk files in the top level:
	LDFLAGS-$(CONFIG_SYS_LITTLE_ENDIAN) += -EL
	LDFLAGS-$(CONFIG_SYS_BIG_ENDIAN) += -EB
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111216/e7a4a6ac/attachment.pgp>


More information about the U-Boot mailing list