1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 11:29:54 +00:00

arm/trusted-services: use apply_local_src_patches

Now that the apply_local_src_patches class supports being used with
multiple directories, use that instead of reimplementing the logic.

Also remove redundant patchdir assignments as these patches are against
the trusted-services repository, which is ${S}.  I suspect these are
exposing a subtle bug in the core patching logic which meant the local
patches were not applying correctly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2023-09-29 16:21:25 +01:00
committed by Jon Mason
parent 67deb2cf1b
commit 46e6f42e31
3 changed files with 21 additions and 24 deletions

View File

@@ -2,14 +2,14 @@ FILESEXTRAPATHS:prepend:corstone1000 := "${THISDIR}/corstone1000:"
COMPATIBLE_MACHINE:corstone1000 = "corstone1000"
SRC_URI:append:corstone1000 = " \
file://0001-Add-stub-capsule-update-service-components.patch;patchdir=../trusted-services \
file://0002-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch;patchdir=../trusted-services \
file://0003-FMP-Support-in-Corstone1000.patch;patchdir=../trusted-services \
file://0004-GetNextVariableName-Fix.patch;patchdir=../trusted-services \
file://0005-plat-corstone1000-add-compile-definitions-for-ECP_DP.patch;patchdir=../trusted-services \
file://0006-plat-corstone1000-Use-the-stateless-platform-service.patch;patchdir=../trusted-services \
file://0007-plat-corstone1000-Initialize-capsule-update-provider.patch;patchdir=../trusted-services \
file://0008-plat-corstone1000-change-ns-interrupt-action.patch;patchdir=../trusted-services \
file://0001-Add-stub-capsule-update-service-components.patch \
file://0002-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch \
file://0003-FMP-Support-in-Corstone1000.patch \
file://0004-GetNextVariableName-Fix.patch \
file://0005-plat-corstone1000-add-compile-definitions-for-ECP_DP.patch \
file://0006-plat-corstone1000-Use-the-stateless-platform-service.patch \
file://0007-plat-corstone1000-Initialize-capsule-update-provider.patch \
file://0008-plat-corstone1000-change-ns-interrupt-action.patch \
"

View File

@@ -61,16 +61,17 @@ LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e14135
SRCREV_FORMAT = "trusted-services_dtc_mbedtls_nanopb_qcbor_tcose_cpputest_libmetal_openamp"
# TS ships patches for external dependencies that needs to be applied
apply_ts_patches() {
( cd ${WORKDIR}/git/qcbor; git stash; git branch -f bf_am; git am ${S}/external/qcbor/*.patch; git reset bf_am )
( cd ${WORKDIR}/git/tcose; git stash; git branch -f bf_am; git am ${S}/external/t_cose/*.patch; git reset bf_am )
( cd ${WORKDIR}/git/mbedtls; git stash; git branch -f bf_am; git am ${S}/external/MbedTLS/*.patch; git reset bf_am )
( cd ${WORKDIR}/git/cpputest; git stash; git apply ${S}/external/CppUTest/*.patch )
( cd ${WORKDIR}/git/dtc; git stash; git apply ${S}/external/libfdt/*.patch )
( cd ${WORKDIR}/git/nanopb; git stash; git apply ${S}/external/nanopb/*.patch )
inherit apply_local_src_patches
LOCAL_SRC_PATCHES_INPUT_DIR = "N/A"
do_apply_local_src_patches() {
apply_local_src_patches ${S}/external/qcbor ${WORKDIR}/git/qcbor
apply_local_src_patches ${S}/external/t_cose ${WORKDIR}/git/tcose
apply_local_src_patches ${S}/external/MbedTLS ${WORKDIR}/git/mbedtls
apply_local_src_patches ${S}/external/CppUTest ${WORKDIR}/git/cpputest
apply_local_src_patches ${S}/external/libfdt ${WORKDIR}/git/dtc
apply_local_src_patches ${S}/external/nanopb ${WORKDIR}/git/nanopb
}
do_patch[postfuncs] += "apply_ts_patches"
# Paths to dependencies required by some TS SPs/tools
EXTRA_OECMAKE += "-DDTC_SOURCE_DIR=${WORKDIR}/git/dtc \

View File

@@ -16,15 +16,11 @@ SRC_URI += "git://github.com/ARM-software/psa-arch-tests.git;name=psatest;protoc
SRCREV_psatest = "38cb53a4d9e292435ddf7899960b15af62decfbe"
LIC_FILES_CHKSUM += "file://../psatest/LICENSE.md;md5=2a944942e1496af1886903d274dedb13"
EXTRA_OECMAKE += "\
-DPSA_ARCH_TESTS_SOURCE_DIR=${WORKDIR}/git/psatest \
"
EXTRA_OECMAKE += "-DPSA_ARCH_TESTS_SOURCE_DIR=${WORKDIR}/git/psatest"
# TS check if there are patches to apply to psa-arch-tests, if so apply them
apply_ts_patch() {
find ${S}/external/psa_arch_tests -type f -name '*.patch' -exec patch -p1 -d ${WORKDIR}/git/psatest -i {} \;
do_apply_local_src_patches:append() {
apply_local_src_patches ${S}/external/psa_arch_tests ${WORKDIR}/git/psatest
}
do_patch[postfuncs] += "apply_ts_patch"
FILES:${PN} = "${bindir}/${PSA_TEST}"