public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] U-Boot: could not cross-compile u-boot tools
       [not found]   ` <20140227210758.77BA.AA925319@jp.panasonic.com>
@ 2014-02-27 12:20     ` Heiko Schocher
  2014-02-27 14:30       ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2014-02-27 12:20 UTC (permalink / raw)
  To: u-boot

Hello all,

just noticed, that it is not longer possible to cross-compile the
u-boot tools:

"Older" U-Boot (= before kbuild changes), could cross-compile the
u-boot tools:

$ git log
commit 9137d19bdd321b810275f2e967e3a39165a4e8de
Author: Heiko Schocher <hs@denx.de>
Date:   Thu Jan 30 11:02:13 2014 +0100

     net, phy: atheros ar803x bug
[...]
$ make mrproper
$ make IDS8247_config
Configuring for IDS8247 board...
$ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip -s tools
$ powerpc-linux-objdump -f tools/mkimage

tools/mkimage:     file format elf32-powerpc
architecture: powerpc:common, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x10001320


With current mainline:

$ git checkout master
Gewechselt zu Zweig 'master'
$ make mrproper
$ make IDS8247_config
Configuring for IDS8247 board...
$ make CROSS_COMPILE=powerpc-linux-  -s tools
$ powerpc-linux-objdump -f tools/mkimage

tools/mkimage:     file format elf64-little
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00000000004019c8

$ objdump -f tools/mkimage

tools/mkimage:     file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00000000004019c8

$ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip -s tools
/lib/ld.so.1: No such file or directory
make[1]: *** [scripts/basic/fixdep] Fehler 255
make: *** [scripts_basic] Fehler 2
$

Is this a Bug, which should be fixed? Any hints?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-27 12:20     ` [U-Boot] U-Boot: could not cross-compile u-boot tools Heiko Schocher
@ 2014-02-27 14:30       ` Tom Rini
  2014-02-28  5:21         ` Heiko Schocher
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2014-02-27 14:30 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 27, 2014 at 01:20:52PM +0100, Heiko Schocher wrote:

> Hello all,
> 
> just noticed, that it is not longer possible to cross-compile the
> u-boot tools:
> 
> "Older" U-Boot (= before kbuild changes), could cross-compile the
> u-boot tools:
> 
> $ git log
> commit 9137d19bdd321b810275f2e967e3a39165a4e8de
> Author: Heiko Schocher <hs@denx.de>
> Date:   Thu Jan 30 11:02:13 2014 +0100
> 
>     net, phy: atheros ar803x bug
> [...]
> $ make mrproper
> $ make IDS8247_config
> Configuring for IDS8247 board...
> $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip -s tools
> $ powerpc-linux-objdump -f tools/mkimage
> 
> tools/mkimage:     file format elf32-powerpc
> architecture: powerpc:common, flags 0x00000112:
> EXEC_P, HAS_SYMS, D_PAGED
> start address 0x10001320
> 
> 
> With current mainline:
> 
> $ git checkout master
> Gewechselt zu Zweig 'master'
> $ make mrproper
> $ make IDS8247_config
> Configuring for IDS8247 board...
> $ make CROSS_COMPILE=powerpc-linux-  -s tools
> $ powerpc-linux-objdump -f tools/mkimage
> 
> tools/mkimage:     file format elf64-little
> architecture: UNKNOWN!, flags 0x00000112:
> EXEC_P, HAS_SYMS, D_PAGED
> start address 0x00000000004019c8
> 
> $ objdump -f tools/mkimage
> 
> tools/mkimage:     file format elf64-x86-64
> architecture: i386:x86-64, flags 0x00000112:
> EXEC_P, HAS_SYMS, D_PAGED
> start address 0x00000000004019c8
> 
> $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip -s tools
> /lib/ld.so.1: No such file or directory
> make[1]: *** [scripts/basic/fixdep] Fehler 255
> make: *** [scripts_basic] Fehler 2
> $
> 
> Is this a Bug, which should be fixed? Any hints?

It seems like we need to pick up
http://lists.linaro.org/pipermail/linaro-kernel/2013-August/005772.html

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140227/87d59f53/attachment.pgp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-27 14:30       ` Tom Rini
@ 2014-02-28  5:21         ` Heiko Schocher
  2014-02-28  9:03           ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2014-02-28  5:21 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 27.02.2014 15:30, schrieb Tom Rini:
> On Thu, Feb 27, 2014 at 01:20:52PM +0100, Heiko Schocher wrote:
>
>> Hello all,
>>
>> just noticed, that it is not longer possible to cross-compile the
>> u-boot tools:
[...]
>> With current mainline:
>>
>> $ git checkout master
>> Gewechselt zu Zweig 'master'
>> $ make mrproper
>> $ make IDS8247_config
>> Configuring for IDS8247 board...
>> $ make CROSS_COMPILE=powerpc-linux-  -s tools
>> $ powerpc-linux-objdump -f tools/mkimage
>>
>> tools/mkimage:     file format elf64-little
>> architecture: UNKNOWN!, flags 0x00000112:
>> EXEC_P, HAS_SYMS, D_PAGED
>> start address 0x00000000004019c8
>>
>> $ objdump -f tools/mkimage
>>
>> tools/mkimage:     file format elf64-x86-64
>> architecture: i386:x86-64, flags 0x00000112:
>> EXEC_P, HAS_SYMS, D_PAGED
>> start address 0x00000000004019c8
>>
>> $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip -s tools
>> /lib/ld.so.1: No such file or directory
>> make[1]: *** [scripts/basic/fixdep] Fehler 255
>> make: *** [scripts_basic] Fehler 2
>> $
>>
>> Is this a Bug, which should be fixed? Any hints?
>
> It seems like we need to pick up
> http://lists.linaro.org/pipermail/linaro-kernel/2013-August/005772.html

Yes, this seems a way to go...

@Masahiro: What is your opinion?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-28  5:21         ` Heiko Schocher
@ 2014-02-28  9:03           ` Masahiro Yamada
  2014-02-28  9:31             ` Heiko Schocher
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2014-02-28  9:03 UTC (permalink / raw)
  To: u-boot

