All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pintu Agarwal <pintu.ping@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Richard Weinberger <richard@nod.at>,
	Kernelnewbies <kernelnewbies@kernelnewbies.org>,
	Greg KH <greg@kroah.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Sean Nyekjaer <sean@geanix.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Phillip Lougher <phillip@squashfs.org.uk>
Subject: Re: MTD: How to get actual image size from MTD partition
Date: Thu, 29 Jul 2021 22:41:38 +0530	[thread overview]
Message-ID: <CAOuPNLj+DSigRY_AgHQnGKCK-Vm4ykQBR8UfnTi2UObORTcBFg@mail.gmail.com> (raw)
In-Reply-To: <CAAEAJfDDtGcUquyP7Jn0Urttt4kSfAQbJ_qPQ90ROtWLavW9EA@mail.gmail.com>

On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
>
> On Thu, 29 Jul 2021 at 08:45, Richard Weinberger <richard@nod.at> 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 warn_once on mtdblock
> > > usage, suggesting to use ubiblock instead?
> >
> > a hint in Kconfig makes IMHO sense. Do you want to send a patch?
> > A warning is too much since on some tiny embedded system with NOR flash mtdblock is still
> > a good choice.
> > ubiblock is mostly useful for NAND flash.
> >
> > > 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?)
> >
> > a long time ago mount didn't accept character devices, so you had to pass mtdblockX to mount
> > JFFS2.
> > This limitation is gone.
> >
>
> OK, let me try to cook a patch for you.
>

Dear Eze and Richard,

First of all, thank you so much for all your replies so far.
Sorry, I have limited knowledge about NAND, MTD, UBI layers, but my
current work involves all these so I am here.
But I will surely share this information to our internal team about
using ubiblock instead of mtdblock.

However, I still fail to understand the problem and consequences of
using mtdblock for rootfs instead of ubiblock.
Last time, for my squashfs test, when I tried to replace the command
line with ubiblock, I could not see any difference.
How to visibly see the difference so that I can easily understand and
explain the difference internally?
Or, is there a document available somewhere to highlight the
difference between the two?

BTW, we have few raw nand partitions and few ubi volumes [including
rootfs(squashfs), data(ubifs, rw)]
So, I guess we should use ubiblock for all ubi volumes?

Regarding Kconfig, I have few opinions.
Yes, adding more description in Kconfig is a good choice.
But I see that most of the time these kernel config options remains
(as default) and platform developers never cares about the
description.
So, how to better create awareness among them, not to make these mistakes?
One option is to capture these details as part of Kernel documentation.
Right now when I search I could not find anything.
Another option is to add a few (critical) warnings in kernel bootup
logs to give some hint to the developer that there is probably
something wrong.
This will directly be visible to all and some developers will not like
to ignore it.
Or, maybe adding both options is also good.


Thanks,
Pintu

WARNING: multiple messages have this Message-ID (diff)
From: Pintu Agarwal <pintu.ping@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Richard Weinberger <richard@nod.at>,
	Kernelnewbies <kernelnewbies@kernelnewbies.org>,
	 Greg KH <greg@kroah.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	 linux-mtd <linux-mtd@lists.infradead.org>,
	Sean Nyekjaer <sean@geanix.com>,
	 linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Phillip Lougher <phillip@squashfs.org.uk>
Subject: Re: MTD: How to get actual image size from MTD partition
Date: Thu, 29 Jul 2021 22:41:38 +0530	[thread overview]
Message-ID: <CAOuPNLj+DSigRY_AgHQnGKCK-Vm4ykQBR8UfnTi2UObORTcBFg@mail.gmail.com> (raw)
In-Reply-To: <CAAEAJfDDtGcUquyP7Jn0Urttt4kSfAQbJ_qPQ90ROtWLavW9EA@mail.gmail.com>

On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
>
> On Thu, 29 Jul 2021 at 08:45, Richard Weinberger <richard@nod.at> 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 warn_once on mtdblock
> > > usage, suggesting to use ubiblock instead?
> >
> > a hint in Kconfig makes IMHO sense. Do you want to send a patch?
> > A warning is too much since on some tiny embedded system with NOR flash mtdblock is still
> > a good choice.
> > ubiblock is mostly useful for NAND flash.
> >
> > > 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?)
> >
> > a long time ago mount didn't accept character devices, so you had to pass mtdblockX to mount
> > JFFS2.
> > This limitation is gone.
> >
>
> OK, let me try to cook a patch for you.
>

