From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Fri, 28 Feb 2014 10:31:17 +0100 Subject: [U-Boot] U-Boot: could not cross-compile u-boot tools In-Reply-To: <20140228180259.94F3.AA925319@jp.panasonic.com> References: <20140227143057.GM16805@bill-the-cat> <53101CBF.3040309@denx.de> <20140228180259.94F3.AA925319@jp.panasonic.com> Message-ID: <53105765.3010709@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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= tools > Build tools for target > make CROSS_BUILD_TOOLS=1 CROSS_COMPILE= 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