[U-Boot] [PATCH 5/6] cmd: mtdparts: support runtime generated mtdparts
Ladislav Michl
ladis at linux-mips.org
Mon Jun 6 23:21:03 CEST 2016
On Mon, Jun 06, 2016 at 08:50:55PM +0200, Michal Suchanek wrote:
> On 6 June 2016 at 09:48, Ladislav Michl <ladis at linux-mips.org> wrote:
[snip]
> > Okay, specifing size in therms of eraseblock would solve my problem
> > and I have to admit I'm not aware such a thing exists. Any pointer to
> > the patch introducing that change?
> >
>
> I am not aware of any. it's on the list of nice to have things I will
> probably not get to,
>
> Anyway, It's imho the place to put this code so that Linux does not
> depend on u-boot for pre-chewing it's partition table to get the
> partitions right.
Linux already depends on U-Boot as U-Boot feeds Linux with MTD partitions.
So this patch does not introduce any change in this regard. And whenever
are paritions altered by user, saved to U-Boot environment or default
layout provided according actual eraseblock size is just not important
here. In the end both U-Boot and Linux are working with the same partition
layout. This is the only thing that matters and this patch does not change
that. It changes only this: instead of hardcoding default layout into string
provided at compile time, there is now posibility to create that string
runtime. That's all.
And now... Your recomended solution is to change both U-Boot and Linux
to understand partition layout based on indexes and sizes expressed
in eraseblocks. While size of SPL could be nicely evaluated in terms
of eraseblocks, it is a bit more complicated with kernel partition,
because 10 eraseblocks says nothing about partition size, therefore
you cannot say whenever kernel will fit that space without knowledge
of eraseblock size. So you just reverted the problem and both U-Boot
and Linux would end with more code to be maintained for compatibility.
Best regards,
ladis
More information about the U-Boot
mailing list