Dear Eze and Richard,

First of all, thank you so much for all your replies so far.
Sorry, I have limited knowledge about NAND, MTD, UBI layers, but my
current work involves all these so I am here.
But I will surely share this information to our internal team about
using ubiblock instead of mtdblock.

However, I still fail to understand the problem and consequences of
using mtdblock for rootfs instead of ubiblock.
Last time, for my squashfs test, when I tried to replace the command
line with ubiblock, I could not see any difference.
How to visibly see the difference so that I can easily understand and
explain the difference internally?
Or, is there a document available somewhere to highlight the
difference between the two?

BTW, we have few raw nand partitions and few ubi volumes [including
rootfs(squashfs), data(ubifs, rw)]
So, I guess we should use ubiblock for all ubi volumes?

Regarding Kconfig, I have few opinions.
Yes, adding more description in Kconfig is a good choice.
But I see that most of the time these kernel config options remains
(as default) and platform developers never cares about the
description.
So, how to better create awareness among them, not to make these mistakes?
One option is to capture these details as part of Kernel documentation.
Right now when I search I could not find anything.
Another option is to add a few (critical) warnings in kernel bootup
logs to give some hint to the developer that there is probably
something wrong.
This will directly be visible to all and some developers will not like
to ignore it.
Or, maybe adding both options is also good.


Thanks,
Pintu

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Pintu Agarwal <pintu.ping@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Phillip Lougher <phillip@squashfs.org.uk>,
	Kernelnewbies <kernelnewbies@kernelnewbies.org>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>, Sean Nyekjaer <sean@geanix.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: MTD: How to get actual image size from MTD partition
Date: Thu, 29 Jul 2021 22:41:38 +0530	[thread overview]
Message-ID: <CAOuPNLj+DSigRY_AgHQnGKCK-Vm4ykQBR8UfnTi2UObORTcBFg@mail.gmail.com> (raw)
In-Reply-To: <CAAEAJfDDtGcUquyP7Jn0Urttt4kSfAQbJ_qPQ90ROtWLavW9EA@mail.gmail.com>

On Thu, 29 Jul 2021 at 17:33, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
>
> On Thu, 29 Jul 2021 at 08:45, Richard Weinberger <richard@nod.at> 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 warn_once on mtdblock
> > > usage, suggesting to use ubiblock instead?
> >
> > a hint in Kconfig makes IMHO sense. Do you want to send a patch?
> > A warning is too much since on some tiny embedded system with NOR flash mtdblock is still
> > a good choice.
> > ubiblock is mostly useful for NAND flash.
> >
> > > 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?)
> >
> > a long time ago mount didn't accept character devices, so you had to pass mtdblockX to mount
> > JFFS2.
> > This limitation is gone.
> >
>
> OK, let me try to cook a patch for you.
>

Dear Eze and Richard,

First of all, thank you so much for all your replies so far.
Sorry, I have limited knowledge about NAND, MTD, UBI layers, but my
current work involves all these so I am here.
But I will surely share this information to our internal team about
using ubiblock instead of mtdblock.

However, I still fail to understand the problem and consequences of
using mtdblock for rootfs instead of ubiblock.
Last time, for my squashfs test, when I tried to replace the command
line with ubiblock, I could not see any difference.
How to visibly see the difference so that I can easily understand and
explain the difference internally?
Or, is there a document available somewhere to highlight the
difference between the two?

BTW, we have few raw nand partitions and few ubi volumes [including
rootfs(squashfs), data(ubifs, rw)]
So, I guess we should use ubiblock for all ubi volumes?

Regarding Kconfig, I have few opinions.
Yes, adding more description in Kconfig is a good choice.
But I see that most of the time these kernel config options remains
(as default) and platform developers never cares about the
description.
So, how to better create awareness among them, not to make these mistakes?
One option is to capture these details as part of Kernel documentation.
Right now when I search I could not find anything.
Another option is to add a few (critical) warnings in kernel bootup
logs to give some hint to the developer that there is probably
something wrong.
This will directly be visible to all and some developers will not like
to ignore it.
Or, maybe adding both options is also good.


