Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1445263pxv; Fri, 16 Jul 2021 09:28:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVnEa0BZ2VMtd7lHmMXAbvGZ0OLvRFE59LZQ1RxNwqq0Y8O2yKvxTO1fWEingDLMahCoQd X-Received: by 2002:a05:6402:312e:: with SMTP id dd14mr15773227edb.33.1626452927154; Fri, 16 Jul 2021 09:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626452927; cv=none; d=google.com; s=arc-20160816; b=ud5LcArpafRA2a/7OrIIQc68ZCI56JO+WKCYGtezoHXe0qVs89Lyzekrb0RCnc9mDw cACLSV39kG7qFw3uHeJ+auC5a+TCmcHPzIHEYQbVkXk1Cy5hIsaLL6NY1udhFhYjGp+w cYj5LfQYJzHPnBxQRs6Y2WE9o5XOPMcCP9LYpptbBk6oKJkXPSOEnpcvbehD62V3Nhqw lSzJ4KoUSoQLpoH2v1FqA3pIaLzt6N7PeLcyjVxQH1orxjOZIvE3f0y6MQDh0ctsmZUY nhcB6u3/7+UjQ/RRvn6N7yhiK2ZLWJg3j6ffVTmDYRaxiO0OVfHXR5aaFQqzwkQ/z1Sf 4a/A== 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=W3nDGzqSEHQDnFHCeiPKVv8+971hzGT2wJNzVaHR8nE=; b=PuJ9mODHGP7SO23L4mjvCNoyQBOaee+atqJUHAbo0zz6g/XXmNuSgMfC2JxlkeEkVC mTP+8ko6zeEFdC4KRWXsvVA4IZOpXGosORpBTre9S/GGI32ZZF7P2UtOyT4Y05YtEEHF BKEp21dfZMmEDpQnRXRPyRbKrMbAMHrv/3mmA1F85kFLLsim1Tp1uPLolTNYx+mPDluB +mwKroXPwwIjIcg6obcZCZ56aDgHAwN4AbB0+8rcj272rIDcFEBHdBJtzvcps6LLPZvL YpSN9di1d5gNTpHIGR2IeSLGEnFaritCFuoPGaWl3DW6ZY5SwTA9mVKqu5mxICmtMV0n QWmw== 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 e6si11520197ejk.740.2021.07.16.09.28.24; Fri, 16 Jul 2021 09:28:47 -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 S229802AbhGPQ3y convert rfc822-to-8bit (ORCPT + 99 others); Fri, 16 Jul 2021 12:29:54 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:56096 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbhGPQ3y (ORCPT ); Fri, 16 Jul 2021 12:29:54 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C7A836169BB0; Fri, 16 Jul 2021 18:26:57 +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 r4aiC90VSn-V; Fri, 16 Jul 2021 18:26:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4CE52616B593; Fri, 16 Jul 2021 18:26:57 +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 iZzCNoafkg8f; Fri, 16 Jul 2021 18:26:57 +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 1F0216169BB0; Fri, 16 Jul 2021 18:26:57 +0200 (CEST) Date: Fri, 16 Jul 2021 18:26:56 +0200 (CEST) From: Richard Weinberger To: Greg KH Cc: Pintu Agarwal , linux-kernel , linux-mtd , linux-fsdevel , Phillip Lougher , Sean Nyekjaer , Kernelnewbies Message-ID: <568938486.33366.1626452816917.JavaMail.zimbra@nod.at> In-Reply-To: References: 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: EX+isZbzvbtTKORywh51Mf2FxgrK+w== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Greg KH" > An: "Pintu Agarwal" > CC: "linux-kernel" , "linux-mtd" , "linux-fsdevel" > , "Phillip Lougher" , "Sean Nyekjaer" , > "Kernelnewbies" , "richard" > Gesendet: Freitag, 16. Juli 2021 17:41:01 > Betreff: Re: MTD: How to get actual image size from MTD partition > On Fri, Jul 16, 2021 at 12:12:41PM +0530, Pintu Agarwal wrote: >> Hi, >> >> Our ARM32 Linux embedded system consists of these: >> * Linux Kernel: 4.14 >> * Processor: Qualcomm Arm32 Cortex-A7 >> * Storage: NAND 512MB >> * Platform: Simple busybox >> * Filesystem: UBIFS, Squashfs >> * Consists of nand raw partitions, squashfs ubi volumes. >> >> 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. :-) Thanks, //richard