From ab5f937cb6c1c19841d0ec43dd3f269a05599530 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Mon, 23 Mar 2026 10:40:40 +0100 Subject: [PATCH] stm-st-stm32mp: tf-m-stm32mp-scripts: fix SDK build issue due to wrong UID ownership The original do_install() preserves file ownership, which can contaminate the SDK build and cause "getpwuid(): uid not found: 1000". Adjust the copy command to not preserve owner/group. https://onedigi.atlassian.net/browse/DEL-10022 Signed-off-by: Arturo Buzarra --- .../tf-m-stm32mp-scripts_2.1.bbappend | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-m/tf-m-stm32mp-scripts_2.1.bbappend diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-m/tf-m-stm32mp-scripts_2.1.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-m/tf-m-stm32mp-scripts_2.1.bbappend new file mode 100644 index 000000000..bdfe2836c --- /dev/null +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-m/tf-m-stm32mp-scripts_2.1.bbappend @@ -0,0 +1,27 @@ +# +# Copyright (C) 2026, Digi International Inc. +# + +do_install() { + # Install assemble and signing firmware script + install -d ${D}${bindir} + install -m 755 ${WORKDIR}/scripts/create_st_m33fw_binary.sh ${D}${bindir} + install -m 755 ${WORKDIR}/scripts/st_m33td_firmware_signature.sh ${D}${bindir} + # Update version + sed 's/^SIGN_VERSION=.*$/SIGN_VERSION='"${TF_M_VERSION}"'/' -i ${D}${bindir}/st_m33td_firmware_signature.sh + # Install default MCUBOOT keys + install -d ${D}${datadir}/tf-m/keys + install -m 0644 ${S}/bl2/ext/mcuboot/root-EC-P256.pem ${D}${datadir}/tf-m/keys/root-ec-p256.pem + install -m 0644 ${S}/bl2/ext/mcuboot/root-EC-P256_1.pem ${D}${datadir}/tf-m/keys/root-ec-p256_1.pem + # Install all python scripts needed for assemble and sign + install -d ${D}${datadir}/tf-m/scripts + install -m 0755 ${S}/bl2/ext/mcuboot/scripts/assemble.py ${D}${datadir}/tf-m/scripts + install -m 0755 ${S}/bl2/ext/mcuboot/scripts/macro_parser.py ${D}${datadir}/tf-m/scripts + install -d ${D}${datadir}/tf-m/scripts/wrapper + install -m 0755 ${S}/bl2/ext/mcuboot/scripts/wrapper/wrapper.py ${D}${datadir}/tf-m/scripts/wrapper + # Install imgtool suite + install -m 0755 ${WORKDIR}/${TF_M_EXTERNAL_SOURCES_ROOTDIR}/${TF_M_PATH_MCUBOOT}/scripts/imgtool.py ${D}${datadir}/tf-m/scripts/wrapper + install -d ${D}${datadir}/tf-m/scripts/wrapper/imgtool + cp -rf ${WORKDIR}/${TF_M_EXTERNAL_SOURCES_ROOTDIR}/${TF_M_PATH_MCUBOOT}/scripts/imgtool/* ${D}${datadir}/tf-m/scripts/wrapper/imgtool/ +} +