[LEDE-DEV] [PATCH] cns3xxx: backport upstream SPI Flash partition sizes

Koen Vandeputte koen.vandeputte at ncentric.com
Mon Sep 19 00:20:11 PDT 2016


Hi Felix,

Apologies for the late reply.
I went on holidays after sending the patch last week.

I've extensively tested your changes yesterday and they work very nicely.
- Flashing old to new
- Flashing new to new
- Flashing new to old

A big advantage is that no more free space is wasted on the kernel 
partition.
Especially since this board only has 16MB NOR


[    2.610000] 0x000000060000-0x000000202be8 : "kernel"
[    2.610000] 0x000000202be8-0x000001000000 : "rootfs"


In my humble opinion it's an excellent improvement.
Thanks for your efforts,

Koen

On 2016-09-15 22:24, Felix Fietkau wrote:
> On 2016-09-15 20:27, Tim Harvey wrote:
>> Felix,
>>
>> I like the 'idea' of using mtdsplit (very clean) however this break's
>> the ability to downgrade firmware. If I take an old firmware image (a
>> version of OpenWrt prior to cns3xxx moving to the 4.4 kernel which
>> became too large to fit in the hard-coded mtd partitions chosen long
>> ago) I can upgrade with the new mtdsplit sysupgrade however if I then
>> try to downgrade to a non-mtdsplit sysupgrade image from the older
>> kernel it will fail in the image check with 'Invalid image type. Image
>> check 'platform_check_image' failed.'. I suppose if we wanted to
>> support upgrade and downgrade we would need to keep logic in
>> platform.sh to deal with the old partitioning.
> You can still downgrade, just use lede-cns3xxx-squashfs_laguna_nor.bin
> or lede-cns3xxx-squashfs_laguna_spi.bin instead of the -sysupgrade.bin.
> The new sysupgrade code will accept it, and even keeping the
> configuration should work that way.
>
> This is a bit confusing now, so some documentation will have to be
> written. I don't see any easier way though, and simply changing the
> partition sizes would also not have worked without breaking stuff.
>
>> I suppose sysupgrade != sysdowngrade so maybe I should care about
>> downgrading without JTAG?
>>
>> Also, to create JTAG images I need the root.squashfs and the uImage so
>> we need to keep those in the BIN_DIR (although we don't need to pad
>> them... I can do that in script that creates JTAG'able images).
> The new sysupgrade.bin can be written directly to flash now. You don't
> need separate root.squashfs and uImage anymore.
>
> - Felix




More information about the Lede-dev mailing list