From 7a4bd9cc518933d61099f109ce050c03afdc1c83 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 4 May 2021 23:32:00 -0400 Subject: ath79: use dynamic partitioning for TP-Link CPE series CPExxx and WBSxxx boards with AR9344 SOC use the OKLI lzma kernel loader with the offset of 3 blocks of length 4k (0x3000) in order to have a fake "kernel" that cannot grow larger than how it is defined in the now static OEM partition table. Before recent changes to the mtdsplit driver, the uImage parser for OKLI only supported images that started exactly on an eraseblock boundary. The mtdsplit parser for uImage now supports identifying images with any magic number value and at any offset from the eraseblock boundary using DTS properties to define those values. So, it is no longer necessary to use fixed sizes for kernel and rootfs Tested-by: Andrew Cameron [CPE510 v2] Tested-by: Bernhard Geier [WBS210 v2] Tested-by: Petrov [CPE210 v1] Signed-off-by: Michael Pratt (cherry picked from commit 7b9a0c264cb9dc2c5a946a0aa9a290427a5e559c) --- target/linux/ath79/dts/ar9344_tplink_cpe.dtsi | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'target/linux/ath79/dts/ar9344_tplink_cpe.dtsi') diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi index d4b7de440a..fd6aa0f08b 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -59,20 +60,9 @@ partition@40000 { label = "firmware"; reg = <0x040000 0x780000>; - - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "kernel"; - reg = <0x000000 0x300000>; - }; - - partition@300000 { - label = "rootfs"; - reg = <0x300000 0x480000>; - }; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; + openwrt,offset = <0x3000>; }; partition@7c0000 { -- cgit v1.2.3