From fe90d2095326068cdc3744a3fe56762e3e4562ce Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Wed, 18 Aug 2021 18:39:32 +0300 Subject: [PATCH] image_types_sparse: stop using ext2simg Under some conditions ext2simg can corrupt the file system (see https://lore.kernel.org/linux-ext4/CAP71WjwVdqmLEq1NGWK36JkEd-i05YcAu4jeY6GFjsk6TS=Mtg@mail.gmail.com/). This has been reproduced with the ext2simg currently found meta-oe's android-tools-native). Stop using ext2simg and always use img2simg. This results in bigger images, but without the risk of image corruption. Signed-off-by: Dmitry Baryshkov Signed-off-by: Khem Raj --- meta-oe/classes/image_types_sparse.bbclass | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index 65d980fd91..4263593a8d 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass @@ -2,15 +2,7 @@ inherit image_types CONVERSIONTYPES += "sparse" CONVERSION_CMD:sparse = " \ - case "${type}" in \ - ext*) \ - ext2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ - "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ - ;; \ - *) \ - img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ - "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ - ;; \ - esac \ + img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ + "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ " CONVERSION_DEPENDS_sparse = "android-tools-native"