[U-Boot-Users] MIPS, little endian, supported cross tool versions?

Hi all,
I'm trying to port U-Boot 1.0.0 to a new board containing a MIPS 5Kf core. After adjusting the compiler flags / linker scripts for little-endian, I run into these errors, compiling a RAM based version first:
mipsel-uclibc-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0x80100000 -I/opt/work/fw/bootloader/u-boot-1.0.0.work/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/toolchains/toolchain_mipsel/lib/gcc-lib/mipsel-linux/3.3.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -mips2 -EL -mabicalls -c -o start.o /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S mipsel-uclibc-gcc: unrecognized option `-EL' /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S: Assembler messages: /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:242: Error: Cannot branch to undefined symbol. /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:247: Error: Cannot branch to undefined symbol. /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:259: Error: Cannot branch to undefined symbol.
cross gcc version is 3.3.1, gas "2.1.4.90.0.5 20030722".
I couldn't find any hints on recommended tools for the MIPS port of U-Boot in the docs.
Is my setup doomed to fail or may I get a working bootloader with some reasonable effort? (I may stick to my old bootloader as well)
TIA.
/Jörg

In message 316F79677E35D411B196001083CFC2DA01A6D9D2@ganymed.bln.advaoptical.com you wrote:
I'm trying to port U-Boot 1.0.0 to a new board containing a MIPS 5Kf core. After adjusting the compiler flags / linker scripts for little-endian, I run into these errors, compiling a RAM based version first:
mipsel-uclibc-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0x80100000 -I/opt/work/fw/bootloader/u-boot-1.0.0.work/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/toolchains/toolchain_mipsel/lib/gcc-lib/mipsel-linux/3.3.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -mips2 -EL -mabicalls -c -o start.o /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S mipsel-uclibc-gcc: unrecognized option `-EL'
It seems obvious that your tools and or compiler options are broken and/or misconfigured.
Where is this "-mips2 -EL" stuff coming from? You don't find this in U-Boot.
Is my setup doomed to fail or may I get a working bootloader with some reasonable effort?
This depends on your definition of "reasonable" ;-)
(I may stick to my old bootloader as well)
Obviously this is a tool problem first. I guess you will need to fix this anyway, or you will run into the same problems later when you want to compile your OS kernel and/or applications.
Best regards,
Wolfgang Denk

Hi Jörg,
I'm using U-BOOT on MIPS little-endian machines (R5000 and R4000)!!
U-BOOT's environment does not support mips little-endian, but it is easy to change for little-endian.
Please look my small patch attached.
Also I recommend MIPS SDE as the toolchains introduced at following URL.
http://www.linux-mips.org/toolchain.html
Masami Komiya
Jörg Albert wrote:
Hi all,
I'm trying to port U-Boot 1.0.0 to a new board containing a MIPS 5Kf core. After adjusting the compiler flags / linker scripts for little-endian, I run into these errors, compiling a RAM based version first:
mipsel-uclibc-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0x80100000 -I/opt/work/fw/bootloader/u-boot-1.0.0.work/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/toolchains/toolchain_mipsel/lib/gcc-lib/mipsel-linux/3.3.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -mips2 -EL -mabicalls -c -o start.o /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S mipsel-uclibc-gcc: unrecognized option `-EL' /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S: Assembler messages: /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:242: Error: Cannot branch to undefined symbol. /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:247: Error: Cannot branch to undefined symbol. /opt/work/fw/bootloader/u-boot-1.0.0.work/cpu/mips/start.S:259: Error: Cannot branch to undefined symbol.
cross gcc version is 3.3.1, gas "2.1.4.90.0.5 20030722".
I couldn't find any hints on recommended tools for the MIPS port of U-Boot in the docs.
Is my setup doomed to fail or may I get a working bootloader with some reasonable effort? (I may stick to my old bootloader as well)
TIA.
/Jörg
diff -ur u-boot-040403/Makefile u-boot-040403-mipsel/Makefile --- u-boot-040403/Makefile 2004-04-03 01:31:12.000000000 +0900 +++ u-boot-040403-mipsel/Makefile 2004-04-09 12:47:03.000000000 +0900 @@ -67,7 +67,7 @@ endif endif ifeq ($(ARCH),mips) -CROSS_COMPILE = mips_4KC- +CROSS_COMPILE = mipsel-linux- endif ifeq ($(ARCH),nios) CROSS_COMPILE = nios-elf- diff -ur u-boot-040403/cpu/mips/config.mk u-boot-040403-mipsel/cpu/mips/config.mk --- u-boot-040403/cpu/mips/config.mk 2004-04-03 01:31:13.000000000 +0900 +++ u-boot-040403-mipsel/cpu/mips/config.mk 2004-04-09 13:04:42.000000000 +0900 @@ -21,4 +21,4 @@ # MA 02111-1307 USA #
-PLATFORM_CPPFLAGS += -mcpu=4kc -EB -mabicalls +PLATFORM_CPPFLAGS += -mcpu=r5000 -EL -mabicalls diff -ur u-boot-040403/examples/mips.lds u-boot-040403-mipsel/examples/mips.lds --- u-boot-040403/examples/mips.lds 2004-04-03 01:31:14.000000000 +0900 +++ u-boot-040403-mipsel/examples/mips.lds 2004-04-09 12:47:03.000000000 +0900 @@ -24,7 +24,9 @@ /* OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") */ +/* OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") +*/ OUTPUT_ARCH(mips) SECTIONS {
participants (3)
-
Jörg Albert
-
Masami Komiya
-
Wolfgang Denk