[openwrt/openwrt] ramips: fix flash layout for TP-Link TL-WR841N v14

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 18 20:01:51 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1623defbdbb852a4018329d07673b4b8f66225a8

commit 1623defbdbb852a4018329d07673b4b8f66225a8
Author: Alexander Müller <donothingloop at gmail.com>
AuthorDate: Fri Jul 17 18:46:19 2020 +0200

    ramips: fix flash layout for TP-Link TL-WR841N v14
    
    The config partition was missing from the flash layout of the device.
    
    Although the stock firmware resets a corrupted config partition to the
    default values, the TFTP flash with an image bigger than 0x3d0000 will
    truncate the image as the bootloader only copies 0x3d0000 bytes to flash
    during TFTP flashing.
    
    Fixed by adding the config partition and shrinking the firmware
    partition.
    
    Fixes: 3fd97c522bb7 ("ramips: add support for TP-Link TL-WR841n v14")
    
    Signed-off-by: Alexander Müller <donothingloop at gmail.com>
---
 target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts | 8 +++++++-
 target/linux/ramips/image/mt76x8.mk                       | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
index b33c2ecae8..885e069b02 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
@@ -81,7 +81,13 @@
 			partition at 10000 {
 				compatible = "tplink,firmware";
 				label = "firmware";
-				reg = <0x10000 0x3e0000>;
+				reg = <0x10000 0x3d0000>;
+			};
+
+			partition at 3e0000 {
+				label = "config";
+				reg = <0x3e0000 0x10000>;
+				read-only;
 			};
 
 			factory: partition at 3f0000 {
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 4b2255bd6a..c9e70b7672 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -498,7 +498,7 @@ TARGET_DEVICES += tplink_tl-wr841n-v13
 
 define Device/tplink_tl-wr841n-v14
   $(Device/tplink-v2)
-  IMAGE_SIZE := 3968k
+  IMAGE_SIZE := 3904k
   DEVICE_MODEL := TL-WR841N
   DEVICE_VARIANT := v14
   TPLINK_FLASHLAYOUT := 4Mmtk



More information about the lede-commits mailing list