
Hi Daniel,
On Wed, Aug 20, 2014 at 1:23 PM, Daniel Schwierzeck daniel.schwierzeck@gmail.com wrote:
On 20.08.2014 11:35, Vasili Galka wrote:
Hi,
What is the recommended tool-chain to verify compilation of MIPS boards?
you could try
Denx ELDK 5.5 for MIPS http://www.denx.de/wiki/ELDK-5/WebHome
or
Mentor Sourcery CodeBench Lite Edition for MIPS ELF https://sourcery.mentor.com/GNUToolchain/subscription3537?lite=MIPS
I tried the one from https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/ But it does not work, throws plenty of errors about hard/soft float.
Similar to ARM you can use the built-in libgcc implementation of U-Boot with "export USE_PRIVATE_LIBGCC=yes" (before Kbuild/Kconfig) or "CONFIG_USE_PRIVATE_LIBGCC=y".
Actually you would need a full multilib toolchain with different libgcc or multiple toolchains to build all BE/LE and hard-float/soft-float variants. But that is not feasible, so you should always set USE_PRIVATE_LIBGCC. USE_PRIVATE_LIBGCC is also required for ELDK toolchains.
BTW: "MAKEALL -a mips" with the kernel.org toolchain and USE_PRIVATE_LIBGCC works
--
- Daniel
Strangely, I still fail to build. I'm trying on u-boot/master 6d1966e12 (dated Aug 1st 2014) Building with the following commands, on clean build directory:
export BUILD_DIR=/home/lab/dev/u-boot/out/all_mips export USE_PRIVATE_LIBGCC=yes export CROSS_COMPILE=mips-linux- ./MAKEALL -a mips
Here is what I get with the toolchain from kernel.org:
Building qemu_mips board... text data bss dec hex filename 223063 8160 217752 448975 6d9cf /home/lab/dev/u-boot/out/all_mips/u-boot mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by arch/mips/cpu/mips32/built-in.o), /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o) uses -mhard-float mips-linux-ld.bfd: Warning: u-boot uses -msoft-float (set by arch/mips/cpu/mips32/built-in.o), /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o) uses -mhard-float Building qemu_mipsel board... make[1]: *** [u-boot] Error 1 make: *** [sub-make] Error 2 mips-linux-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file mips-linux-ld.bfd: /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): compiled for a big endian system and target is little endian mips-linux-ld.bfd: /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): endianness incompatible with that of the selected emulation mips-linux-ld.bfd: failed to merge target specific data of file /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o) mips-linux-ld.bfd: /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): compiled for a big endian system and target is little endian mips-linux-ld.bfd: /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): endianness incompatible with that of the selected emulation mips-linux-ld.bfd: failed to merge target specific data of file /usr/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o) make[1]: *** [u-boot] Error 1 make: *** [sub-make] Error 2
and here is what I get with Mentor Sourcery CodeBench Lite Edition: (Replacing to CROSS_COMPILE=mips-sde-elf-)
Building qemu_mips board... arch/mips/cpu/mips32/start.o: error adding symbols: Bad value make[1]: *** [u-boot] Error 1 make: *** [sub-make] Error 2 mips-sde-elf-size: '/home/lab/dev/u-boot/out/all_mips/u-boot': No such file mips-sde-elf-ld: board/qemu-mips/lowlevel_init.o: warning: linking abicalls files with non-abicalls files mips-sde-elf-ld: arch/mips/cpu/mips32/cpu.o: warning: linking abicalls files with non-abicalls files /home/lab/dev/u-boot/common/cli_simple.c: In function 'process_macros': /home/lab/dev/u-boot/common/cli_simple.c:73:2: warning: format '%zd' expects argument of type 'signed size_t', but argument 2 has type '__kernel_size_t' [-Wformat=] debug_parser("[PROCESS_MACROS] INPUT len %zd: "%s"\n", strlen(input), ^ /home/lab/dev/u-boot/common/cli_simple.c:162:2: warning: format '%zd' expects argument of type 'signed size_t', but argument 2 has type '__kernel_size_t' [-Wformat=] debug_parser("[PROCESS_MACROS] OUTPUT len %zd: "%s"\n", ^ /home/lab/dev/u-boot/lib/lzma/LzmaTools.c: In function 'lzmaBuffToBuffDecompress': /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:94:5: warning: format '%zx' expects argument of type 'size_t', but argument 2 has type 'SizeT' [-Wformat=] debug("LZMA: Uncompresed size............ 0x%zx\n", outSizeFull); ^ /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:95:5: warning: format '%zx' expects argument of type 'size_t', but argument 2 has type 'SizeT' [-Wformat=] debug("LZMA: Compresed size.............. 0x%zx\n", compressedSize); ^ /home/lab/dev/u-boot/lib/lzma/LzmaTools.c:115:5: warning: format '%zx' expects argument of type 'size_t', but argument 2 has type 'SizeT' [-Wformat=] debug("LZMA: Uncompresed ................ 0x%zx\n", outProcessed); ^ /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_export': /home/lab/dev/u-boot/common/cmd_nvedit.c:914:3: warning: format '%zX' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=] sprintf(buf, "%zX", (size_t)len); ^ /home/lab/dev/u-boot/common/cmd_nvedit.c: In function 'do_env_import': /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=] printf("## Info: input data size = %zu = 0x%zX\n", size, size); ^ /home/lab/dev/u-boot/common/cmd_nvedit.c:1047:3: warning: format '%zX' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=] /home/lab/dev/u-boot/lib/hashtable.c: In function 'hexport_r': /home/lab/dev/u-boot/lib/hashtable.c:605:2: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=] debug("EXPORT table = %p, htab.size = %d, htab.filled = %d, " ^ /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=] "but need %zu\n", size, totlen + 1); ^ /home/lab/dev/u-boot/lib/hashtable.c:661:5: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=] /home/lab/dev/u-boot/lib/hashtable.c: In function 'himport_r': /home/lab/dev/u-boot/lib/hashtable.c:793:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=] debug("himport_r: can't malloc %zu bytes\n", size); ^ mips-sde-elf-ld: arch/mips/cpu/mips32/start.o: relocation R_MIPS_HI16 against `lowlevel_init' can not be used when making a shared object; recompile with -fPIC arch/mips/cpu/mips32/start.o: error adding symbols: Bad value make[1]: *** [u-boot] Error 1 make: *** [sub-make] Error 2
I would appreciate your assistance.
Best, Vasili