Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 1 | inherit image_types |
| 2 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 3 | # This sets the granularity of the sparse image conversion. Chunk sizes will be |
| 4 | # specified in units of this value. Setting this value smaller than the |
| 5 | # underlying image's block size will not result in any further space saving. |
| 6 | # However, there is no loss in correctness if this value is larger or smaller |
| 7 | # than optimal. This value should be a power of two. |
| 8 | SPARSE_BLOCK_SIZE ??= "4096" |
| 9 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 10 | CONVERSIONTYPES += "sparse" |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 11 | |
| 12 | CONVERSION_CMD:sparse = " \ |
| 13 | truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "${IMAGE_NAME}.${type}"; \ |
| 14 | img2simg -s "${IMAGE_NAME}.${type}" "${IMAGE_NAME}.${type}.sparse" ${SPARSE_BLOCK_SIZE}; \ |
| 15 | " |
| 16 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 17 | CONVERSION_DEPENDS_sparse = "android-tools-native" |