[OpenWrt-Devel] [PATCH v2 4/6] ath79/mikrotik: use routerbootpart partitions

Thibaut VARÈNE hacks at slashdirt.org
Mon Apr 20 09:13:34 EDT 2020


Enable routerbootpart partitions on MikroTik devices.

Tested-by: Roger Pueyo Centelles <roger.pueyo at guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 .../qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts   | 18 +++++++-----------
 .../qca9558_mikrotik_routerboard-922uags-5hpacd.dts    | 17 +++++------------
 2 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts b/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts
index 529ac1cf3b..18b58990b9 100644
--- a/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts
+++ b/target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts
@@ -84,37 +84,33 @@
 				label = "RouterBoot";
 				reg = <0x0 0x20000>;
 				read-only;
-				compatible = "fixed-partitions";
+				compatible = "mikrotik,routerboot-partitions";
 				#address-cells = <1>;
 				#size-cells = <1>;
 
 				partition at 0 {
 					label = "bootloader1";
-					reg = <0x0 0xe000>;
+					reg = <0x0 0x0>;
 					read-only;
 				};
 
-				hard_config: partition at e000 {
-					label = "hard_config";
-					reg = <0xe000 0x1000>;
+				hard_config: hard_config {
 					read-only;
 				};
 
-				partition at f000 {
-					label = "bios";
-					reg = <0xf000 0x1000>;
+				bios {
+					size = <0x1000>;
 					read-only;
 				};
 
 				partition at 10000 {
 					label = "bootloader2";
-					reg = <0x10000 0xf000>;
+					reg = <0x10000 0x0>;
 					read-only;
 				};
 
-				partition at 1f000 {
+				soft_config {
 					label = "soft_config";
-					reg = <0x1f000 0x1000>;
 				};
 			};
 
diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
index 3f2a1a51a6..e40909678b 100644
--- a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
+++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
@@ -99,32 +99,25 @@
 		spi-max-frequency = <25000000>;
 
 		partitions {
-			compatible = "fixed-partitions";
+			compatible = "mikrotik,routerboot-partitions";
 			#address-cells = <1>;
 			#size-cells = <1>;
 
 			partition at 0 {
 				label = "routerboot";
-				reg = <0x0000000 0x000c000>;
+				reg = <0x0 0x0>;
 				read-only;
 			};
 
-			hard_config: partition at c000 {
-				label = "hard_config";
-				reg = <0x000c000 0x0001000>;
+			hard_config: hard_config {
 				read-only;
 			};
 
-			partition at d000 {
-				label = "bios";
-				reg = <0x000d000 0x0001000>;
+			bios {
 				read-only;
 			};
 
-			partition at e000 {
-				label = "soft_config";
-				reg = <0x000e000 0x0001000>;
-				read-only;
+			soft_config {
 			};
 		};
 	};
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list