From 6884b9c2008d12c0e748dd2057fa59a50af0dd6b Mon Sep 17 00:00:00 2001 From: Alban Bedel Date: Thu, 15 Aug 2019 11:39:18 +0200 Subject: [PATCH] atf: Only enable and depends on optee when supported 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 --- recipes-bsp/atf/atf_git.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb index 2f8a38a0..54a721b1 100644 --- a/recipes-bsp/atf/atf_git.bb +++ b/recipes-bsp/atf/atf_git.bb @@ -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 ?= "" -- 2.40.1