Skip to content

image_types_sparse: use ext2simg_android for ext* sparse images

AshishKumar Mishra openembedded-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 2 repliesIn review

Changes in v3 from the cover letter

- 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.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3e2fsprogs-ext4sparse-native: compiles ext2simg.c using android-tools-nativemeta-oe/recipes-devtools/e2fsprogs-ext4sparse/e2fsprogs-ext4sparse-native_1.47.4.bb+32 -00 replies
2/3android-tools: export libsparse/libbase/liblog headers and libs to sysrootmeta-oe/recipes-devtools/android-tools/android-tools_%.bbappend+54 -00 replies
3/3image_types_sparse: switch ext* conversion to ext2simg_androidmeta-oe/classes/image_types_sparse.bbclass+13 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [meta-openembedded][PATCH v3 0/3] image_types_sparse: use ext2simg_android for ext* sparse images

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
Signature · 1 line
2.43.0