linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MTD: How to get actual image size from MTD partition
@ 2021-07-16  6:42 Pintu Agarwal
  2021-07-16  7:16 ` Richard Weinberger
  2021-07-16 15:41 ` Greg KH
  0 siblings, 2 replies; 23+ messages in thread
From: Pintu Agarwal @ 2021-07-16  6:42 UTC (permalink / raw)
  To: open list, linux-mtd, linux-fsdevel, Phillip Lougher,
	Sean Nyekjaer, Kernelnewbies, Richard Weinberger

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-11-12 13:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  6:42 MTD: How to get actual image size from MTD partition Pintu Agarwal
2021-07-16  7:16 ` Richard Weinberger
2021-07-16 15:41 ` Greg KH
2021-07-16 16:26   ` Richard Weinberger
2021-07-19  9:09     ` Pintu Agarwal
2021-07-19  9:28       ` Richard Weinberger
2021-07-20  6:17         ` Pintu Agarwal
2021-07-20  6:40           ` Richard Weinberger
2021-07-20  8:01             ` Pintu Agarwal
2021-07-21 20:54               ` Richard Weinberger
2021-07-22 11:10                 ` Pintu Agarwal
2021-07-27 21:16                   ` Richard Weinberger
2021-07-29 11:17                     ` Ezequiel Garcia
2021-07-29 11:45                       ` Richard Weinberger
2021-07-29 12:03                         ` Ezequiel Garcia
2021-07-29 17:11                           ` Pintu Agarwal
2021-08-20 18:24                             ` Pintu Agarwal
2021-08-22 14:21                               ` Ezequiel Garcia
2021-08-30 15:58                                 ` Pintu Agarwal
2021-10-29 16:12                                   ` Pintu Agarwal
2021-10-29 16:48                                     ` Ezequiel Garcia
2021-11-08 13:51                                       ` Pintu Agarwal
2021-11-12 13:58                                         ` Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).