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=-3.8 required=3.0 tests=BAYES_00, 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 E282BC12002 for ; Mon, 19 Jul 2021 09:28:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C62916115B for ; Mon, 19 Jul 2021 09:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235527AbhGSIrr convert rfc822-to-8bit (ORCPT ); Mon, 19 Jul 2021 04:47:47 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:50818 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234868AbhGSIrp (ORCPT ); Mon, 19 Jul 2021 04:47:45 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8799C6074005; Mon, 19 Jul 2021 11:28:15 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id mOx5PEkD266R; Mon, 19 Jul 2021 11:28:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0CBD06169BCD; Mon, 19 Jul 2021 11:28:15 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SIFyXQH69MuA; Mon, 19 Jul 2021 11:28:14 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id CCEAA6074005; Mon, 19 Jul 2021 11:28:14 +0200 (CEST) Date: Mon, 19 Jul 2021 11:28:14 +0200 (CEST) From: Richard Weinberger To: Pintu Agarwal Cc: Greg KH , linux-kernel , linux-mtd , linux-fsdevel , Phillip Lougher , Sean Nyekjaer , Kernelnewbies Message-ID: <1458549943.44607.1626686894648.JavaMail.zimbra@nod.at> In-Reply-To: References: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> Subject: Re: MTD: How to get actual image size from MTD partition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: How to get actual image size from MTD partition Thread-Index: HGpmZleyphvaG4K0/EnAjW05MlN5eA== Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Pintu Agarwal" > An: "richard" > CC: "Greg KH" , "linux-kernel" , "linux-mtd" > , "linux-fsdevel" , "Phillip Lougher" > , "Sean Nyekjaer" , "Kernelnewbies" > Gesendet: Montag, 19. Juli 2021 11:09:46 > Betreff: Re: MTD: How to get actual image size from MTD partition > 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 Well, if you emulate a block device using mtdblock, you can use dm-verity and friends. Also consider using ubiblock. It offers better performance and wear leveling support. Thanks, //richard