From 6a85fdbd77e28ed9535dd7f11431718dc14ede79 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 18 Dec 2020 17:34:22 +0000 Subject: [PATCH] arm/trusted-firmware-m: don't use COMPATIBLE_MACHINE directly COMPATIBLE_MACHINE is a wrapper around raising SkipRecipe, and as this recipe basically just needs TFM_PLATFORM set we can raise that if the variable is not set. This allows BSPs to set TFM_PLATFORM in their machine configuration instead of needing to bbappend. Change-Id: I8544ff14ac4689bfbea1f0ac68364b673abde6f1 Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- .../trusted-firmware-m/trusted-firmware-m_1.0.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.0.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.0.bb index 9b204b82..906f2f06 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.0.bb @@ -46,14 +46,17 @@ DEPENDS += "python3-cryptography-native python3-pyasn1-native python3-cbor-nativ S = "${WORKDIR}/git/tfm" B = "${WORKDIR}/build" -COMPATIBLE_MACHINE ?= "invalid" - # Build for debug (set TFA_DEBUG to 1 to activate) TFM_DEBUG ?= "0" # Set target config TFM_CONFIG ?= "ConfigDefault.cmake" -# Platform must be set for each machine -TFM_PLATFORM ?= "invalid" + +# Platform must be set, ideally in the machine configuration. +TFM_PLATFORM ?= "" +python() { + if not d.getVar("TFM_PLATFORM"): + raise bb.parse.SkipRecipe("TFM_PLATFORM needs to be set") +} # Uncomment, or copy these lines to your local.conf to use the Arm Clang compiler # from meta-arm-toolchain.