ramips: fix flash layout for TP-Link TL-WR841N v14
authorAlexander Müller <donothingloop@gmail.com>
Fri, 17 Jul 2020 16:46:19 +0000 (18:46 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 19 Jul 2020 00:01:06 +0000 (02:01 +0200)
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@gmail.com>
target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
target/linux/ramips/image/mt76x8.mk

index b33c2ecae82ac39e48e0b6d88d04071c7a0b26b4..885e069b02877a72c323d6bd8009f98954f2fc4e 100644 (file)
                        partition@10000 {
                                compatible = "tplink,firmware";
                                label = "firmware";
-                               reg = <0x10000 0x3e0000>;
+                               reg = <0x10000 0x3d0000>;
+                       };
+
+                       partition@3e0000 {
+                               label = "config";
+                               reg = <0x3e0000 0x10000>;
+                               read-only;
                        };
 
                        factory: partition@3f0000 {
index 4b2255bd6ac38db496df53be3c18dbc61250efd8..c9e70b76721b2d2e227b86913777f483a2fc43ac 100644 (file)
@@ -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