MTD: How to get actual image size from MTD partition

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Thu Jul 29 07:17:53 EDT 2021


Hi Richard,

On Tue, 27 Jul 2021 at 18:16, Richard Weinberger
<richard.weinberger at gmail.com> wrote:
>
> On Thu, Jul 22, 2021 at 1:11 PM Pintu Agarwal <pintu.ping at gmail.com> wrote:
> >
> > On Thu, 22 Jul 2021 at 02:24, Richard Weinberger <richard at nod.at> 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 UBI volumes (including
> > > > rootfs mounting).
> > > > This is the kernel command line we pass:
> > > > rootfstype=squashfs root=/dev/mtdblock44 ubi.mtd=40,0,30
> > > > And CONFIG_MTD_UBI_BLOCK=y is already enabled in our kernel.
> > > > Do we need to do something different for ubiblock ?
> > >
> > > From that command line I understand that you are *not* using squashfs on top of UBI.
> > > You use mtdblock. ubiblock is a mechanism to turn an UBI volume into a read-only
> > > block device.
> > > See: http://www.linux-mtd.infradead.org/doc/ubi.html#L_ubiblock
> > >
[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?

I remember there was still some use case(s) for mtdblock but I can't remember
now what was it, perhaps we should document the expectations?
(Is that for JFFS2 to mount?)

Thanks,
Ezequiel



More information about the Kernelnewbies mailing list