UBI on top of a smaller portion of a bigger MTD device

Richard Weinberger richard.weinberger at gmail.com
Fri Jan 30 00:53:50 PST 2015


On Fri, Jan 30, 2015 at 2:37 AM, Daniel Ehrenberg
<dehrenberg at chromium.org> wrote:
> On Thu, Jan 29, 2015 at 5:16 PM, Daniel Ehrenberg
> <dehrenberg at chromium.org> wrote:
>> - Implement a dynamic MTD partitioning mechanism.
>
> Oh, my mistake, that's already there, just learned about the
> BLKPG_ADD_PARTITION ioctl and the fact that it works on mtd!
>
> We are always partitioning our NAND with mtd0 standing in for the
> whole device and further partitions for part of the device. Would it
> be possible to delete all partitions but mtd0 and then add the
> partitions that we want? It looks like BLKPG_ADD_PARTITION only works
> if it's called against an unpartitioned device--in this case, it'd be
> a partition whose size is size of the whole device and with offset 0.
> How would you feel about a patch to relax this constraint for just
> that type of partition? This way, if we had to repartition the device
> (in a third mode that I didn't mention, where the partitions are read
> from NOR but we're still booting from USB and reinstalling) we don't
> have to ask the user to reboot halfway through to get the partition
> table reflected.

As I explained on IRC to Nam UBI works only on mtd partitions and magic
offset games are something we definitely don't want.

With your mails the use case makes more sense, I agree that you
need some way to partition the mtd at run-time.
If we BLKPG ioctl() does not offer all the functionality you need I don't
you can extend it. Patches are welcome!

-- 
Thanks,
//richard



More information about the linux-mtd mailing list