[oe-commits] [openembedded-core] 31/39: u-boot: mkimage: Fix build of u-boot-mkimage

git at git.openembedded.org git at git.openembedded.org
Thu Dec 8 10:33:29 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit c2980c1d2fe127d56d4c1b797df5a1047d0e2db0
Author: Marek Vasut <marex at denx.de>
AuthorDate: Mon Nov 7 19:20:06 2016 +0100

    u-boot: mkimage: Fix build of u-boot-mkimage
    
    The build failed in multiple configurations. First, the native and
    nativesdk was using the host compiler and was pulling host libraries
    into the build. Second, the target configuration was attempting to
    execute tools/bin2header tool on host, which is compiled for target,
    to generate license header file that is not used by tools.
    
    This patch changes the EXTRA_OEMAKE to address these issues, to build
    both native and target builds with the correct compilers and correct
    sysroots. Moreover, this patch removes the CONFIG_CMD_LICENSE from
    tools build, thus disabling the execution of target tools/bin2header.
    
    Signed-off-by: Marek Vasut <marex at denx.de>
    Cc: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
index 5025961..66edae8 100644
--- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb
@@ -3,10 +3,18 @@ require u-boot-common_${PV}.inc
 SUMMARY = "U-Boot bootloader image creation tool"
 DEPENDS = "openssl"
 
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
+EXTRA_OEMAKE_class-nativesdk = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
 
 do_compile () {
 	oe_runmake sandbox_defconfig
+
+	# Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
+	# generating it requires bin2header tool, which for target build
+	# is built with target tools and thus cannot be executed on host.
+	sed -i "s/CONFIG_CMD_LICENSE.*/# CONFIG_CMD_LICENSE is not set/" .config
+
 	oe_runmake cross_tools NO_SDL=1
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list