[openwrt/openwrt] apm821xx: use nested fixed-partitions

LEDE Commits lede-commits at lists.infradead.org
Sat May 14 02:10:14 PDT 2022


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d65bafa34bc57f652800cf0f6e6402ff7dca0289

commit d65bafa34bc57f652800cf0f6e6402ff7dca0289
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat May 14 10:44:58 2022 +0200

    apm821xx: use nested fixed-partitions
    
    This makes it possible to fix Netgear WNDAP620+660 DTS ugliness.
    Bring back the dtb and firmware partitions for the WNDR4700.
    Thank you, mans0n.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/dts/netgear-wndap6x0.dtsi | 32 +++++++++++---------
 target/linux/apm821xx/dts/netgear-wndr4700.dts  | 39 ++++++++++++++++++-------
 2 files changed, 47 insertions(+), 24 deletions(-)

diff --git a/target/linux/apm821xx/dts/netgear-wndap6x0.dtsi b/target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
index c6f112d240..8a15a78dce 100644
--- a/target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
+++ b/target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
@@ -52,23 +52,27 @@
 				read-only;
 			};
 
-			partition at 110000,0 {
+			partition at 110000 {
 				label = "firmware";
 				reg = <0x00110000 0x01ac0000>;
-			};
-
-			partition at 110000,1 {
-				/*
-				 * The u-boot bootloader will look at this
-				 * offset (0x110000) for an uImage binary.
-				 */
-				label = "kernel";
-				reg = <0x00110000 0x005f0000>;
-			};
 
-			partition at 700000 {
-				label = "ubi";
-				reg = <0x00700000 0x014d0000>;
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition at 0 {
+					/*
+					 * The u-boot bootloader will look at this
+					 * offset (0x110000) for an uImage binary.
+					 */
+					label = "kernel";
+					reg = <0x00000000 0x005f0000>;
+				};
+
+				partition at 5f0000 {
+					label = "ubi";
+					reg = <0x005f0000 0x014d0000>;
+				};
 			};
 
 			partition at 1bd0000 {
diff --git a/target/linux/apm821xx/dts/netgear-wndr4700.dts b/target/linux/apm821xx/dts/netgear-wndr4700.dts
index fe0f713943..342f9a01db 100644
--- a/target/linux/apm821xx/dts/netgear-wndr4700.dts
+++ b/target/linux/apm821xx/dts/netgear-wndr4700.dts
@@ -187,22 +187,41 @@
 			};
 
 			partition at 180000 {
-				label = "kernel";
-				reg = <0x00180000 0x00380000>;
+				label = "firmware";
+				reg = <0x00180000 0x01860000>;
+
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition at 0 {
+					label = "kernel";
+					reg = <0x00000000 0x00380000>;
+
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					/*
+					 * device-tree is @ 0x00180000 - 0x0019ffff
+					 * kernel starts from 0x20000.
+					 * this is coded into netgear's u-boot.
+					 */
+					partition at 0 {
+						label = "dtb";
+						reg = <0x00000000 0x20000>;
+					};
 				/*
-				 * device-tree is @ 0x00180000 - 0x001fffff
-				 * kernel starts from 0x200000.
-				 * this is coded into netgear's u-boot.
-				 *
 				 * this partition will also contain a
 				 * fake/empty rootfs at the end to fool
 				 * Netgear's uboot rootfs integrety checks.
 				 */
-			};
+				};
 
-			partition at 500000 {
-				label = "ubi";
-				reg = <0x00500000 0x014e0000>;
+				partition at 380000 {
+					label = "ubi";
+					reg = <0x00380000 0x014e0000>;
+				};
 			};
 
 




More information about the lede-commits mailing list