All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Recommended MIPS toolchain
Date: Wed, 20 Aug 2014 14:20:02 +0200	[thread overview]
Message-ID: <53F49272.10104@gmail.com> (raw)
In-Reply-To: <CA+gZxsOxefvbrtcedYHqapxmotk-VU=KL38efhQ9ANGBU4bA2g@mail.gmail.com>



On 20.08.2014 13:50, Vasili Galka wrote:
> 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

sorry if I was not accurate enough but with introduction of Kbuild
"USE_PRIVATE_LIBGCC=yes" was changed to "CONFIG_USE_PRIVATE_LIBGCC=y".
To support different U-Boot versions you should set both variants:

export USE_PRIVATE_LIBGCC=yes
export CONFIG_USE_PRIVATE_LIBGCC=y


> 
> 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
> 

-- 
- Daniel

  reply	other threads:[~2014-08-20 12:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  9:35 [U-Boot] Recommended MIPS toolchain Vasili Galka
2014-08-20 10:23 ` Daniel Schwierzeck
2014-08-20 11:50   ` Vasili Galka
2014-08-20 12:20     ` Daniel Schwierzeck [this message]
2014-08-20 12:31       ` Vasili Galka
2014-09-08  9:29         ` Masahiro Yamada
2014-09-08  9:40           ` Vasili Galka
2014-09-08 10:30           ` Daniel Schwierzeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F49272.10104@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.