Re: MTD: How to get actual image size from MTD partition

2021-11-12 Thread Ezequiel Garcia
On Mon, 8 Nov 2021 at 10:51, Pintu Agarwal wrote: > > Hi, > > > On Fri, 29 Oct 2021 at 22:18, Ezequiel Garcia > wrote: > > > > On Fri, 29 Oct 2021 at 13:13, Pintu Agarwal wrote: > > > > > > Hi All, > > > > > > On Mon, 30 Aug 2021 at 21:28, Pintu Agarwal wrote: > > > > > > > > On Sun, 22 Aug

Re: MTD: How to get actual image size from MTD partition

2021-11-08 Thread Pintu Agarwal
Hi, On Fri, 29 Oct 2021 at 22:18, Ezequiel Garcia wrote: > > On Fri, 29 Oct 2021 at 13:13, Pintu Agarwal wrote: > > > > Hi All, > > > > On Mon, 30 Aug 2021 at 21:28, Pintu Agarwal wrote: > > > > > > On Sun, 22 Aug 2021 at 19:51, Ezequiel Garcia > > > wrote: > > > > > > > In other words, IMO

Re: MTD: How to get actual image size from MTD partition

2021-10-29 Thread Ezequiel Garcia
On Fri, 29 Oct 2021 at 13:13, Pintu Agarwal wrote: > > Hi All, > > On Mon, 30 Aug 2021 at 21:28, Pintu Agarwal wrote: > > > > On Sun, 22 Aug 2021 at 19:51, Ezequiel Garcia > > wrote: > > > > > In other words, IMO it's best to expose the NAND through UBI > > > for both read-only and read-write

Re: MTD: How to get actual image size from MTD partition

2021-10-29 Thread Pintu Agarwal
Hi All, On Mon, 30 Aug 2021 at 21:28, Pintu Agarwal wrote: > > On Sun, 22 Aug 2021 at 19:51, Ezequiel Garcia > wrote: > > > In other words, IMO it's best to expose the NAND through UBI > > for both read-only and read-write access, using a single UBI device, > > and then creating UBI volumes as

Re: MTD: How to get actual image size from MTD partition

2021-08-30 Thread Pintu Agarwal
On Sun, 22 Aug 2021 at 19:51, Ezequiel Garcia wrote: > In other words, IMO it's best to expose the NAND through UBI > for both read-only and read-write access, using a single UBI device, > and then creating UBI volumes as needed. This will allow UBI > to spread wear leveling across the whole

Re: MTD: How to get actual image size from MTD partition

2021-08-22 Thread Ezequiel Garcia
Hi Pintu, On Fri, 20 Aug 2021 at 15:25, Pintu Agarwal wrote: > > On Thu, 29 Jul 2021 at 22:41, Pintu Agarwal wrote: > > > > On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia > > wrote: > > > > > > On Thu, 29 Jul 2021 at 08:45, Richard Weinberger wrote: > > > > > > > > Ezequiel, > > > > > > > >

Re: MTD: How to get actual image size from MTD partition

2021-08-20 Thread Pintu Agarwal
On Thu, 29 Jul 2021 at 22:41, Pintu Agarwal wrote: > > On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia > wrote: > > > > On Thu, 29 Jul 2021 at 08:45, Richard Weinberger wrote: > > > > > > Ezequiel, > > > > > > - Ursprüngliche Mail - > > > > [snip] > > > > > > > > Ouch, so surprised that

Re: MTD: How to get actual image size from MTD partition

2021-07-31 Thread Ezequiel Garcia
Hi Richard, On Tue, 27 Jul 2021 at 18:16, Richard Weinberger wrote: > > On Thu, Jul 22, 2021 at 1:11 PM Pintu Agarwal wrote: > > > > On Thu, 22 Jul 2021 at 02:24, Richard Weinberger wrote: > > > > > > - Ursprüngliche Mail - > > > >> But let me advertise ubiblock a second time. > > > >

Re: MTD: How to get actual image size from MTD partition

2021-07-31 Thread Ezequiel Garcia
On Thu, 29 Jul 2021 at 08:45, Richard Weinberger wrote: > > Ezequiel, > > - Ursprüngliche Mail - > > [snip] > > > > Ouch, so surprised that after all these years someone is doing > > squashfs/mtdblock > > instead of using ubiblock :-) > > > > Can we patch either Kconfig or add some

Re: MTD: How to get actual image size from MTD partition

2021-07-29 Thread Pintu Agarwal
On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia wrote: > > On Thu, 29 Jul 2021 at 08:45, Richard Weinberger wrote: > > > > Ezequiel, > > > > - Ursprüngliche Mail - > > > [snip] > > > > > > Ouch, so surprised that after all these years someone is doing > > > squashfs/mtdblock > > > instead

Re: MTD: How to get actual image size from MTD partition

2021-07-29 Thread Richard Weinberger
Ezequiel, - Ursprüngliche Mail - > [snip] > > Ouch, so surprised that after all these years someone is doing > squashfs/mtdblock > instead of using ubiblock :-) > > Can we patch either Kconfig or add some warn_once on mtdblock > usage, suggesting to use ubiblock instead? a hint in

Re: MTD: How to get actual image size from MTD partition

2021-07-27 Thread Richard Weinberger
On Thu, Jul 22, 2021 at 1:11 PM Pintu Agarwal wrote: > > On Thu, 22 Jul 2021 at 02:24, Richard Weinberger wrote: > > > > - Ursprüngliche Mail - > > >> But let me advertise ubiblock a second time. > > > Sorry, I could not understand about the ubiblock request. Is it > > > possible to

Re: MTD: How to get actual image size from MTD partition

2021-07-22 Thread Pintu Agarwal
On Thu, 22 Jul 2021 at 02:24, Richard Weinberger wrote: > > - Ursprüngliche Mail - > >> But let me advertise ubiblock a second time. > > Sorry, I could not understand about the ubiblock request. Is it > > possible to elaborate little more ? > > We are already using squashfs on top of our

Re: MTD: How to get actual image size from MTD partition

2021-07-21 Thread Richard Weinberger
- Ursprüngliche Mail - >> But let me advertise ubiblock a second time. > Sorry, I could not understand about the ubiblock request. Is it > possible to elaborate little more ? > We are already using squashfs on top of our UBI volumes (including > rootfs mounting). > This is the kernel

Re: MTD: How to get actual image size from MTD partition

2021-07-20 Thread Pintu Agarwal
On Tue, 20 Jul 2021 at 12:10, Richard Weinberger wrote: > > Anyways, I will create a separate thread for dm-verity issue and keep > > this thread still open for UBI image size issue. > > We may use dm-verify for rootfs during booting, but still we need to > > perform integrity check for other

Re: MTD: How to get actual image size from MTD partition

2021-07-20 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Pintu Agarwal" > Okay thank you. > We have tried dm-verity with squashfs (for our rootfs) but we are > facing some mounting issues. > [...] > [4.697757] device-mapper: init: adding target '0 96160 verity 1 > /dev/mtdblock34 /dev/mtdblock39 4096 4096

Re: MTD: How to get actual image size from MTD partition

2021-07-20 Thread Pintu Agarwal
sdevel" > > , "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

Re: MTD: How to get actual image size from MTD partition

2021-07-19 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Pintu Agarwal" > An: "richard" > CC: "Greg KH" , "linux-kernel" > , "linux-mtd" > , "linux-fsdevel" > , "Phillip Lougher" > , "Sean Nyekjaer" , "Kern

Re: MTD: How to get actual image size from MTD partition

2021-07-19 Thread Pintu Agarwal
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.

Re: MTD: How to get actual image size from MTD partition

2021-07-16 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Greg KH" > An: "Pintu Agarwal" > CC: "linux-kernel" , "linux-mtd" > , "linux-fsdevel" > , "Phillip Lougher" , > "Sean Nyekjaer" , > "Kernelnewbies" , &q

Re: MTD: How to get actual image size from MTD partition

2021-07-16 Thread Greg KH
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

Re: MTD: How to get actual image size from MTD partition

2021-07-16 Thread Richard Weinberger
Pintu, - Ursprüngliche Mail - > Von: "Pintu Agarwal" > 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

MTD: How to get actual image size from MTD partition

2021-07-16 Thread Pintu Agarwal
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