Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3531126pxv; Mon, 19 Jul 2021 02:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUAEuE19Hasj/9residfHND5xTWl1u/3Qb4duiCwtZi00jk3xPLSMSDiNF31ggvZ8YAurz X-Received: by 2002:a17:906:58c9:: with SMTP id e9mr26331281ejs.144.1626687008294; Mon, 19 Jul 2021 02:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626687008; cv=none; d=google.com; s=arc-20160816; b=oVAo4qrK4x3yxF11loAOZb/f6c2wxqdtCIq+bguKtVFeFr/qSs5eoXUC08UuGBU8oq LJPAsfuQKUZxzcKuubJ3S1tlZ0OizqPRRNxzxKHbcZW8ioGpTgu/42rQ5vF8Z8ba7ZA/ nbCZgVgZ5tVTZUOoOWusuAoin0wC80fg1RgmP5p3QwBKR1WAX1YNDFnEAF/m8ZhBjeON b0eI/tgPn1r+ueh/bl4dklOn9qinOxZ5i7Nscyy2LVX6Vjo9KtdMYIvE4G1PXScHIV8N iGWr0Iu3ASj/DNDAQ0KNNrAQ6BEPsFN4b1jV/8Ds7FxNH525k67sbSgnDdOfNdLXhzIo PWxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=/5nyoIieiYYofhDZJqkqNxzV55PkOeBObbPx85igphI=; b=dFBhb5BFtR6i5yiUyVHDaJHysxMfCuH20NxA3ni5600NHkN3LGSbX9hFCfmiQba4hg RKWzDICxD9/uCVFDwi50wV/rps+RarSxfa/kKWkBCA2B7nL0b9Z+vZLppMkxlggfzyZd gKhYio9JdvaJbprVC7PIJgR0JDLTnSIv+cM3M+f4hNofLCIS8LUGCuX2exKoe6DTTomT GzepR+huIMPO0Cym/Y2RxXem+9To8MM2ox0QDv/Y4uEqtV5zys23o/k0KaV3m5r+zDeA QmVdRIgpcv53ve+km+rFM5yiTql0UsSF0v0IJlR8lz4u9GabEQNdDTz0FUwxBgGi+21F dc+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si20524992ejb.192.2021.07.19.02.29.45; Mon, 19 Jul 2021 02:30:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235767AbhGSIrr convert rfc822-to-8bit (ORCPT + 99 others); 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-kernel@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