[openwrt/openwrt] gemini: sq201: override SQ201 partitions for firmware

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 10 23:48:25 PST 2026


linusw pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/1ed4f59e133160c651a32fc91a23362173e57334

commit 1ed4f59e133160c651a32fc91a23362173e57334
Author: Linus Walleij <linusw at kernel.org>
AuthorDate: Sun Feb 1 00:30:33 2026 +0100

    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
    (cherry picked from commit 81215f55e274b9127f3491590bd237d1f836a014)
    Link: https://github.com/openwrt/openwrt/pull/21973
    Signed-off-by: Linus Walleij <linusw at kernel.org>
---
 target/linux/gemini/image/Makefile                 |  7 +++
 ...ini-iTian-SQ201-need-to-boot-from-mtdbloc.patch | 24 --------
 ...augment-SQ201-DTS-with-botched-partitions.patch | 68 ++++++++++++++++++++++
 3 files changed, 75 insertions(+), 24 deletions(-)

diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index d4c54014ad..0e67207715 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 593e66f629..0000000000
--- 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 <linusw at kernel.org>
-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 <linusw at kernel.org>
----
- 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 0000000000..79e7d80825
--- /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 <linusw at kernel.org>
+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 <linusw at kernel.org>
+---
+ 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 at 0 {
++					label = "BOOT";
++					reg = <0x00000000 0x00016000>;
++					read-only;
++				};
++				partition at 1 {
++					compatible = "openwrt,executable-prolog";
++					label = "firmware";
++					reg = <0x00120000 0x00e00000>;
++				};
++				partition at 2 {
++					label = "VCTL";
++					reg = <0x00f20000 0x00020000>;
++					read-only;
++				};
++				partition at 3 {
++					label = "CurConf";
++					reg = <0x00f40000 0x000a0000>;
++					read-only;
++				};
++				partition at 4 {
++					label = "FIS directory";
++					reg = <0x00fe0000 0x00020000>;
++					read-only;
++				};
+ 			};
+ 		};
+ 




More information about the lede-commits mailing list