From: AshishKumar Mishra <emailaddress.ashish@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Subject: [meta-openembedded][PATCH v3 3/3] image_types_sparse: switch ext* conversion to ext2simg_android
Date: Tue, 21 Jul 2026 21:56:44 +0530 [thread overview]
Message-ID: <20260721162645.2056048-4-emailaddress.ashish@gmail.com> (raw)
In-Reply-To: <20260721162645.2056048-1-emailaddress.ashish@gmail.com>
We have RFC discussion at
https://lists.openembedded.org/g/openembedded-devel/message/124499
https://lists.openembedded.org/g/openembedded-devel/message/125497
Move ext* sparse image generation from 'img2simg' to ' ext2simg_android'
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
---
meta-oe/classes/image_types_sparse.bbclass | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass
index 5416c2a019..5c1d92bd18 100644
--- a/meta-oe/classes/image_types_sparse.bbclass
+++ b/meta-oe/classes/image_types_sparse.bbclass
@@ -13,11 +13,21 @@ DELETE_RAWIMAGE_AFTER_SPARSE_CMD ??= "0"
CONVERSION_CMD:sparse = " \
truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "${IMAGE_NAME}.${type}"; \
- img2simg -s "${IMAGE_NAME}.${type}" "${IMAGE_NAME}.${type}.sparse" ${SPARSE_BLOCK_SIZE}; \
+ case '${type}' in \
+ ext*) \
+ bbnote 'Running e2fsprogs-derived ext2simg_android..' ; \
+ ext2simg_android '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.simg' || bberror 'ext2simg_android failed' \
+ ;; \
+ *) \
+ bbnote 'Generating sparse image for non-ext filesystem...'; \
+ img2simg -s '${IMAGE_NAME}.${type}' '${IMAGE_NAME}.${type}.sparse' ${SPARSE_BLOCK_SIZE}; \
+ ;; \
+ esac; \
if [ "${DELETE_RAWIMAGE_AFTER_SPARSE_CMD}" = "1" ]; then \
rm -f ${IMAGE_NAME}.${type};\
- bbwarn "Raw file ${IMAGE_NAME}.${type} removed" ;\
+ bbnote "Raw file ${IMAGE_NAME}.${type} removed" ;\
fi;\
"
-CONVERSION_DEPENDS_sparse = "android-tools-native"
+CONVERSION_DEPENDS_sparse = "android-tools-native e2fsprogs-ext4sparse-native"
+do_image_ext4[depends] += "e2fsprogs-ext4sparse-native:do_populate_sysroot"
--
2.43.0
next prev parent reply other threads:[~2026-07-21 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 16:26 [meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images AshishKumar Mishra
2026-07-21 16:26 ` [meta-openembedded][PATCH v3 1/3] e2fsprogs-ext4sparse-native: compiles ext2simg.c using android-tools-native AshishKumar Mishra
2026-07-21 16:26 ` [meta-openembedded][PATCH v3 2/3] android-tools: export libsparse/libbase/liblog headers and libs to sysroot AshishKumar Mishra
2026-07-21 16:26 ` AshishKumar Mishra [this message]
2026-07-21 16:29 ` [meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images AshishKumar Mishra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721162645.2056048-4-emailaddress.ashish@gmail.com \
--to=emailaddress.ashish@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox