]> code.ossystems Code Review - meta-freescale.git/commitdiff
atf: Only enable and depends on optee when supported
authorAlban Bedel <alban.bedel@aerq.com>
Thu, 15 Aug 2019 09:39:18 +0000 (11:39 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 15 Aug 2019 17:48:45 +0000 (14:48 -0300)
Use the new optee machine feature to only enable it when it is supported
by the machine and the distro. We use a package config switch to only
add the dependency when it is needed. This prevent a build failure on
machines that don't support optee.

Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
recipes-bsp/atf/atf_git.bb

index 0f70d730fc68075e9f15f960db05c21ab7f8393b..bc182ebe5fea27d8e626ec1ede10ea9fb1301b0c 100644 (file)
@@ -7,7 +7,6 @@ inherit deploy
 
 DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native"
 DEPENDS_append_lx2160a += "ddr-phy"
-DEPENDS_append_qoriq-arm64 += "optee-os-qoriq"
 do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
 
 S = "${WORKDIR}/git"
@@ -32,9 +31,14 @@ LD[unexport] = "1"
 
 BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc"
 BUILD_SECURE = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}"
-BUILD_OPTEE = "${@bb.utils.contains('DISTRO_FEATURES', 'optee', 'true', 'false', d)}"
+BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
 BUILD_FUSE = "${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'true', 'false', d)}"
 
+PACKAGECONFIG ??= " \
+    ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \
+"
+PACKAGECONFIG[optee] = ",,optee-os-qoriq"
+
 uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot"
 uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa"
 rcw ?= ""