* [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images
@ 2026-09-02 16:19 AshishKumar Mishra
2026-09-08 12:05 ` Leo Sartre
0 siblings, 1 reply; 2+ messages in thread
From: AshishKumar Mishra @ 2026-09-02 16:19 UTC (permalink / raw)
To: openembedded-devel; +Cc: AshishKumar Mishra
Ensure that symbolic links (${IMAGE_LINK_NAME}) are created for both
sparse images, matching standard Yocto image deployment behavior
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
---
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 \
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images
2026-09-02 16:19 [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images AshishKumar Mishra
@ 2026-09-08 12:05 ` Leo Sartre
0 siblings, 0 replies; 2+ messages in thread
From: Leo Sartre @ 2026-09-08 12:05 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]
Hello,
On Wed, Sep 2, 2026 at 06:20 PM, Ashish Mishra wrote:
>
> Ensure that symbolic links (${IMAGE_LINK_NAME}) are created for both
> sparse images, matching standard Yocto image deployment behavior
>
> Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
> ---
> 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'; \
Wouldn't it be simpler to use same .sparse extension name for this image too, that way the IMAGE_LINK_NAME symlink is created by oe-core image.bbclass.
It is what I've done in this change: https://lists.openembedded.org/g/openembedded-devel/message/129709 (sorry did not saw this one before submitting mine).
>
> ;; \
> *) \
> 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'; \
I think this is already covered by the oe-core image.bbclass: https://github.com/openembedded/openembedded-core/blob/master/meta/classes-recipe/image.bbclass#L493
So this line is not needed.
>
> ;; \
> esac; \
> if [ "${DELETE_RAWIMAGE_AFTER_SPARSE_CMD}" = "1" ]; then \
> --
> 2.43.0
Regards
[-- Attachment #2: Type: text/html, Size: 2498 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-08 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 16:19 [meta-oe][PATCH] image_types_sparse: create symlinks for generated sparse images AshishKumar Mishra
2026-09-08 12:05 ` Leo Sartre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox