From f7c9f58eeb446130e2af77bf2b26be95b6134cef Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Mon, 21 Nov 2022 14:23:46 +0000 Subject: [PATCH] arm/trusted-firmware-m: Fix local source patches application As TF-M ships patches that it needs applied to mbedcrypto, we apply them as part of do_patch by using a postfunc. There is an issue when do_patch is executed after do_deploy_source_date_epoch_setscene and apply_local_patches tries to apply the patches already applied. To fix this, make usage of the apply_local_src_patches bbclass. Change-Id: Ia115b540b37ad3a2cce30e1e0461abd1f5a6ccc1 Signed-off-by: Diego Sueiro Signed-off-by: Jon Mason --- .../trusted-firmware-m/trusted-firmware-m_1.6.0.bb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb index c10efd5a..f0c8d579 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb @@ -108,10 +108,9 @@ export OPENSSL_MODULES="${STAGING_LIBDIR_NATIVE}/ossl-modules" # TF-M ships patches that it needs applied to mbedcrypto, so apply them # as part of do_patch. -apply_local_patches() { - cat ${S}/lib/ext/mbedcrypto/*.patch | patch -p1 -d ${S}/../mbedtls -} -do_patch[postfuncs] += "apply_local_patches" +LOCAL_SRC_PATCHES_INPUT_DIR = "${S}/lib/ext/mbedcrypto" +LOCAL_SRC_PATCHES_DEST_DIR = "${S}/../mbedtls" +inherit apply_local_src_patches do_configure[cleandirs] = "${B}" do_configure() {