* [U-Boot] question about example/standalone/mips.lds
@ 2010-07-19 3:47 "Xiangfu Liu(刘向富)"
2010-07-19 17:51 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: "Xiangfu Liu(刘向富)" @ 2010-07-19 3:47 UTC (permalink / raw)
To: u-boot
Hi all
in this file :" example/standalone/mips.lds "
it indicate compile example as BIG mips. but my device is LITTLE mips.
so I simply comment this line[1]. I found other boards compile fine. without any error.
do I must compile this example?
is that ok to comment this line?
or what I need to to ?
thanks.
[1]
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
--
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-19 3:47 [U-Boot] question about example/standalone/mips.lds "Xiangfu Liu(刘向富)"
@ 2010-07-19 17:51 ` Wolfgang Denk
2010-07-20 5:24 ` Xiangfu Liu
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2010-07-19 17:51 UTC (permalink / raw)
To: u-boot
Dear =?UTF-8?B?IlhpYW5nZnUgTGl1KOWImOWQkeWvjCki?=,
In message <4C43CABB.3070302@openmobilefree.net> you wrote:
>
> in this file :" example/standalone/mips.lds "
> it indicate compile example as BIG mips. but my device is LITTLE mips.
> so I simply comment this line[1]. I found other boards compile fine. without any error.
>
> do I must compile this example?
> is that ok to comment this line?
> or what I need to to ?
All MIPS boards in mainline build fine without such a change - both
the BE and the LE ones.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I'm what passes for a Unix guru in my office. This is a frightening
concept. - Lee Ann Goldstein, in <3k55ba$c43@butch.lmsc.lockheed.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-19 17:51 ` Wolfgang Denk
@ 2010-07-20 5:24 ` Xiangfu Liu
2010-07-20 9:37 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Xiangfu Liu @ 2010-07-20 5:24 UTC (permalink / raw)
To: u-boot
Hi
which compiler in ELDK if for the mips_el system?
I guess there are some different between ELDK cross compiler
and OpenWrt cross compiler.
so I want try ELDK cross compiler with my board.
I found there are two mips_el boards[1] in MAKEALL.
I want know how those two boards handle this example.
give me some advice. ( I am learning :)
by the way, here[2] is the error message with OpenWrt's
cross compiler.
thanks for all your help.
---
[1]
dbau1550_el \
pb1000 \
make -C examples/standalone all
make[1]: Entering directory `/home/xiangfu/workspace/PanGu/u-boot.upstream/examples/standalone'
mipsel-openwrt-linux-ld -g -Ttext 0x80200000 -T mips.lds \
-o hello_world -e hello_world hello_world.o libstubs.a \
-L/home/xiangfu/workspace/PanGu/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3 -lgcc
mipsel-openwrt-linux-ld: hello_world.o: compiled for a little endian system and target is big endian
mipsel-openwrt-linux-ld: hello_world.o: endianness incompatible with that of the selected emulation
mipsel-openwrt-linux-ld: failed to merge target specific data of file hello_world.o
mipsel-openwrt-linux-ld: libstubs.a(stubs.o): compiled for a little endian system and target is big endian
mipsel-openwrt-linux-ld: libstubs.a(stubs.o): endianness incompatible with that of the selected emulation
mipsel-openwrt-linux-ld: failed to merge target specific data of file libstubs.a(stubs.o)
make[1]: *** [hello_world] Segmentation fault
make[1]: *** Deleting file `hello_world'
make[1]: Leaving directory `/home/xiangfu/workspace/PanGu/u-boot.upstream/examples/standalone'
make: *** [examples/standalone] Error 2
On 07/20/2010 01:51 AM, Wolfgang Denk wrote:
> In message<4C43CABB.3070302@openmobilefree.net> you wrote:
>>
>> in this file :" example/standalone/mips.lds "
>> it indicate compile example as BIG mips. but my device is LITTLE mips.
>> so I simply comment this line[1]. I found other boards compile fine. without any error.
>>
>> do I must compile this example?
>> is that ok to comment this line?
>> or what I need to to ?
>
> All MIPS boards in mainline build fine without such a change - both
> the BE and the LE ones.
>
> Best regards,
>
> Wolfgang Denk
>
--
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-20 5:24 ` Xiangfu Liu
@ 2010-07-20 9:37 ` Wolfgang Denk
2010-07-20 14:28 ` Xiangfu Liu
2010-07-20 15:29 ` Andrew Dyer
0 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Denk @ 2010-07-20 9:37 UTC (permalink / raw)
To: u-boot
Dear Xiangfu Liu,
In message <4C453325.4080003@openmobilefree.net> you wrote:
>
> which compiler in ELDK if for the mips_el system?
GCC, of course :-)
> I guess there are some different between ELDK cross compiler
> and OpenWrt cross compiler.
> so I want try ELDK cross compiler with my board.
You can download the installation image at
ftp://ftp.denx.de/pub/eldk/4.1/mips-linux-x86/iso/mips-2007-01-21.iso
> by the way, here[2] is the error message with OpenWrt's
> cross compiler.
...
> mipsel-openwrt-linux-ld -g -Ttext 0x80200000 -T mips.lds \
> -o hello_world -e hello_world hello_world.o libstubs.a \
> -L/home/xiangfu/workspace/PanGu/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3 -lgcc
> mipsel-openwrt-linux-ld: hello_world.o: compiled for a little endian system and target is big endian
Well, the "el" in "mipsel-..." mean "Endianess Little".
You cannot use these tools to build code for a BE system.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Those who do not understand Unix are condemned to reinvent it,
poorly. - Henry Spencer, University of Toronto Unix hack
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-20 9:37 ` Wolfgang Denk
@ 2010-07-20 14:28 ` Xiangfu Liu
2010-07-20 15:29 ` Andrew Dyer
1 sibling, 0 replies; 7+ messages in thread
From: Xiangfu Liu @ 2010-07-20 14:28 UTC (permalink / raw)
To: u-boot
Hi
sorry I misunderstand something. I download the ppc-2008-04-01.iso
and run "./MAKEALL" without any argument. that why it compile 300+ boards.
I should read MAKEALL more carefully.
now I am downloading "mips-2007-01-21.iso".
my board is mips EL system.
is that mean when I run "MAKEALL" I just need add mips_el?? like this one[1]
another question:
I found this in "MAKEALL":
LIST_au1xx0_el=" \
dbau1550_el \
pb1000 \
"
it shows that those two boards are Endianess Little System
but in board/pb1x00/u-boot.lds , board/dbau1x00/u-boot.lds line:27[2]
show that those two boards are both BE system?
is there something wrong or I misunderstand something
thanks for all your reply.
[2]
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
[1]
CROSS_COMPILE=mipsel-openwrt-linux- BUILD_DIR=../u-boot-build MAKEALL_LOGDIR=../u-boot-log ./MAKEALL mips_el
On 07/20/2010 05:37 PM, Wolfgang Denk wrote:
> Dear Xiangfu Liu,
>
> In message<4C453325.4080003@openmobilefree.net> you wrote:
>>
>> which compiler in ELDK if for the mips_el system?
>
> GCC, of course :-)
>
>> I guess there are some different between ELDK cross compiler
>> and OpenWrt cross compiler.
>> so I want try ELDK cross compiler with my board.
>
> You can download the installation image at
> ftp://ftp.denx.de/pub/eldk/4.1/mips-linux-x86/iso/mips-2007-01-21.iso
>
>> by the way, here[2] is the error message with OpenWrt's
>> cross compiler.
> ...
>> mipsel-openwrt-linux-ld -g -Ttext 0x80200000 -T mips.lds \
>> -o hello_world -e hello_world hello_world.o libstubs.a \
>> -L/home/xiangfu/workspace/PanGu/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3 -lgcc
>> mipsel-openwrt-linux-ld: hello_world.o: compiled for a little endian system and target is big endian
>
> Well, the "el" in "mipsel-..." mean "Endianess Little".
>
> You cannot use these tools to build code for a BE system.
>
> Best regards,
>
> Wolfgang Denk
>
--
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-20 9:37 ` Wolfgang Denk
2010-07-20 14:28 ` Xiangfu Liu
@ 2010-07-20 15:29 ` Andrew Dyer
2010-07-21 10:19 ` Xiangfu Liu
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Dyer @ 2010-07-20 15:29 UTC (permalink / raw)
To: u-boot
On Tue, Jul 20, 2010 at 4:37 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Xiangfu Liu,
>
> In message <4C453325.4080003@openmobilefree.net> you wrote:
>>
>> which compiler in ELDK if for the mips_el system?
>
> GCC, of course :-)
>
>> I guess there are some different between ELDK cross compiler
>> and OpenWrt cross compiler.
>> so I want try ELDK cross compiler with my board.
>
> You can download the installation image at
> ftp://ftp.denx.de/pub/eldk/4.1/mips-linux-x86/iso/mips-2007-01-21.iso
>
>> by the way, here[2] is the error message with OpenWrt's
>> cross compiler.
> ...
>> mipsel-openwrt-linux-ld -g -Ttext 0x80200000 -T mips.lds \
>> ? ? ? ? ? ? ? ? ? ? ? -o hello_world -e hello_world hello_world.o libstubs.a \
>> ? ? ? ? ? ? ? ? ? ? ? -L/home/xiangfu/workspace/PanGu/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3 -lgcc
>> mipsel-openwrt-linux-ld: hello_world.o: compiled for a little endian system and target is big endian
>
> Well, the "el" in "mipsel-..." mean "Endianess Little".
>
> You cannot use these tools to build code for a BE system.
>
No matter the compiler, I believe the lines in the linker scripts are
wrong (this is repeated all through the mips linker files in u-boot).
OUTPUT_FORMAT for mips is supposed to tell the linker what bfd output
format to generate given a link command of unspecifed(default), big,
and little endian formats.
The lines in the linker script say for a little endian command line
the output format is big endian, so I think the OP's toolchain did
what is expected - it made a big endian object file.
http://sources.redhat.com/binutils/docs-2.12/ld.info/Format-Commands.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] question about example/standalone/mips.lds
2010-07-20 15:29 ` Andrew Dyer
@ 2010-07-21 10:19 ` Xiangfu Liu
0 siblings, 0 replies; 7+ messages in thread
From: Xiangfu Liu @ 2010-07-21 10:19 UTC (permalink / raw)
To: u-boot
Hi Andrew
thanks for the link. I think we should add $(ENDIANNESS) when link
the hello_world.o.
I will send one patch in next email.
thanks again for the document.
On 07/20/2010 11:29 PM, Andrew Dyer wrote:
> No matter the compiler, I believe the lines in the linker scripts are
> wrong (this is repeated all through the mips linker files in u-boot).
> OUTPUT_FORMAT for mips is supposed to tell the linker what bfd output
> format to generate given a link command of unspecifed(default), big,
> and little endian formats.
>
> The lines in the linker script say for a little endian command line
> the output format is big endian, so I think the OP's toolchain did
> what is expected - it made a big endian object file.
>
> http://sources.redhat.com/binutils/docs-2.12/ld.info/Format-Commands.html
--
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-07-21 10:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 3:47 [U-Boot] question about example/standalone/mips.lds "Xiangfu Liu(刘向富)"
2010-07-19 17:51 ` Wolfgang Denk
2010-07-20 5:24 ` Xiangfu Liu
2010-07-20 9:37 ` Wolfgang Denk
2010-07-20 14:28 ` Xiangfu Liu
2010-07-20 15:29 ` Andrew Dyer
2010-07-21 10:19 ` Xiangfu Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox