]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
apm821xx: wndr4700: merge ubi and ecos partitions 24098/head
authorRosen Penev <rosenp@gmail.com>
Mon, 6 Jul 2026 01:25:51 +0000 (18:25 -0700)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 6 Jul 2026 06:59:52 +0000 (08:59 +0200)
This concatenates the ubi partition (19.9 MiB) with the ecos partition
(96.1 MiB) into a single virtual MTD device for UBI, giving ~116 MiB
of usable flash space.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24098
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/apm821xx/dts/netgear-wndr4700.dts
target/linux/apm821xx/nand/config-default

index e5f4c09b13ec30d01beaed2d1917766d7e194832..0991fdfa4029c322ff3328f4c5dc7e281f6b8042 100644 (file)
                stdout-path = "/plb/opb/serial@ef600300:115200n8";
        };
 
+       ubi-concat {
+               compatible = "mtd-concat";
+               devices = <&ubiconcat0 &ubiconcat1>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               reg = <0x0 0x7400000>;
+                               label = "ubi";
+                       };
+               };
+       };
+
        thermal-zones {
                cpu_thermal: cpu-thermal {
                        polling-delay-passive = <10000>; /* milliseconds */
                                 */
                                };
 
-                               partition@480000 {
-                                       label = "ubi";
+                               ubiconcat0: partition@480000 {
+                                       label = "ubiconcat0";
                                        reg = <0x00480000 0x013e0000>;
                                };
                        };
                                read-only;
                        };
 
-                       partition@1fa0000 {
-                               label = "ecos";
+                       ubiconcat1: partition@1fa0000 {
+                               label = "ubiconcat1";
                                reg = <0x01fa0000 0x06020000>;
-                               read-only;
                        };
 
                        partition@7fc0000 {
index 84b269adaaaffcb4fdf843f352e9abda1e154d46..ac8beec7967006d13a2e282850b8ad3df603889b 100644 (file)
@@ -13,6 +13,7 @@ CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_NVMEM=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_VIRT_CONCAT=y
 # CONFIG_PCI_DISABLE_COMMON_QUIRKS is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_M48T86=y