[U-Boot-Users] Re: MIPS LE build problems

Andrew Dyer amdyer at gmail.com
Wed Aug 10 01:23:59 CEST 2005


On 8/9/05, Thomas Lange <thomas at corelatus.se> wrote:
> It seems that Wolfgangs original message got lost somewhere.
> 
> I have attached the patch.
> 
> /Thomas

I think the board linker scripts also need to be modified to
work with either big or little endian toolchains like below.  The third
argument to OUTPUT_FORMAT is only used for explicitly little endian
compilation.

--- /home/adyer/Projects/u-boot/board/dbau1x00/u-boot.lds      
2005-07-25 20:11:54.000000000 -0500
+++ u-boot.lds  2005-07-10 18:17:44.000000000 -0500
@@ -22,9 +22,9 @@
  */

 /*
-OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
+OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
 */
-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
+OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
 OUTPUT_ARCH(mips)
 ENTRY(_start)
 SECTIONS

The test that decides which endianess to build is not going to work for
toolchains other than Denx ones, lots of them have prefixes that don't
include 4KCle (they may not build u-boot very well, but that's another issue)

I would suggest doing it by config name and putting ENDIANNESS in
config.mk something like so (untested):

dbau1550_config \
dbau1550_el_config	:	unconfig
	@ >include/config.h
	@[ -z "$(findstring _el,$@)" ] || \
		{ echo "ENDIANNESS = little" >>include/config.mk ; \
		  echo "little endian" ; \
		}
	@echo "#define CONFIG_DBAU1550 1" >>include/config.h
	@./mkconfig -a dbau1x00 mips mips dbau1x00

and test for endianness in cpu/mips/config.mk and do the right thing.


-- 
Hardware, n.:
        The parts of a computer system that can be kicked.




More information about the U-Boot mailing list