From 604c7e9a4e6f41c9e8f47cc9acdb85f0818e6c00 Mon Sep 17 00:00:00 2001 From: Frazer Carsley Date: Wed, 14 Jan 2026 09:24:50 +0000 Subject: [PATCH] arm/images: ensured consistent firmware deployment 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 Signed-off-by: Jon Mason --- 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 }