
On 6 June 2016 at 09:48, Ladislav Michl ladis@linux-mips.org wrote:
On Mon, Jun 06, 2016 at 09:08:47AM +0200, Michal Suchanek wrote:
On 5 June 2016 at 20:23, Ladislav Michl ladis@linux-mips.org wrote:
Unless I'm missing something, partition layout is passed to the kernel from the bootloader. So if kernel ends up with a different layout than a bootloader, there's a bug somewhere and that should be fixed.
That's not it. The problem is that if this patch changes the layout then building u-boot before this patch gives one layout and after this patch it gives another layout effectively changing the partitioning. All to save a few megabytes of a several gigiabyte medium. And if you say that people can always set the partitioning by hand then it completely defeats the purpose of fine-tuning the default in the first place.
U-Boot never prevented people from shooting their own leg, therefore there's no 'feature' preventing them to change default layout. They are still free to do whatever they want it they find it useful. Also I'm not proposing to change layout for exiting boards, just proving way to do it. igep00x0 boards had buggy NAND support since begining, so while fixing that, let's do it right way. Note that this feature is completely optional.
If on the other hand Linux got support for sizing partitions in nand pages or eraseblocks and a patch changed the mtdparts layout to use the new units then either both u-boot and Linux support the units or parsing the partition fails. So it's safe and flexible and more general and probably even less work on u-boot's part.
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.
Thanks
Michal