]> git.ipfire.org Git - thirdparty/openwrt.git/commit
gemini: support upgrade on reference designs
authorLinus Walleij <linusw@kernel.org>
Wed, 21 Jan 2026 21:24:46 +0000 (22:24 +0100)
committerLinus Walleij <linusw@kernel.org>
Sat, 24 Jan 2026 16:29:17 +0000 (17:29 +0100)
commit0b0cd4efe25d9ee73896c8fa3079074dbae2637d
tree34e5a7a21126bb230e16c7ea6ae69b42f6cb9b42
parent372f2563f602363c0b68d5263039c5649490a175
gemini: support upgrade on reference designs

The Gemini reference design-derived devices uses a partition
format which is predictable and we can exploit this to offer
some proper upgrade path.

The kernel for these contains a hack to use this partition
format unaltered by combining the partitions "Kern" and "Ramdisk"
to one image with all of the kernel+ramdisk in memory.

Then the "Application" which is used for the rootfs go into its
own partition.

Standard flash layout:
Kern         2048k |
Ramdisk      6144k | = 9216k
Application  6144k | = 15360k

Following the pattern of the factory image we create three
images named zImage, rd.gz and hddapp.tgz (these filenames
are misleading! They are just required by the old firmware.)
and flash each individually with "mtd" during upgrades.

Since the IB-4220-V has a different layout with a bigger kernel
space we parameterize this so we can handle this too. (More
fixes are needed for that device though.)

A way to upgrade older OpenWrt on these platforms to the latest
and greatest will be to copy the file
target/linux/gemini/base-files/lib/upgrade/platform.sh
to /lib/upgrade/platform.sh
on your running system and then run sysupgrade from the image
produced after this patch.

The script is picky to sanity check the partitions before
commencing upgrade.

This was tested with a full sysupgrade on the iTian SQ201.

Link: https://github.com/openwrt/openwrt/pull/21680
Signed-off-by: Linus Walleij <linusw@kernel.org>
target/linux/gemini/base-files/lib/upgrade/platform.sh
target/linux/gemini/image/Makefile