From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Dyer Date: Tue, 9 Aug 2005 18:23:59 -0500 Subject: [U-Boot-Users] Re: MIPS LE build problems In-Reply-To: <42F92903.8040306@corelatus.se> References: <20050808211326.96F9D353A49@atlas.denx.de> <42F8E0F5.7040208@corelatus.se> <1123616824.16422.2.camel@orionlinux.starfleet.com> <42F92903.8040306@corelatus.se> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 8/9/05, Thomas Lange 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.