[LEDE-DEV] [PATCH] cns3xxx: backport upstream SPI Flash partition sizes
Felix Fietkau
nbd at nbd.name
Thu Sep 15 13:24:59 PDT 2016
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