From: Linus Walleij Date: Sat, 31 Jan 2026 23:30:33 +0000 (+0100) Subject: gemini: sq201: override SQ201 partitions for firmware X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81215f55e274b9127f3491590bd237d1f836a014;p=thirdparty%2Fopenwrt.git gemini: sq201: override SQ201 partitions for firmware This is patch is identical in form and purpose as the IB-4220-B patch. We switch over to a single "firmware" partition. Link: https://github.com/openwrt/openwrt/pull/21820 Signed-off-by: Linus Walleij --- diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index d4c54014ade..0e672077158 100644 --- a/target/linux/gemini/image/Makefile +++ b/target/linux/gemini/image/Makefile @@ -166,6 +166,10 @@ define Build/storlink-2048k-default-image $(call CreateStorlinkTarfile,$(1),2048k,2096640) endef +define Build/storlink-2048k-factory-image + $(call CreateStorlinkFactoryfile,$(1),2048k,2096640) +endef + define Build/storlink-2048k-sysupgrade-image $(call CreateStorlinkSysupgradefile,$(1),2048k) endef @@ -269,6 +273,9 @@ define Device/itian_sq201 DEVICE_VENDOR := ITian DEVICE_MODEL := Square One SQ201 DEVICE_DTS := gemini-sq201 + IMAGE/factory.bin := storlink-2048k-factory-image $(1) + IMAGE/sysupgrade.bin := storlink-2048k-sysupgrade-image $(1) |\ + append-metadata DEVICE_PACKAGES += kmod-rt61-pci kmod-usb2-pci kmod-dsa-vsc73xx-spi endef TARGET_DEVICES += itian_sq201 diff --git a/target/linux/gemini/patches-6.12/301-ARM-dts-gemini-iTian-SQ201-need-to-boot-from-mtdbloc.patch b/target/linux/gemini/patches-6.12/301-ARM-dts-gemini-iTian-SQ201-need-to-boot-from-mtdbloc.patch deleted file mode 100644 index 593e66f6294..00000000000 --- a/target/linux/gemini/patches-6.12/301-ARM-dts-gemini-iTian-SQ201-need-to-boot-from-mtdbloc.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e2bb2bcf9ea335b0a874683a5a56940c39901fcd Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Fri, 23 Jan 2026 21:04:10 +0100 -Subject: [PATCH] ARM: dts: gemini: iTian SQ201 need to boot from mtdblock3 - -Alter the rootfs partition to the one actually used for the -rootfs. - -Signed-off-by: Linus Walleij ---- - arch/arm/boot/dts/gemini/gemini-sq201.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/gemini/gemini-sq201.dts -+++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts -@@ -20,7 +20,7 @@ - }; - - chosen { -- bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; -+ bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait"; - stdout-path = &uart0; - }; - diff --git a/target/linux/gemini/patches-6.12/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch b/target/linux/gemini/patches-6.12/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch new file mode 100644 index 00000000000..79e7d808259 --- /dev/null +++ b/target/linux/gemini/patches-6.12/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch @@ -0,0 +1,68 @@ +From e0881008b49ecbec1c88f1f96c62a6a37c808df4 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 1 Feb 2026 00:21:08 +0100 +Subject: [PATCH] gemini: augment SQ201 DTS with botched partitions + +Same botched partitions as the Raidsonic IB-4220-B. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/gemini/gemini-sq201.dts | 39 ++++++++++++++++++++--- + 1 file changed, 35 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/gemini/gemini-sq201.dts ++++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts +@@ -20,7 +20,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; ++ bootargs = "console=ttyS0,115200n8"; + stdout-path = &uart0; + }; + +@@ -131,10 +131,41 @@ + /* 16MB of flash */ + reg = <0x30000000 0x01000000>; + ++ /* ++ * Override the RedBoot partition table with fixed partitions ++ * in order to create a coherent "firmware" partition so that ++ * we can have optimal flash usage with OpenWrt in a big ++ * MTD-splitted "firmware" partition. ++ */ + partitions { +- compatible = "redboot-fis"; +- /* Eraseblock at 0xfe0000 */ +- fis-index-block = <0x7f>; ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@0 { ++ label = "BOOT"; ++ reg = <0x00000000 0x00016000>; ++ read-only; ++ }; ++ partition@1 { ++ compatible = "openwrt,executable-prolog"; ++ label = "firmware"; ++ reg = <0x00120000 0x00e00000>; ++ }; ++ partition@2 { ++ label = "VCTL"; ++ reg = <0x00f20000 0x00020000>; ++ read-only; ++ }; ++ partition@3 { ++ label = "CurConf"; ++ reg = <0x00f40000 0x000a0000>; ++ read-only; ++ }; ++ partition@4 { ++ label = "FIS directory"; ++ reg = <0x00fe0000 0x00020000>; ++ read-only; ++ }; + }; + }; +