On Tue, Jul 20, 2010 at 4:37 AM, Wolfgang Denk <w...@denx.de> wrote: > Dear Xiangfu Liu, > > In message <4c453325.4080...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot