[meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images
AshishKumar Mishra <[email protected]> Tue, 21 Jul 2026 21:56:41 +0530
| Newsgroups | org.openembedded.lists.openembedded-devel |
|---|---|
| Message-ID | <[email protected]> |
This series switches ext* sparse image generation from the generic
img2simg to ext2simg_android from e2fsprogs contrib/android.
Unlike img2simg,which scans the raw image for zero-filled blocks,
ext2simg_android understands the ext* filesystem structure and uses the block
bitmap to determine sparse areas, which is faster and produces smaller
sparse images.
This reduces flashing time for Android RFS/fastboot images and cuts cost in
CI/CD pipelines. img2simg is retained for non-ext types such as f2fs.
1. e2fsprogs-ext4sparse-native: a standalone native recipe that
compiles ext2simg.c against android-tools' libsparse.
2. android-tools: export libsparse/libbase/liblog headers and libs
to the sysroot (under ${includedir}/sparse) so the recipe above
can link against them.
3. image_types_sparse.bbclass: branch CONVERSION_CMD:sparse by
filesystem type, calling ext2simg_android for ext* and falling
back to img2simg otherwise.
Changes in v3:
- Android tools has been moved away from selinux dynamic-layers
- Reworked into a standalone e2fsprogs-ext4sparse recipe in meta-oe
as per feedback on the RFC
- Included the previously-missing e2fsprogs-ext4sparse recipe file
that was absent from the v2 (RFC_V2) attachment.
Changes in v2 (RFC_V2):
- Split the single cross-layer PoC into a dedicated ext2simg_android
recipe rather than patching e2fsprogs-native directly.
RFC (v1):
- Initial cross-layer proof of concept using a manual ${CC} call in
do_compile:append and LD_LIBRARY_PATH for runtime linking.
AshishKumar Mishra (3):
e2fsprogs-ext4sparse-native: compiles ext2simg.c using android-tools-native
android-tools: export libsparse/libbase/liblog headers and libs to sysroot
image_types_sparse: switch ext* conversion to ext2simg_android
meta-oe/classes/image_types_sparse.bbclass | 16 ++++--
.../android-tools/android-tools_%.bbappend | 54 +++++++++++++++++++
.../e2fsprogs-ext4sparse-native_1.47.4.bb | 34 ++++++++++++
3 files changed, 101 insertions(+), 3 deletions(-)
create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools_%.bbappend
create mode 100644 meta-oe/recipes-devtools/e2fsprogs-ext4sparse/e2fsprogs-ext4sparse-native_1.47.4.bb
--
2.43.0