[PATCH 1/3] arm/images: ensured consistent firmware deployment
[email protected] Wed, 14 Jan 2026 09:24:50 +0000
| Newsgroups | org.yoctoproject.lists.meta-arm |
|---|---|
| Message-ID | <[email protected]> |
From: Frazer Carsley <[email protected]> For builds using multiconfig, all of the firmware binaries listed were being placed in the ${DEPLOYDIR} directly without preserving their directory hierarchy. This meant that paths to firmware binaries relative to the ${DEPLOYDIR} differed between builds depending on whether multiconfig was enabled or not. Signed-off-by: Frazer Carsley <[email protected]> --- meta-arm/recipes-bsp/images/firmware-deploy-image.bb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta-arm/recipes-bsp/images/firmware-deploy-image.bb b/meta-arm/recipes-bsp/images/firmware-deploy-image.bb index 2f347f0b..85bdc952 100644 --- a/meta-arm/recipes-bsp/images/firmware-deploy-image.bb +++ b/meta-arm/recipes-bsp/images/firmware-deploy-image.bb @@ -18,11 +18,14 @@ do_deploy() { firmware_loc=$(echo "${TMPDIR}" | sed "s/${TCLIBC}/musl/") firmware_loc="${firmware_loc}_${MACHINE}/deploy/images/${MACHINE}" for firmware in ${FIRMWARE_BINARIES}; do - echo "cp -av ${firmware_loc}/${firmware} ${DEPLOYDIR}/" - cp -av "${firmware_loc}/${firmware}" ${DEPLOYDIR}/ + # Preserve the directory structure when copying + subdir="$(dirname -- "${firmware}")" + mkdir -p "${DEPLOYDIR}"/"${subdir}" + echo "cp -av ${firmware_loc}/${firmware} ${DEPLOYDIR}/${subdir}" + cp -av "${firmware_loc}/${firmware}" ${DEPLOYDIR}/"${subdir}" if [ -L "${firmware_loc}/${firmware}" ]; then - echo "cp -av ${firmware_loc}/$(readlink ${firmware_loc}/${firmware}) ${DEPLOYDIR}/" - cp -av "${firmware_loc}/$(readlink ${firmware_loc}/${firmware})" ${DEPLOYDIR}/ + echo "cp -av ${firmware_loc}/$(readlink ${firmware_loc}/${firmware}) ${DEPLOYDIR}/${subdir}" + cp -av "${firmware_loc}/$(readlink ${firmware_loc}/${firmware})" ${DEPLOYDIR}/${subdir} fi done }