]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
u-boot-tools: fix compile error
authorKai Kang <kai.kang@windriver.com>
Fri, 30 Nov 2018 01:58:22 +0000 (20:58 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Dec 2018 17:16:55 +0000 (17:16 +0000)
It uses sandbox_defconfig to produce u-boot tools. But EFI is only
supported by arm and x86, then it fails to run task do_compile on other
arches:

| include/config_distro_bootcmd.h:267:3: error: #error "sandbox EFI
| support is only supported on ARM and x86"

Only enable EFI support for u-boot-tools on x86 and arm to fix the issue.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/u-boot/u-boot-tools_2018.11.bb

index 127c4c15d1ecf5b02087a21a7e1d64ac78576745..7893d2aebcb2eda24d54180deaad6d3bd7a502d9 100644 (file)
@@ -17,13 +17,20 @@ EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS
 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 = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
 
+SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"'
+SED_CONFIG_EFI_x86 = ''
+SED_CONFIG_EFI_x86-64 = ''
+SED_CONFIG_EFI_arm = ''
+SED_CONFIG_EFI_armeb = ''
+SED_CONFIG_EFI_aarch64 = ''
+
 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
+       sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} .config
 
        oe_runmake cross_tools NO_SDL=1
 }