image_types_sparse: Generate "don't care" chunks

By default, img2simg will only generate raw and fill chunks. This adds
support for "don't care" chunks, based on file holes. This is similar to
how bmaptool works. "don't care" chunks do not need to be written,
speeding up flashing time.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Sean Anderson
2022-08-12 15:44:04 -04:00
committed by Khem Raj
parent fb331cb62e
commit 9862a017fa
5 changed files with 366 additions and 1 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ CONVERSIONTYPES += "sparse"
CONVERSION_CMD:sparse() {
INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT"
img2simg "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE}
img2simg -s "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE}
}
CONVERSION_DEPENDS_sparse = "android-tools-native"