[openwrt/openwrt] ipq40xx: fix hard_config partition size on MikroTik hAP-ac2

LEDE Commits lede-commits at lists.infradead.org
Sat May 8 03:21:10 PDT 2021


zorun pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/979f4063668185182db7bd2ad4efe6010047765e

commit 979f4063668185182db7bd2ad4efe6010047765e
Author: Baptiste Jonglez <git at bitsofnetworks.org>
AuthorDate: Mon May 3 12:39:47 2021 +0200

    ipq40xx: fix hard_config partition size on MikroTik hAP-ac2
    
    The routerbootparts driver dynamically discovers the location of MikroTik
    partitions, but it cannot determine their size (except by extending them
    up to the start of the next discovered partition).
    
    The hard_config partition has a default size of 0x1000 in the driver,
    while it actually takes 0x2000 on the hAP-ac2.  Set the correct size in
    the hAP-ac2 DTS.
    
    On most devices, this isn't a problem as the actual data fits in 0x1000
    bytes.  However, some devices have larger data that doesn't fit in 0x1000
    bytes.  In any case, all devices seen so far have enough space for a
    0x2000 hard_config partition before the start of the dtb_config partition.
    With the current 0x1000 size:
    
    0x00000000e000-0x00000000f000 : "hard_config"
    0x000000010000-0x000000017bbc : "dtb_config"
    
    With this patch extending the size to 0x2000:
    
    0x00000000e000-0x000000010000 : "hard_config"
    0x000000010000-0x000000017bbc : "dtb_config"
    
    Other ipq40xx boards may need the same fix but it needs testing.
    
    References: https://forum.openwrt.org/t/support-for-mikrotik-hap-ac2/23333/324
    Acked-by: Thibaut VARÈNE <hacks at slashdirt.org>
    Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
---
 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
index e1e6326ae9..d03409b556 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
@@ -191,6 +191,7 @@
 
 				hard_config {
 					read-only;
+					size = <0x2000>;
 				};
 
 				dtb_config {



More information about the lede-commits mailing list