From a585830e2de938a4f34b3014c90eaef7d530f369 Mon Sep 17 00:00:00 2001 From: AshishKumar Mishra Date: Wed, 2 Sep 2026 21:49:46 +0530 Subject: [PATCH] image_types_sparse: create symlinks for generated sparse images Ensure that symbolic links (${IMAGE_LINK_NAME}) are created for both sparse images, matching standard Yocto image deployment behavior Signed-off-by: AshishKumar Mishra Signed-off-by: Khem Raj --- meta-oe/classes/image_types_sparse.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index 5c1d92bd18..2ee4aa1159 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass @@ -16,11 +16,13 @@ CONVERSION_CMD:sparse = " \ case '${type}' in \ ext*) \ bbnote 'Running e2fsprogs-derived ext2simg_android..' ; \ - ext2simg_android '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.simg' || bberror 'ext2simg_android failed' \ + ext2simg_android '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.simg' || bberror 'ext2simg_android failed' ;\ + ln -sf '${IMAGE_NAME}.${type}.simg' '${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${type}.simg'; \ ;; \ *) \ bbnote 'Generating sparse image for non-ext filesystem...'; \ img2simg -s '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.sparse' ${SPARSE_BLOCK_SIZE}; \ + ln -sf '${IMAGE_NAME}.${type}.sparse' '${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${type}.sparse'; \ ;; \ esac; \ if [ "${DELETE_RAWIMAGE_AFTER_SPARSE_CMD}" = "1" ]; then \