Access entire device with mtdblock0

Adam Yergovich ayergo at
Wed Jan 14 12:06:21 EST 2009

Wolfgang Wegner wrote:
> On Wed, Jan 14, 2009 at 05:58:43AM -0500, Mike Frysinger wrote:
>> On Wed, Jan 14, 2009 at 04:00, Peter Korsgaard wrote:
>>> "Mike" == Mike Frysinger <writes:
>>>>> Any recommendations on a simple way to create a partition using the
>>>>> entirety of flash?
>>>> looks like no one responded.  i'm pretty sure the answer is to use
>>>> add_mtd_device() even in face of add_mtd_partitions().
>>> Why not just add a partition spanning the entire device in addition to
>>> the other partitions?
>> i was not aware partition tables allowed for overlaps.  if that's
>> true, then the answer is obvious and easy to implement in boards ...
> They are allowed, but I have not been able yet to do a correct query
> for erase_size in case of a partition covering a whole device having
> multiple different-sized erase regions.

Thanks for the advice all.  I will give these a go in the next day or two.


More information about the linux-mtd mailing list