From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88D5CC12002 for ; Mon, 19 Jul 2021 09:11:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7183261006 for ; Mon, 19 Jul 2021 09:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235705AbhGSIa1 (ORCPT ); Mon, 19 Jul 2021 04:30:27 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:33517 "EHLO mail-ej1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235150AbhGSIaT (ORCPT ); Mon, 19 Jul 2021 04:30:19 -0400 Received: by mail-ej1-f47.google.com with SMTP id bu12so27603794ejb.0; Mon, 19 Jul 2021 02:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=tyuwkC2PzoZWVuCqm9kCcz3M9SCCkXn/k2TPyTvNUCyrH//h97IumALBHO8pcUpWgj OIWRiPnAheYYrXvjryxDIP6hOU9+DElevR87h88njDFs3ujo0voRJaw5/Ll1x8qjwGgv zd1xKrFqSC+6ZSuU5Wyn9GEwDDm+eQGmeUJu/ZCU1tnUkp/B08O/yyMYbk60PfjNWBRs HtRbPlO/whptCcPo2L3HmnD6a9KfspVqDB+1IKiFAVxZtb9cttM5npNsK/uS0YEHudjQ v3detn/3H/nsLpPwP9PVzSAFnGO6NtzfUIcxd+tPhJ0i6uwXc9BWELDB/9jK/hpPQpXX GHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=FgQxKc5byMJe0bSG1fnGpoawYdpDi9fTYJDOnrhCStxHvzA5k3Yh0zBr6/BGhBJaSV hAI/rKWJ3yLxZf9TJzJGl1s2KC3lLreXhQ/SuAXVsdHLxm91k0d1k/lHiAzdOOP3sCMt QQAyvuXqtR0PChino0BErbaw4Ui6rTlJ+YPNQFOMPBsA7d0XIdVOQbanVHAtEMhiLmWd 7xfAb9VO8o1Vcm7B5vWKWr9MvOAwmIyIW91DRsVWCwrhUcRDf1qpr65X1pj8PjLeIfvs SYaoyPlVBMJczgpxt+CoFYZWd+C0ZEmnreBEJUmKNQ4UIVAu9Ajaj4f5gTvH4nFfsqYQ YiiA== X-Gm-Message-State: AOAM530I4p1W3KBuvr9MMnUBxhZC+jy8dYaw+/ddUO/a6OpbKZZv6g0k qW0p4QZ+jHqUyxxKhZ2mkaOG53f6RqL7n18ZGjQ= X-Google-Smtp-Source: ABdhPJwubtgEMes7Ng29QD5qA/jN51mjW/q7+dtbpcLGkpLbDjrv1aOLcqCXW12Mc7+LVAk5fM+b/NX/9+Yz96jFMnM= X-Received: by 2002:a17:906:9d17:: with SMTP id fn23mr26835249ejc.191.1626685798074; Mon, 19 Jul 2021 02:09:58 -0700 (PDT) MIME-Version: 1.0 References: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> In-Reply-To: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> From: Pintu Agarwal Date: Mon, 19 Jul 2021 14:39:46 +0530 Message-ID: Subject: Re: MTD: How to get actual image size from MTD partition To: Richard Weinberger Cc: Greg KH , linux-kernel , linux-mtd , linux-fsdevel , Phillip Lougher , Sean Nyekjaer , Kernelnewbies Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Jul 2021 at 21:56, Richard Weinberger wrote: > >> My requirement: > >> To find the checksum of a real image in runtime which is flashed in an > >> MTD partition. > > > > Try using the dm-verity module for ensuring that a block device really > > is properly signed before mounting it. That's what it was designed for > > and is independent of the block device type. > > MTDs are not block devices. :-) > Is it possible to use dm-verity with squashfs ? We are using squashfs for our rootfs which is an MTD block /dev/mtdblock44 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3A43C12002 for ; Mon, 19 Jul 2021 09:10:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B14D61006 for ; Mon, 19 Jul 2021 09:10:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B14D61006 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aFkOIFOU1ma8mvx5kmAQZTujIb8LIw4o2RME0hkRI1I=; b=24Dl5bvl28aUFR 3rntISe0vdILT0x8AOZg7D4ZuztAsQFBLhO4l82SPg5yvuZJTu7Mxdlb9xH1cSZ7VKvehzaj8Kkd8 EybgH27OAi/21Q5xVo75kMfuzUYDdo0QsabIVRCHPAoyBgQyuqRwpyUFAdqCKHpVrWnkTFwa4mg6Q EhPk29nYE32qG0R0ORIcrqTASKnk+vv3UTOt4Zpqn9NpDjqqj2uTfK/FN7I5XjXy00Lbf5pEbDq9K nNSY2+WpVW5DW/rh+0siZUZyqP0/8M0kPtJ8BvwQTTNCXUBCHJyT/w6mwdKLxJGm2KWZcLuA42Xi2 r1pCnlzPeN7ptHqVIPiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5PHn-0091Oa-3y; Mon, 19 Jul 2021 09:10:03 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5PHk-0091Nd-KT for linux-mtd@lists.infradead.org; Mon, 19 Jul 2021 09:10:01 +0000 Received: by mail-ej1-x632.google.com with SMTP id hc15so27509814ejc.4 for ; Mon, 19 Jul 2021 02:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=tyuwkC2PzoZWVuCqm9kCcz3M9SCCkXn/k2TPyTvNUCyrH//h97IumALBHO8pcUpWgj OIWRiPnAheYYrXvjryxDIP6hOU9+DElevR87h88njDFs3ujo0voRJaw5/Ll1x8qjwGgv zd1xKrFqSC+6ZSuU5Wyn9GEwDDm+eQGmeUJu/ZCU1tnUkp/B08O/yyMYbk60PfjNWBRs HtRbPlO/whptCcPo2L3HmnD6a9KfspVqDB+1IKiFAVxZtb9cttM5npNsK/uS0YEHudjQ v3detn/3H/nsLpPwP9PVzSAFnGO6NtzfUIcxd+tPhJ0i6uwXc9BWELDB/9jK/hpPQpXX GHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=ItfBkvAMLuE1KTT77/rXK973y25LmGtG7AXHs511HhJUxhqN7oh1qz2MsQozHTUqCc m8JhDp+WYbgtFkch583pAAlgk6TCPYeq9EaWmPwRh/8aIH1uRurc9LGBAYpAozWUAmgZ 8A3OY+zvdLcPsfNso3Ysw1IOze2Wd0RjhR9GfS0kIAa13W9ZNaDeV4xktuHDES7t2LIv BtY1ZKRUQpT/if+FeRJUEB5zPkJR33V1jeDiJhl+W3zdMtpkhfj7ARzpOsUlxn4j+mu/ rLBiaMF+mR9JMJ7EeTcwpVt6GbxqjRzmG4/x1G6vZno7bCVFUd4w4vaVmkpiPLZyUtjt bYNA== X-Gm-Message-State: AOAM533KVjN2BcQnUTFxLajFPjuas5BMUPOvXRJU01xGhAp2PDUpkvSQ b8s1dIOPZV8C/52559ATTGy1RHPLK2n25Bh5sgvP0kvl X-Google-Smtp-Source: ABdhPJwubtgEMes7Ng29QD5qA/jN51mjW/q7+dtbpcLGkpLbDjrv1aOLcqCXW12Mc7+LVAk5fM+b/NX/9+Yz96jFMnM= X-Received: by 2002:a17:906:9d17:: with SMTP id fn23mr26835249ejc.191.1626685798074; Mon, 19 Jul 2021 02:09:58 -0700 (PDT) MIME-Version: 1.0 References: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> In-Reply-To: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> From: Pintu Agarwal Date: Mon, 19 Jul 2021 14:39:46 +0530 Message-ID: Subject: Re: MTD: How to get actual image size from MTD partition To: Richard Weinberger Cc: Greg KH , linux-kernel , linux-mtd , linux-fsdevel , Phillip Lougher , Sean Nyekjaer , Kernelnewbies X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_021000_713777_159F08BB X-CRM114-Status: GOOD ( 13.45 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Fri, 16 Jul 2021 at 21:56, Richard Weinberger wrote: > >> My requirement: > >> To find the checksum of a real image in runtime which is flashed in an > >> MTD partition. > > > > Try using the dm-verity module for ensuring that a block device really > > is properly signed before mounting it. That's what it was designed for > > and is independent of the block device type. > > MTDs are not block devices. :-) > Is it possible to use dm-verity with squashfs ? We are using squashfs for our rootfs which is an MTD block /dev/mtdblock44 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B878FC12002 for ; Mon, 19 Jul 2021 09:10:39 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 674BE6100C for ; Mon, 19 Jul 2021 09:10:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 674BE6100C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1m5PHr-0007Hp-7I; Mon, 19 Jul 2021 05:10:07 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1m5PHl-0007HK-6j for kernelnewbies@kernelnewbies.org; Mon, 19 Jul 2021 05:10:01 -0400 Received: by mail-ej1-x630.google.com with SMTP id gb6so27489842ejc.5 for ; Mon, 19 Jul 2021 02:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=tyuwkC2PzoZWVuCqm9kCcz3M9SCCkXn/k2TPyTvNUCyrH//h97IumALBHO8pcUpWgj OIWRiPnAheYYrXvjryxDIP6hOU9+DElevR87h88njDFs3ujo0voRJaw5/Ll1x8qjwGgv zd1xKrFqSC+6ZSuU5Wyn9GEwDDm+eQGmeUJu/ZCU1tnUkp/B08O/yyMYbk60PfjNWBRs HtRbPlO/whptCcPo2L3HmnD6a9KfspVqDB+1IKiFAVxZtb9cttM5npNsK/uS0YEHudjQ v3detn/3H/nsLpPwP9PVzSAFnGO6NtzfUIcxd+tPhJ0i6uwXc9BWELDB/9jK/hpPQpXX GHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RBSq6zJFuhCvZnOd2gsZfOMT0eqyDUMuVPMMsfBiF1k=; b=fOXak+SoSPoT6XioDulXgyAM7z3MWFK3TPXHcHW+eO/H1Wdxly7ejHuKERw/fbkm8x X94wrbHwzlLaZG98ZN4XBWR8UENkpJMNeL1lVEnkLN4nBzEYM1DjXKlUXmOoPu7d0wZy fQw3zPJ9urqNQIjoR/HvEDC5P7c6klfnwSleH/8l4Abs7WPAiT0pkRVVM9767W2qJfa9 0CQoa1or5uT/he3MGaRn46naG90JyC8ZTau7l6rbSW9JRvw0r/KNJPLstXchT6l1Pn27 Ay8o48WeiZ4b7ejro6PNZ4+IoNhKruaZ4crflG3GGrZmE9dahFF9SdV3LlnUAe2npFrm xcFA== X-Gm-Message-State: AOAM532qSglww2KLN5RN1z/43ZvEZ61a9iN+qtSOM0LdvIkg7LgEGJHK /+a54P9IjWZkZ2cX4JRNlSRII/e8X5jcE+KUwz0= X-Google-Smtp-Source: ABdhPJwubtgEMes7Ng29QD5qA/jN51mjW/q7+dtbpcLGkpLbDjrv1aOLcqCXW12Mc7+LVAk5fM+b/NX/9+Yz96jFMnM= X-Received: by 2002:a17:906:9d17:: with SMTP id fn23mr26835249ejc.191.1626685798074; Mon, 19 Jul 2021 02:09:58 -0700 (PDT) MIME-Version: 1.0 References: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> In-Reply-To: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> From: Pintu Agarwal Date: Mon, 19 Jul 2021 14:39:46 +0530 Message-ID: Subject: Re: MTD: How to get actual image size from MTD partition To: Richard Weinberger Cc: Kernelnewbies , Greg KH , linux-kernel , linux-mtd , Sean Nyekjaer , linux-fsdevel , Phillip Lougher X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Fri, 16 Jul 2021 at 21:56, Richard Weinberger wrote: > >> My requirement: > >> To find the checksum of a real image in runtime which is flashed in an > >> MTD partition. > > > > Try using the dm-verity module for ensuring that a block device really > > is properly signed before mounting it. That's what it was designed for > > and is independent of the block device type. > > MTDs are not block devices. :-) > Is it possible to use dm-verity with squashfs ? We are using squashfs for our rootfs which is an MTD block /dev/mtdblock44 _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies