]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
gemini: sq201: override SQ201 partitions for firmware
authorLinus Walleij <linusw@kernel.org>
Sat, 31 Jan 2026 23:30:33 +0000 (00:30 +0100)
committerLinus Walleij <linusw@kernel.org>
Tue, 3 Feb 2026 12:33:12 +0000 (13:33 +0100)
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 <linusw@kernel.org>
target/linux/gemini/image/Makefile
target/linux/gemini/patches-6.12/301-ARM-dts-gemini-iTian-SQ201-need-to-boot-from-mtdbloc.patch [deleted file]
target/linux/gemini/patches-6.12/304-gemini-augment-SQ201-DTS-with-botched-partitions.patch [new file with mode: 0644]

index d4c54014ade0aa0b853f4cccb8b3317d2b827c69..0e672077158e045737a54aed3f595a13f1fc940c 100644 (file)
@@ -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 (file)
index 593e66f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From e2bb2bcf9ea335b0a874683a5a56940c39901fcd Mon Sep 17 00:00:00 2001
-From: Linus Walleij <linusw@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@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 (file)
index 0000000..79e7d80
--- /dev/null
@@ -0,0 +1,68 @@
+From e0881008b49ecbec1c88f1f96c62a6a37c808df4 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linusw@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@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@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;
++                              };
+                       };
+               };