From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot: could not cross-compile u-boot tools
Date: Fri, 28 Feb 2014 18:03:00 +0900 [thread overview]
Message-ID: <20140228180259.94F3.AA925319@jp.panasonic.com> (raw)
In-Reply-To: <53101CBF.3040309@denx.de>
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
next prev parent reply other threads:[~2014-02-28 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2014-02-28 9:31 ` Heiko Schocher
2014-02-28 11:12 ` Wolfgang Denk
2014-02-28 14:20 ` Tom Rini
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=20140228180259.94F3.AA925319@jp.panasonic.com \
--to=yamada.m@jp.panasonic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox