diff options
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/classes/image_types_sparse.bbclass | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index 4263593a8d..355a3dafc2 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass | |||
| @@ -1,8 +1,16 @@ | |||
| 1 | inherit image_types | 1 | inherit image_types |
| 2 | 2 | ||
| 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 | |||
| 3 | CONVERSIONTYPES += "sparse" | 10 | CONVERSIONTYPES += "sparse" |
| 4 | CONVERSION_CMD:sparse = " \ | 11 | CONVERSION_CMD:sparse() { |
| 5 | img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ | 12 | INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" |
| 6 | "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ | 13 | truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT" |
| 7 | " | 14 | img2simg "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE} |
| 15 | } | ||
| 8 | CONVERSION_DEPENDS_sparse = "android-tools-native" | 16 | CONVERSION_DEPENDS_sparse = "android-tools-native" |