Thanks,
Pintu

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2021-07-29 17:11 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  6:42 MTD: How to get actual image size from MTD partition Pintu Agarwal
2021-07-16  6:42 ` Pintu Agarwal
2021-07-16  6:42 ` Pintu Agarwal
2021-07-16  7:16 ` Richard Weinberger
2021-07-16  7:16   ` Richard Weinberger
2021-07-16  7:16   ` Richard Weinberger
2021-07-16 15:41 ` Greg KH
2021-07-16 15:41   ` Greg KH
2021-07-16 15:41   ` Greg KH
2021-07-16 16:26   ` Richard Weinberger
2021-07-16 16:26     ` Richard Weinberger
2021-07-16 16:26     ` Richard Weinberger
2021-07-19  9:09     ` Pintu Agarwal
2021-07-19  9:09       ` Pintu Agarwal
2021-07-19  9:09       ` Pintu Agarwal
2021-07-19  9:28       ` Richard Weinberger
2021-07-19  9:28         ` Richard Weinberger
2021-07-19  9:28         ` Richard Weinberger
2021-07-20  6:17         ` Pintu Agarwal
2021-07-20  6:17           ` Pintu Agarwal
2021-07-20  6:17           ` Pintu Agarwal
2021-07-20  6:40           ` Richard Weinberger
2021-07-20  6:40             ` Richard Weinberger
2021-07-20  6:40             ` Richard Weinberger
2021-07-20  8:01             ` Pintu Agarwal
2021-07-20  8:01               ` Pintu Agarwal
2021-07-20  8:01               ` Pintu Agarwal
2021-07-21 20:54               ` Richard Weinberger
2021-07-21 20:54                 ` Richard Weinberger
2021-07-21 20:54                 ` Richard Weinberger
2021-07-22 11:10                 ` Pintu Agarwal
2021-07-22 11:10                   ` Pintu Agarwal
2021-07-22 11:10                   ` Pintu Agarwal
2021-07-27 21:16                   ` Richard Weinberger
2021-07-27 21:16                     ` Richard Weinberger
2021-07-27 21:16                     ` Richard Weinberger
2021-07-29 11:17                     ` Ezequiel Garcia
2021-07-29 11:17                       ` Ezequiel Garcia
2021-07-29 11:17                       ` Ezequiel Garcia
2021-07-29 11:45                       ` Richard Weinberger
2021-07-29 11:45                         ` Richard Weinberger
2021-07-29 11:45                         ` Richard Weinberger
2021-07-29 12:03                         ` Ezequiel Garcia
2021-07-29 12:03                           ` Ezequiel Garcia
2021-07-29 12:03                           ` Ezequiel Garcia
2021-07-29 17:11                           ` Pintu Agarwal [this message]
2021-07-29 17:11                             ` Pintu Agarwal
2021-07-29 17:11                             ` Pintu Agarwal
2021-08-20 18:24                             ` Pintu Agarwal
2021-08-20 18:24                               ` Pintu Agarwal
2021-08-20 18:24                               ` Pintu Agarwal
2021-08-22 14:21                               ` Ezequiel Garcia
2021-08-22 14:21                                 ` Ezequiel Garcia
2021-08-22 14:21                                 ` Ezequiel Garcia
2021-08-30 15:58                                 ` Pintu Agarwal
2021-08-30 15:58                                   ` Pintu Agarwal
2021-08-30 15:58                                   ` Pintu Agarwal
2021-10-29 16:12                                   ` Pintu Agarwal
2021-10-29 16:12                                     ` Pintu Agarwal
2021-10-29 16:12                                     ` Pintu Agarwal
2021-10-29 16:48                                     ` Ezequiel Garcia
2021-10-29 16:48                                       ` Ezequiel Garcia
2021-10-29 16:48                                       ` Ezequiel Garcia
2021-11-08 13:51                                       ` Pintu Agarwal
2021-11-08 13:51                                         ` Pintu Agarwal
2021-11-08 13:51                                         ` Pintu Agarwal
2021-11-12 13:58                                         ` Ezequiel Garcia
2021-11-12 13:58                                           ` Ezequiel Garcia
2021-11-12 13:58                                           ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOuPNLj+DSigRY_AgHQnGKCK-Vm4ykQBR8UfnTi2UObORTcBFg@mail.gmail.com \
    --to=pintu.ping@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=phillip@squashfs.org.uk \
    --cc=richard@nod.at \
    --cc=sean@geanix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.