[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOuPNLjzyG_2wGDYmwgeoQuuQ7cykJ11THf8jMrOFXZ7vXheJQ@mail.gmail.com>
Date: Fri, 16 Jul 2021 12:12:41 +0530
From: Pintu Agarwal <pintu.ping@...il.com>
To: open list <linux-kernel@...r.kernel.org>,
linux-mtd <linux-mtd@...ts.infradead.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Phillip Lougher <phillip@...ashfs.org.uk>,
Sean Nyekjaer <sean@...nix.com>,
Kernelnewbies <kernelnewbies@...nelnewbies.org>,
Richard Weinberger <richard@....at>
Subject: MTD: How to get actual image size from MTD partition
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.
Problem:
Currently, to find the checksum, we are using:
$ md5sum /dev/mtd14
This returns the proper checksum of the entire partition.
But we wanted to find the checksum only for the actual image data
which will be used by our C utility to validate the image.
Here, we don't know the actual image size.
We only know the "partition-size" and "erasesize".
So, is there a mechanism to somehow find the image size at runtime?
Regards,
Pintu
Powered by blists - more mailing lists