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 81215f55e2)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
Linus Walleij 2026-02-01 00:30:33 +01:00
parent dd4423f298
commit 1ed4f59e13
3 changed files with 75 additions and 24 deletions

View 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

View file

@ -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;
};

View file

@ -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;
+ };
};
};