* [U-Boot-Users] Compiled system and target board mismatched while make U-boot image..
@ 2006-04-06 8:58 Charles C.K.Lai
2006-04-06 9:03 ` [U-Boot-Users] " Thomas Lange
0 siblings, 1 reply; 10+ messages in thread
From: Charles C.K.Lai @ 2006-04-06 8:58 UTC (permalink / raw)
To: u-boot
Dear Thomas,
I make my U-boot image from PC to DBAu1550,
I used GCC 3.4.4, with mipsel-linux-sdelinux-6.03.01-1 toolchain,
while I make my U-boot image with U-boot-1.1.4,
I got the following messages:
mipsel-linux-ld: hello_world.o: compiled for a little endian system and
target is big endian
mipsel-linux-ld: hello_world.o: endianness incompatible with that of the
selected emulation
mipsel-linux-ld: failed to merge target specific data of file
hello_world.o
I searched for related articles on U-Boot Website and Mailing lists,
but I can't find out any helpful messages to fix the problem.
Did I miss some patches? Do you have the reference material for this
problem?
Thanks a lot.
Charles C.K. Lai
^ permalink raw reply [flat|nested] 10+ messages in thread* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 8:58 [U-Boot-Users] Compiled system and target board mismatched while make U-boot image Charles C.K.Lai @ 2006-04-06 9:03 ` Thomas Lange 2006-04-06 12:55 ` ito at mlb.co.jp 2006-04-07 1:56 ` Charles C.K.Lai 0 siblings, 2 replies; 10+ messages in thread From: Thomas Lange @ 2006-04-06 9:03 UTC (permalink / raw) To: u-boot Hi. Use dbau1550 for big endian version. Use dbau1550_el for little endian version. Your toolchain is little endian. Regards, /Thomas Charles C.K.Lai wrote: > Dear Thomas, > > I make my U-boot image from PC to DBAu1550, > I used GCC 3.4.4, with mipsel-linux-sdelinux-6.03.01-1 toolchain, > while I make my U-boot image with U-boot-1.1.4, > I got the following messages: > > mipsel-linux-ld: hello_world.o: compiled for a little endian system and > target is big endian > mipsel-linux-ld: hello_world.o: endianness incompatible with that of the > selected emulation > mipsel-linux-ld: failed to merge target specific data of file > hello_world.o > > I searched for related articles on U-Boot Website and Mailing lists, > but I can't find out any helpful messages to fix the problem. > Did I miss some patches? Do you have the reference material for this > problem? > Thanks a lot. > > Charles C.K. Lai > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 9:03 ` [U-Boot-Users] " Thomas Lange @ 2006-04-06 12:55 ` ito at mlb.co.jp 2006-04-06 20:31 ` Thomas Lange 2006-04-07 1:56 ` Charles C.K.Lai 1 sibling, 1 reply; 10+ messages in thread From: ito at mlb.co.jp @ 2006-04-06 12:55 UTC (permalink / raw) To: u-boot Dear Thomas From: Thomas Lange <thomas@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@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 { ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 12:55 ` ito at mlb.co.jp @ 2006-04-06 20:31 ` Thomas Lange 2006-04-06 23:05 ` Wolfgang Denk 0 siblings, 1 reply; 10+ messages in thread From: Thomas Lange @ 2006-04-06 20:31 UTC (permalink / raw) To: u-boot ito at mlb.co.jp wrote: >> 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. This is not a dbau1550 question IMHO. It is an endian question for mips platforms and I am not qualified to determine if it is correct or not. I use big endian and ELDK ;-) Wolfgang? Regards, /Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 20:31 ` Thomas Lange @ 2006-04-06 23:05 ` Wolfgang Denk 2006-04-07 5:40 ` ito at mlb.co.jp 2006-04-07 5:55 ` ito at mlb.co.jp 0 siblings, 2 replies; 10+ messages in thread From: Wolfgang Denk @ 2006-04-06 23:05 UTC (permalink / raw) To: u-boot In message <44357A9C.8010907@corelatus.se> you wrote: > > This is not a dbau1550 question IMHO. It is an endian question for mips > platforms and I am not qualified to determine if it is correct or not. > I use big endian and ELDK ;-) > > Wolfgang? Yessir!! I'm here at work. What's up? Ummm... What shall I say? ELDK for MIPS supports both LE and BE configurations, and both work just fine, except for the fact that the dbau1x00 port produces warnings because it is broken as it uses a definition of HZ which is not 1000: -> export CROSS_COMPILE=mips_4KC- -> ./MAKEALL dbau1550 Configuring for dbau1x00 board... net.c: In function `NetStartAgain': net.c:597: warning: integer overflow in expression xyzModem.c: In function `xyzModem_stream_open': xyzModem.c:455: warning: unused variable `console_chan' text data bss dec hex filename 127896 4548 22864 155308 25eac u-boot -> export CROSS_COMPILE=mips_4KCle- -> ./MAKEALL dbau1550_el Configuring for dbau1x00 board... net.c: In function `NetStartAgain': net.c:597: warning: integer overflow in expression xyzModem.c: In function `xyzModem_stream_open': xyzModem.c:455: warning: unused variable `console_chan' text data bss dec hex filename 130072 4548 22864 157484 2672c u-boot IMHO it's clearly a toolchain problem, but who am I to know such things? Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We fight only when there is no other choice. We prefer the ways of peaceful contact. -- Kirk, "Spectre of the Gun", stardate 4385.3 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 23:05 ` Wolfgang Denk @ 2006-04-07 5:40 ` ito at mlb.co.jp 2006-04-07 5:55 ` ito at mlb.co.jp 1 sibling, 0 replies; 10+ messages in thread From: ito at mlb.co.jp @ 2006-04-07 5:40 UTC (permalink / raw) To: u-boot Hello Wolfgang > Ummm... What shall I say? ELDK for MIPS supports both LE and BE > configurations, and both work just fine, except for the fact that > the Thank you for reply. ELDK user is ok. but with mipsel-linux-gcc, and to comile for little, there is a 2 problem. 1. always add -EB to compiler. -- cpu/mips/config.mk --- ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) ENDIANNESS = -EL else ENDIANNESS = -EB endif this means, to compile for little endian, part of cross compiler name have to has a name of "4KCle". otherwise, it will put -EB. I think, we do not need to put -EL or -EB, compiler default is enough. 2. examples/mips.lds?board/dbau1x00/u-boot.lds OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") this specify bigendian format. mipsel-linux-ld -g -Ttext 0x80200000 -T mips.lds \ -o hello_world -e hello_world hello_world.o libstubs.a \ -L/usr/src/mldbox/gcc-3.3.x/toolchain_mipsel/bin-ccache/../lib/gcc-lib/mipsel-linux-uclibc/3.3.4 -lgcc mipsel-linux-ld: hello_world.o: compiled for a little endian system and target is big endian mipsel-linux-ld: hello_world.o: endianness incompatible with that of the selected emulation File in wrong format: failed to merge target specific data of file hello_world.omipsel-linux-ld: libstubs.a(stubs.o): compiled for a little endian system and target is big endian mipsel-linux-ld: libstubs.a(stubs.o): endianness incompatible with that of the selected emulation File in wrong format: failed to merge target specific data of file libstubs.a(stubs.o) To fix these error, I need to change OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") to OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips") or deleteing this line also work. so, if ELDK works, without this line, please delete it. -------- Hiroshi Ito Media Lab. Inc., URL http://www.mlb.co.jp ( Sorry, Japanese only. ) TEL +81-3-5294-7255 FAX +81-3-5294-7256 > dbau1x00 port produces warnings because it is broken as it uses a > definition of HZ which is not 1000: > > -> export CROSS_COMPILE=mips_4KC- > -> ./MAKEALL dbau1550 > Configuring for dbau1x00 board... > net.c: In function `NetStartAgain': > net.c:597: warning: integer overflow in expression > xyzModem.c: In function `xyzModem_stream_open': > xyzModem.c:455: warning: unused variable `console_chan' > text data bss dec hex filename > 127896 4548 22864 155308 25eac u-boot > > -> export CROSS_COMPILE=mips_4KCle- > -> ./MAKEALL dbau1550_el > Configuring for dbau1x00 board... > net.c: In function `NetStartAgain': > net.c:597: warning: integer overflow in expression > xyzModem.c: In function `xyzModem_stream_open': > xyzModem.c:455: warning: unused variable `console_chan' > text data bss dec hex filename > 130072 4548 22864 157484 2672c u-boot > > > IMHO it's clearly a toolchain problem, but who am I to know such things? > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > We fight only when there is no other choice. We prefer the ways of > peaceful contact. > -- Kirk, "Spectre of the Gun", stardate 4385.3 > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > U-Boot-Users mailing list > U-Boot-Users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/u-boot-users > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 23:05 ` Wolfgang Denk 2006-04-07 5:40 ` ito at mlb.co.jp @ 2006-04-07 5:55 ` ito at mlb.co.jp 1 sibling, 0 replies; 10+ messages in thread From: ito at mlb.co.jp @ 2006-04-07 5:55 UTC (permalink / raw) To: u-boot # Sorry, I put a Japanese character in last mail. # Sending again Hello Wolfgang > Ummm... What shall I say? ELDK for MIPS supports both LE and BE > configurations, and both work just fine, except for the fact that > the Thank you for reply. ELDK user is ok. but with mipsel-linux-gcc, and to comile for little, there is a 2 problem. 1. always add -EB to compiler. -- cpu/mips/config.mk --- ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) ENDIANNESS = -EL else ENDIANNESS = -EB endif this means, to compile for little endian, part of cross compiler name have to has a name of "4KCle". otherwise, it will put -EB. I think, we do not need to put -EL or -EB, compiler default is enough. 2. examples/mips.lds, board/dbau1x00/u-boot.lds OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") this specify bigendian format. mipsel-linux-ld -g -Ttext 0x80200000 -T mips.lds \ -o hello_world -e hello_world hello_world.o libstubs.a \ -L/usr/src/mldbox/gcc-3.3.x/toolchain_mipsel/bin-ccache/../lib/gcc-lib/mipsel-linux-uclibc/3.3.4 -lgcc mipsel-linux-ld: hello_world.o: compiled for a little endian system and target is big endian mipsel-linux-ld: hello_world.o: endianness incompatible with that of the selected emulation File in wrong format: failed to merge target specific data of file hello_world.omipsel-linux-ld: libstubs.a(stubs.o): compiled for a little endian system and target is big endian mipsel-linux-ld: libstubs.a(stubs.o): endianness incompatible with that of the selected emulation File in wrong format: failed to merge target specific data of file libstubs.a(stubs.o) To fix these error, I need to change OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") to OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips") or deleteing this line also work. so, if ELDK works, without this line, please delete it. -------- Hiroshi Ito Media Lab. Inc., URL http://www.mlb.co.jp ( Sorry, Japanese only. ) TEL +81-3-5294-7255 FAX +81-3-5294-7256 > dbau1x00 port produces warnings because it is broken as it uses a > definition of HZ which is not 1000: > > -> export CROSS_COMPILE=mips_4KC- > -> ./MAKEALL dbau1550 > Configuring for dbau1x00 board... > net.c: In function `NetStartAgain': > net.c:597: warning: integer overflow in expression > xyzModem.c: In function `xyzModem_stream_open': > xyzModem.c:455: warning: unused variable `console_chan' > text data bss dec hex filename > 127896 4548 22864 155308 25eac u-boot > > -> export CROSS_COMPILE=mips_4KCle- > -> ./MAKEALL dbau1550_el > Configuring for dbau1x00 board... > net.c: In function `NetStartAgain': > net.c:597: warning: integer overflow in expression > xyzModem.c: In function `xyzModem_stream_open': > xyzModem.c:455: warning: unused variable `console_chan' > text data bss dec hex filename > 130072 4548 22864 157484 2672c u-boot > > > IMHO it's clearly a toolchain problem, but who am I to know such things? > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > We fight only when there is no other choice. We prefer the ways of > peaceful contact. > -- Kirk, "Spectre of the Gun", stardate 4385.3 > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > U-Boot-Users mailing list > U-Boot-Users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/u-boot-users > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ U-Boot-Users mailing list U-Boot-Users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-06 9:03 ` [U-Boot-Users] " Thomas Lange 2006-04-06 12:55 ` ito at mlb.co.jp @ 2006-04-07 1:56 ` Charles C.K.Lai 2006-04-12 9:31 ` ito at mlb.co.jp 1 sibling, 1 reply; 10+ messages in thread From: Charles C.K.Lai @ 2006-04-07 1:56 UTC (permalink / raw) To: u-boot Dear Thomas, My procedure is: make dbau1550_el_config make dep make all and I modified the following files to fit the toolchain: Makefile: ifeq ($(ARCH),mips) CROSS_COMPILE = mipsel-linux- cpu/mips/config.mk: v=$(shell \ mipsel-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') ifneq (,$(findstring mipsel,$(CROSS_COMPILE))) Do I miss some files to meet the toolchain? Thanks a lot. Charles C.K. Lai ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image.. 2006-04-07 1:56 ` Charles C.K.Lai @ 2006-04-12 9:31 ` ito at mlb.co.jp 0 siblings, 0 replies; 10+ messages in thread From: ito at mlb.co.jp @ 2006-04-12 9:31 UTC (permalink / raw) To: u-boot Hello Charles, > cpu/mips/start.o /home/charles/work/u-boot-1.1.4/cpu/mips/start.S > cc1: error: invalid option `-mcpu=4kc' I'm sorry, but I do not know about mipsel-linux-sdelinux-6.03.01-1. I use sdelinux-5.03.06-1(2.96-sdelinuxmips-040127). maybe, use -mcpu=r4400 or -mips32 insted. -------- Hiroshi Ito Media Lab. Inc., URL http://www.mlb.co.jp ( Sorry, Japanese only. ) TEL +81-3-5294-7255 FAX +81-3-5294-7256 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot-Users] Re: Compiled system and target board mismatched while make U-boot image..
@ 2006-04-11 7:57 Charles C.K.Lai
0 siblings, 0 replies; 10+ messages in thread
From: Charles C.K.Lai @ 2006-04-11 7:57 UTC (permalink / raw)
To: u-boot
Dear Hiroshi,
I modified the files with your patches,
and made my u-boot image again,
I got the following error message:
cpu/mips/start.o /home/charles/work/u-boot-1.1.4/cpu/mips/start.S
cc1: error: invalid option `-mcpu=4kc'
Does it mean the cpu selection was wrong?
Thanks a lot.
Charles C.K. Lai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060411/da7849af/attachment.htm
^ permalink raw reply [flat|nested] 10+ messages in threadend of thread, other threads:[~2006-04-12 9:31 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-04-06 8:58 [U-Boot-Users] Compiled system and target board mismatched while make U-boot image Charles C.K.Lai 2006-04-06 9:03 ` [U-Boot-Users] " Thomas Lange 2006-04-06 12:55 ` ito at mlb.co.jp 2006-04-06 20:31 ` Thomas Lange 2006-04-06 23:05 ` Wolfgang Denk 2006-04-07 5:40 ` ito at mlb.co.jp 2006-04-07 5:55 ` ito at mlb.co.jp 2006-04-07 1:56 ` Charles C.K.Lai 2006-04-12 9:31 ` ito at mlb.co.jp -- strict thread matches above, loose matches on Subject: below -- 2006-04-11 7:57 Charles C.K.Lai
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.