mbox series

[v2,0/2] add sparse image format support

Message ID 20231114210418.1323819-1-dmitry.baryshkov@linaro.org
Headers show
Series add sparse image format support | expand

Message

Dmitry Baryshkov Nov. 14, 2023, 9:04 p.m. UTC
Typically the generated filesystem image contains a lot of free space,
which is filled with zeroes. Android ecosystem has come up with the
'sparse' image formwat, which basically drops all irrelevant data blocks
instead of storing them. This way the generated image consumes less
space when stored and takes less time to be flashed (as there is no need
to transfer sequences of zeroes). For example, bootloaders implementing
fastboot protocol natively support writing such images.

The meta-oe repository already supports sparse format. However keeping
it in meta-oe means that it can not be used for BSP layers. Moving it
directly to OE-Core is not possible, since meta-oe uses android-tools, a
huge beast, to support this kind of conversion. Instead of that, use the
simple Rust crate to implement sparse <-> raw image conversion.

Changes since v1:
- Epanded patch description and added cover letter to describe sparse
  images and the reasons for bringing their support into OE-Core.

Dmitry Baryshkov (2):
  rust-android-sparse: add lightweight simg2img/img2simg implementation
  image_types.bbclass: add support for sparse images

 meta/classes-recipe/image_types.bbclass       |  4 +-
 .../rust-android-sparse-crates.inc            | 98 +++++++++++++++++++
 .../rust-android-sparse_0.6.0.bb              | 20 ++++
 3 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/rust-android-sparse/rust-android-sparse-crates.inc
 create mode 100644 meta/recipes-extended/rust-android-sparse/rust-android-sparse_0.6.0.bb