| Message ID | 20250918144221.2422710-1-emailaddress.ashish@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | [scarthgap] meta-oe: image: optionally remove RAW image after sparse image creation | expand |
Hi Anuj , Can you please share your comments on this backported patch. This patch i have already merged in Master branch Thanks , Ashish
On Mon, 2025-09-22 at 23:30 -0700, Ashish Mishra via lists.openembedded.org wrote: > Hi Anuj , > > Can you please share your comments on this backported patch. Thank you for reminder. It's in my test queue. Thanks, Anuj
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index d6ea68968e..5416c2a019 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass @@ -9,9 +9,15 @@ SPARSE_BLOCK_SIZE ??= "4096" CONVERSIONTYPES += "sparse" +DELETE_RAWIMAGE_AFTER_SPARSE_CMD ??= "0" + CONVERSION_CMD:sparse = " \ truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "${IMAGE_NAME}.${type}"; \ img2simg -s "${IMAGE_NAME}.${type}" "${IMAGE_NAME}.${type}.sparse" ${SPARSE_BLOCK_SIZE}; \ + if [ "${DELETE_RAWIMAGE_AFTER_SPARSE_CMD}" = "1" ]; then \ + rm -f ${IMAGE_NAME}.${type};\ + bbwarn "Raw file ${IMAGE_NAME}.${type} removed" ;\ + fi;\ " CONVERSION_DEPENDS_sparse = "android-tools-native"