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

Artem Bityutskiy dedekind1 at gmail.com
Fri Jan 30 01:33:23 PST 2015


On Thu, 2015-01-29 at 16:58 -0800, Nam Nguyen wrote:
> In recovery mode, however, the firmware does not read anything from
> the (writable) NOR flash for fear of grabbing garbage values and
> bricking the device. Hence the kernel has no info about any MTD
> partition. Yet the recovery USB stick does have such information on
> its rootfs. So we were thinking maybe we could augment ubi-utils with
> where the partition starts, where it ends, to work with the raw NAND
> device.

Hi, I did not read the whole conversation, so I am sorry if my comment
is not 100% relevant.

But it sounds that what you actually want is repartitioning on demand.

IOW, you want an ioctl, which you will use to tell MTD what are the
partition boundaries.

In this case the SW from the USB stick will just do that. You'll get the
right MTD devices.

I do not think it would be a clean architecture to teach UBI tools to
work with offsets instead of /dev/mtdX partitions.

Artem.




More information about the linux-mtd mailing list