All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Baryshkov" <dbaryshkov@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][PATCH] image_types_sparse: stop using ext2simg
Date: Wed, 18 Aug 2021 18:39:32 +0300	[thread overview]
Message-ID: <20210818153932.3365328-1-dmitry.baryshkov@linaro.org> (raw)

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 <dmitry.baryshkov@linaro.org>
---
 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 65d980fd913f..4263593a8dd1 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"
-- 
2.30.2


             reply	other threads:[~2021-08-18 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 15:39 Dmitry Baryshkov [this message]
2021-08-18 18:22 ` [oe] [meta-oe][PATCH] image_types_sparse: stop using ext2simg Khem Raj
2021-08-20 14:43   ` Dmitry Baryshkov
2021-08-20 18:03     ` Khem Raj
2021-08-25 19:45       ` Dmitry Baryshkov
2021-08-30 20:36       ` Dmitry Baryshkov
2021-08-30 20:45         ` Khem Raj
2021-08-30 20:48           ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818153932.3365328-1-dmitry.baryshkov@linaro.org \
    --to=dbaryshkov@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.