Message ID | 20250920173742.3449291-1-emailaddress.ashish@gmail.com |
---|---|
State | New |
Headers | show |
Series | [kirkstone] image_types_sparse: backport fix pad source image to block size | expand |
@Gyrogy : Can you please share your comments on this patch and if possible consider for merging This is part of changes i am backporting to have https://git.openembedded.org/meta-openembedded/commit/meta-oe/classes/image_types_sparse.bbclass?id=f5246b7df447ac76ec04c6e5add398862d1c9ccd in kirkstone also - Thanks Ashish
While master branch is updated in an almost rolling model and is updated frequently, named stable branches follow a bit different model: they are updated roughly once a month. But testing and reviewing happens continuously during the merge window, and if there is a problem with the submission, you will be informed. On 9/23/25 08:32, Ashish Mishra via lists.openembedded.org wrote: > @Gyrogy : Can you please share your comments on this patch and if > possible consider for merging > > This is part of changes i am backporting to have > https://git.openembedded.org/meta-openembedded/commit/meta-oe/classes/image_types_sparse.bbclass?id=f5246b7df447ac76ec04c6e5add398862d1c9ccd > in kirkstone also > > - Thanks > Ashish > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#119651): https://lists.openembedded.org/g/openembedded-devel/message/119651 > Mute This Topic: https://lists.openembedded.org/mt/115347745/6084445 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [skandigraun@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index 4263593a8d..b092f68406 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass @@ -1,8 +1,16 @@ inherit image_types +# This sets the granularity of the sparse image conversion. Chunk sizes will be +# specified in units of this value. Setting this value smaller than the +# underlying image's block size will not result in any further space saving. +# However, there is no loss in correctness if this value is larger or smaller +# than optimal. This value should be a power of two. +SPARSE_BLOCK_SIZE ??= "4096" + CONVERSIONTYPES += "sparse" CONVERSION_CMD:sparse = " \ - img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ - "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ + INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" && \ + truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT" && \ + img2simg "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE} \ " CONVERSION_DEPENDS_sparse = "android-tools-native"