Hello Heiko,

> >> Is this a Bug, which should be fixed? Any hints?
> >
> > It seems like we need to pick up
> > http://lists.linaro.org/pipermail/linaro-kernel/2013-August/005772.html
> 
> Yes, this seems a way to go...
> 
> @Masahiro: What is your opinion?

Hmm, I don't like such a patch because
 [1] It changes too much
 [2] We must build tools in two steps.
    First time, build tools for host
          make O=path/to/buildhost/ silentoldconfig prepare scripts
    Second time, built tools for the target 
     make HOSTCC=$CROSS_COMPILE \
           KBUILD_SCRIPTROOT=path/to/buildhost/
            silentoldconfig prepare scripts
   It seems ridiculous to type so many magic commands.



Heiko, can you check if the following works for you?


Modify tools/Makefile as follows

  --- a/tools/Makefile
  +++ b/tools/Makefile
  @@ -5,6 +5,10 @@
   # SPDX-License-Identifier:     GPL-2.0+
   #
    
   +ifneq ($(CROSS_BUILD_TOOLS),)
   +HOSTCC = $(CC)
   +endif
   +
    #
    # toolchains targeting win32 generate .exe files
    #


Usage:
Build tools for host
     make  CROSS_COMPILE=<your_gcc_prefix> tools
Build tools for target
     make CROSS_BUILD_TOOLS=1  CROSS_COMPILE=<your_gcc_prefix> tools


This is my log.

$ make IDS8247_config
Configuring for IDS8247 board...
$ make CROSS_COMPILE=powerpc-linux-gnu- CROSS_BUILD_TOOLS=1 tools
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/basic/fixdep
  CC      lib/asm-offsets.s
  GEN     include/generated/generic-asm-offsets.h
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/crc32.o
  HOSTCC  tools/default_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/env_embedded.o
  HOSTCC  tools/envcrc.o
  HOSTCC  tools/fdt.o
  HOSTCC  tools/fdt_ro.o
  HOSTCC  tools/fdt_rw.o
  HOSTCC  tools/fdt_strerror.o
  HOSTCC  tools/fdt_wip.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-fit.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/image.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  HOSTCC  tools/md5.o
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/mkimage.o
  HOSTCC  tools/mxsimage.o
  HOSTCC  tools/omapimage.o
  HOSTCC  tools/os_support.o
  HOSTCC  tools/pblimage.o
  HOSTCC  tools/sha1.o
  HOSTCC  tools/ublimage.o
  HOSTLD  tools/envcrc
  HOSTCC  tools/gen_eth_addr
  HOSTCC  tools/img2srec
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
  HOSTLD  tools/mkimage
  HOSTCC  tools/proftool
$ file tools/mkimage
tools/mkimage: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xb76ad5a10a41700fcab9e86c079118c424446d89, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70401, not stripped



Uknown Issue:
Tools are not stripped.
Too big for your target board?


Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-28  9:03           ` Masahiro Yamada
@ 2014-02-28  9:31             ` Heiko Schocher
  2014-02-28 11:12               ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2014-02-28  9:31 UTC (permalink / raw)
  To: u-boot

Hallo Masahiro,

Am 28.02.2014 10:03, schrieb Masahiro Yamada:
> Hello Heiko,
>
>>>> Is this a Bug, which should be fixed? Any hints?
>>>
>>> It seems like we need to pick up
>>> http://lists.linaro.org/pipermail/linaro-kernel/2013-August/005772.html
>>
>> Yes, this seems a way to go...
>>
>> @Masahiro: What is your opinion?
>
> Hmm, I don't like such a patch because
>   [1] It changes too much

