[U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image..
ito at mlb.co.jp
ito at mlb.co.jp
Thu Apr 6 14:55:48 CEST 2006
Dear Thomas
From: Thomas Lange <thomas at corelatus.se>
Subject: [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image..
Date: Thu, 06 Apr 2006 11:03:54 +0200
Message-Id: <4434D97A.6070701 at corelatus.se>
> Hi.
>
> Use dbau1550 for big endian version.
>
> Use dbau1550_el for little endian version.
>
> Your toolchain is little endian.
No. I think problems are in linker script.
I use sdelinux-5.03.06-1 (gcc-2.96) and gcc-3.3.4 from uClibc toolchain.
both compiler needs to apply attached changes.
Maybe your compiler can generate a file for little-endian code to big-endian
binary format. but sdelinux or uClibc toolchain are not.
Please report If your compiler does not have problems with this patch,
if it is noproblem, consider to marge this. > support at denx.de
What I change is:
remove OUTPUT_FORMAT: It will use default format.
remove -EL or -EB : It will use toolchain default.
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255 FAX +81-3-5294-7256
-------------- next part --------------
diff --git a/board/dbau1x00/u-boot.lds b/board/dbau1x00/u-boot.lds
index 10c9917..0f17f80 100644
--- a/board/dbau1x00/u-boot.lds
+++ b/board/dbau1x00/u-boot.lds
@@ -23,8 +23,8 @@
/*
OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
-*/
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
+*/
OUTPUT_ARCH(mips)
ENTRY(_start)
SECTIONS
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index c357615..9ae20bd 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -21,7 +21,7 @@
# MA 02111-1307 USA
#
v=$(shell \
-mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
+${CROSS_COMPILE}as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
MIPSFLAGS=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \
@@ -29,12 +29,6 @@ else \
echo "-march=4kc -mtune=4kc"; \
fi)
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
-ENDIANNESS = -EL
-else
-ENDIANNESS = -EB
-endif
-
MIPSFLAGS += $(ENDIANNESS) -mabicalls
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
diff --git a/examples/Makefile b/examples/Makefile
index fee2674..b3f20c3 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -34,7 +34,7 @@ LOAD_ADDR = 0xc100000
endif
ifeq ($(ARCH),mips)
-LOAD_ADDR = 0x80200000 -T mips.lds
+LOAD_ADDR = 0x80200000 -L $(gcclibdir) -T mips.lds
endif
ifeq ($(ARCH),nios)
diff --git a/examples/mips.lds b/examples/mips.lds
index 9d9849b..24d0f27 100644
--- a/examples/mips.lds
+++ b/examples/mips.lds
@@ -21,10 +21,6 @@
* MA 02111-1307 USA
*/
-/*
-OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips")
-*/
-OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
OUTPUT_ARCH(mips)
SECTIONS
{
More information about the U-Boot
mailing list