mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-07 16:59:30 +00:00
arm-bsp/trusted-firmware-m: apply patches correctly from external repos
TF-M has out-of-tree patches on external projects such as mbedtls and qcbor. This needs to be applied in an orderly fashion to build TF-M and other TF-M related binaries correctly. Signed-off-by: Emekcan Aras <emekcan.aras@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -42,6 +42,16 @@ SRC_URI:append:corstone1000 = " \
|
||||
file://0012-Platform-Corstone1000-get-fwu-and-private-metadata-f.patch \
|
||||
"
|
||||
|
||||
# TF-M ships patches for external dependencies that needs to be applied
|
||||
apply_tfm_patches() {
|
||||
find ${S}/lib/ext/qcbor -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../qcbor/ -i
|
||||
find ${S}/lib/ext/mbedcrypto -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../mbedtls/ -i
|
||||
find ${S}/lib/ext/mcuboot -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../mcuboot/ -i
|
||||
find ${S}/lib/ext/tf-m-tests -type f -name '*.patch' -print0 | sort -z | xargs -r -t -0 -n 1 patch -p1 -d ${S}/../tf-m-tests/ -i
|
||||
}
|
||||
|
||||
do_patch[postfuncs] += "apply_tfm_patches"
|
||||
|
||||
do_install() {
|
||||
install -D -p -m 0644 ${B}/install/outputs/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin
|
||||
install -D -p -m 0644 ${B}/install/outputs/bl2_signed.bin ${D}/firmware/bl2_signed.bin
|
||||
|
||||
Reference in New Issue
Block a user