Ok, if there is an easier way, that would be great!

>   [2] We must build tools in two steps.
>      First time, build tools for host
>            make O=path/to/buildhost/ silentoldconfig prepare scripts
>      Second time, built tools for the target
>       make HOSTCC=$CROSS_COMPILE \
>             KBUILD_SCRIPTROOT=path/to/buildhost/
>              silentoldconfig prepare scripts
>     It seems ridiculous to type so many magic commands.

But it should be possible to compile the "tools" for the
target. If this a serperate build step, that is as it was
before the kbuild changes, so that should be no problem.

> Heiko, can you check if the following works for you?
>
>
> Modify tools/Makefile as follows
>
>    --- a/tools/Makefile
>    +++ b/tools/Makefile
>    @@ -5,6 +5,10 @@
>     # SPDX-License-Identifier:     GPL-2.0+
>     #
>
>     +ifneq ($(CROSS_BUILD_TOOLS),)
>     +HOSTCC = $(CC)
>     +endif
>     +
>      #
>      # toolchains targeting win32 generate .exe files
>      #
>
>
> Usage:
> Build tools for host
>       make  CROSS_COMPILE=<your_gcc_prefix>  tools
> Build tools for target
>       make CROSS_BUILD_TOOLS=1  CROSS_COMPILE=<your_gcc_prefix>  tools

Yep, works, great!

> This is my log.
>
> $ make IDS8247_config
[...]
> $ file tools/mkimage
> tools/mkimage: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xb76ad5a10a41700fcab9e86c079118c424446d89, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70401, not stripped
>
>
>
> Uknown Issue:
> Tools are not stripped.
> Too big for your target board?

strip them would be nice ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-28  9:31             ` Heiko Schocher
@ 2014-02-28 11:12               ` Wolfgang Denk
  2014-02-28 14:20                 ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2014-02-28 11:12 UTC (permalink / raw)
  To: u-boot

Dear Heiko & Masahiro,

In message <53105765.3010709@denx.de> you wrote:
> 
> > Usage:
> > Build tools for host
> >       make  CROSS_COMPILE=<your_gcc_prefix>  tools
> > Build tools for target
> >       make CROSS_BUILD_TOOLS=1  CROSS_COMPILE=<your_gcc_prefix>  tools
> 
> Yep, works, great!

I'm not really hapy with the additional CROSS_BUILD_TOOLS paramert -
but this may be a matter of taste, so the following is just a thought
and a question:

Would it make more sense to provide a sparate make target instead?

Say, something like this:

	Build tools for host
		make  CROSS_COMPILE=<your_gcc_prefix tools
	Build tools for target
		make  CROSS_COMPILE=<your_gcc_prefix cross_tools
	
?

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@denx.de
Comparing information  and  knowledge  is  like  asking  whether  the
fatness  of  a  pig  is more or less green than the designated hitter
rule."                                               - David Guaspari

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] U-Boot: could not cross-compile u-boot tools
  2014-02-28 11:12               ` Wolfgang Denk
@ 2014-02-28 14:20                 ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2014-02-28 14:20 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 28, 2014 at 12:12:31PM +0100, Wolfgang Denk wrote:
> Dear Heiko & Masahiro,
> 
> In message <53105765.3010709@denx.de> you wrote:
> > 
> > > Usage:
> > > Build tools for host
> > >       make  CROSS_COMPILE=<your_gcc_prefix>  tools
> > > Build tools for target
> > >       make CROSS_BUILD_TOOLS=1  CROSS_COMPILE=<your_gcc_prefix>  tools
> > 
> > Yep, works, great!
> 
> I'm not really hapy with the additional CROSS_BUILD_TOOLS paramert -
> but this may be a matter of taste, so the following is just a thought
> and a question:
> 
> Would it make more sense to provide a sparate make target instead?
> 
> Say, something like this:
> 
> 	Build tools for host
> 		make  CROSS_COMPILE=<your_gcc_prefix tools
> 	Build tools for target
> 		make  CROSS_COMPILE=<your_gcc_prefix cross_tools
> 	
> ?

I agree, this seems more natural.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140228/9fa31ae4/attachment.pgp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-28 14:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140227204101.77B6.AA925319@jp.panasonic.com>
     [not found] ` <530F2804.4020107@denx.de>
     [not found]   ` <20140227210758.77BA.AA925319@jp.panasonic.com>
2014-02-27 12:20     ` [U-Boot] U-Boot: could not cross-compile u-boot tools Heiko Schocher
2014-02-27 14:30       ` Tom Rini
2014-02-28  5:21         ` Heiko Schocher
2014-02-28  9:03           ` Masahiro Yamada
2014-02-28  9:31             ` Heiko Schocher
2014-02-28 11:12               ` Wolfgang Denk
2014-02-28 14:20                 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox