[U-Boot-Users] linking u-boot for mips little endian w/ hardhat tools.
Charles Eidsness
charles.eidsness at ieee.org
Fri Oct 8 20:54:06 CEST 2004
Hi Mike,
If you change the file format to tradlittlemips then you'll also need to
compile using the little endian flag (-EL) instead of the default big
endian flag (-EB) flag. If you haven't already you'll probably have to
do something like this:
--- cpu/mips/config.mk 2003-06-27 17:32:33.000000000 -0400
+++ cpu/mips/config.mk 2004-10-04 16:09:31.612045528 -0400
@@ -21,4 +21,4 @@
# MA 02111-1307 USA
#
-PLATFORM_CPPFLAGS += -mcpu=4kc -EB -mabicalls
+PLATFORM_CPPFLAGS += -mcpu=4kc -EL -mabicalls
Hope that helps,
Charles
C Michael Sundius wrote:
> Hi,
>
> I am trying to port u-boot to a system w/ a mips 4kc little endian processor.
>
> in looking at other cpu/boards to use as a starting point/template, I chose
> the tb0229 board as it looked to also be a 4kc little endian cpu.
>
> when I build, I get the an undefined reference to _GLOBAL_OFFSET_TABLE_.
>
> I did some fiddling aroud, and comparing to linker command files for other
> boards and I found that the line:
>
> OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips",\
> "elf32-tradlittlemips")
>
> if changed to:
>
> OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
>
> will allow me to compile and link fine...
>
> my question is then:
>
> 1) what does this really do?
> 2) if I'm using a little endian cpu, do I really need it set to
> elf32-tradlittlemips?
> 3) if so how do I solve my problem?
> 4) if not why?
>
> one more note the compiler/toolchain that I'm using is from montavista, the -v
> option displays the following:
>
> ======================================
> mips_fp_le-gcc -v
> Reading specs from /opt/hardhat/devkit/mips/fp_le/lib/gcc-lib/
> mipsel-hardhat-linux/3.2.1/specs
> Configured with: ../configure --host=i686-pc-linux-gnu
> --target=mipsel-hardhat-linux --prefix=/opt/hardhat/devkit/mips/fp_le
> --exec-prefix=/opt/hardhat/devkit/mips/fp_le --bindir=/opt/hardhat/devkit/
> mips/fp_le/bin --sbindir=/opt/hardhat/devkit/mips/fp_le/sbin --sysconfdir=/
> opt/hardhat/devkit/mips/fp_le/etc --datadir=/opt/hardhat/devkit/mips/fp_le/
> share --includedir=/opt/hardhat/devkit/mips/fp_le/include --libdir=/opt/
> hardhat/devkit/mips/fp_le/lib --libexecdir=/opt/hardhat/devkit/mips/fp_le/
> libexec --localstatedir=/opt/hardhat/devkit/mips/fp_le/var --sharedstatedir=/
> opt/hardhat/devkit/mips/fp_le/share --mandir=/opt/hardhat/devkit/mips/fp_le/
> man --infodir=/opt/hardhat/devkit/mips/fp_le/info
> --program-transform-name=s,^,mips_fp_le-, --enable-cross
> --with-gxx-include-dir=${prefix}/mipsel-hardhat-linux/include/g++-v3
> --enable-shared --enable-languages=c,c++ --enable-threads=posix
> --enable-__cxa_atexit --disable-multilib
> Thread model: posix
> gcc version 3.2.1 20020930 (MontaVista)
> =======================================
>
> thanks for any help you can offer...(sorry this is maybe more of a tool
> related question, but monta vista has not been much help as of yet).
>
> Mike
> ~
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
More information about the U-Boot
mailing list