From 75c2186487894b377278e859713c55cede37e908 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 5 Jul 2026 18:25:51 -0700 Subject: [PATCH] apm821xx: wndr4700: merge ubi and ecos partitions 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 Link: https://github.com/openwrt/openwrt/pull/24098 Signed-off-by: Jonas Jelonek --- .../linux/apm821xx/dts/netgear-wndr4700.dts | 25 +++++++++++++++---- target/linux/apm821xx/nand/config-default | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/target/linux/apm821xx/dts/netgear-wndr4700.dts b/target/linux/apm821xx/dts/netgear-wndr4700.dts index e5f4c09b13e..0991fdfa402 100644 --- a/target/linux/apm821xx/dts/netgear-wndr4700.dts +++ b/target/linux/apm821xx/dts/netgear-wndr4700.dts @@ -23,6 +23,22 @@ 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 */ @@ -241,8 +257,8 @@ */ }; - partition@480000 { - label = "ubi"; + ubiconcat0: partition@480000 { + label = "ubiconcat0"; reg = <0x00480000 0x013e0000>; }; }; @@ -279,10 +295,9 @@ read-only; }; - partition@1fa0000 { - label = "ecos"; + ubiconcat1: partition@1fa0000 { + label = "ubiconcat1"; reg = <0x01fa0000 0x06020000>; - read-only; }; partition@7fc0000 { diff --git a/target/linux/apm821xx/nand/config-default b/target/linux/apm821xx/nand/config-default index 84b269adaaa..ac8beec7967 100644 --- a/target/linux/apm821xx/nand/config-default +++ b/target/linux/apm821xx/nand/config-default @@ -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 -- 2.47.3