On Thu, Sep 15, 2016 at 7:36 AM, Tim Harvey <thar...@gateworks.com> wrote: > On Thu, Sep 15, 2016 at 4:03 AM, Felix Fietkau <n...@nbd.name> wrote: >> On 2016-09-15 12:16, Felix Fietkau wrote: >>> On 2016-09-15 11:34, Koen Vandeputte wrote: >>>> As indicated by Tim Harvey: >>>> >>>> The 4.4 kernel is not easily sized down to below the 1.5MB limit >>>> imposed by the SPI flash MTD partition mapping. Increase this >>>> to 2MB where it is for NOR flash devices. >>>> Additionally add a check that ensures the kernel fits within >>>> the 2MB limit. >>>> >>>> This resolves boot issues on SPI based boards such as the GW2380/82. >>>> >>>> https://github.com/Gateworks/openwrt/commit/17b860f32fe5739042445eb852109682d6ff7d99 >>>> >>>> Signed-off-by: Koen Vandeputte <koen.vandepu...@ncentric.com> >>> I'm now working on the approach that I encouraged Tim to take when this >>> issue came up last. I think simply bumping the hardcoded kernel/rootfs >>> split partition sizes is a hack at best, my solution involves using >>> mtdsplit to make the kernel/rootfs split dynamic, like on other platforms. >>> From what I can tell, the old sysupgrade script is written in a way that >>> the image format changes will not break sysupgrade from old firmware to >>> new and vice versa. >> It's done now and pushed to my staging tree: >> https://git.lede-project.org/?p=lede/nbd/staging.git;a=commit;h=aa58ee42c93136a8e158ef317cad20806001c039 >> >> Please take a look at the commit description, test it, and let me know >> what you think. >> >> - Felix >
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. 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). Regards, Tim _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev