From: Adrian Schmutzler Date: Wed, 22 Jul 2020 16:49:09 +0000 (+0200) Subject: Revert "ramips: fix flash layout for TP-Link TL-WR841N v14" X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b057862e245444f447484149885ee3d8a001eeaa;p=openwrt%2Fstaging%2Fnoltari.git Revert "ramips: fix flash layout for TP-Link TL-WR841N v14" This reverts commit 1623defbdbb852a4018329d07673b4b8f66225a8. As already stated in the reverted patch, the OEM firmware will properly recreate the config partition if it is overwritten by OpenWrt. The main reason for adding the partition was the image size restriction imposed by the 0x3d0000 limitation of the TFTP flashing process. Addressing this by shrinking the firmware partition is not a good solution to that problem, though: 1. For a working image, the size of the content has to be smaller than the available space, so empty erase blocks will remain. 2. Conceptually, the restriction is on the image, so it makes sense to implement it in the same way, and not via the partitioning. Users could e.g. do initial flash with TFTP restriction with an older image, and then sysupgrade into a newer one, so TFTP restriction does not apply. 3. The (content) size of the recovery image is enforced to 0x3d0000 by the tplink-v2-image command in combination with TPLINK_FLASHLAYOUT (flash layout in mktplinkfw2.c) anyway. Signed-off-by: Adrian Schmutzler --- 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 885e069b02..b33c2ecae8 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -81,13 +81,7 @@ partition@10000 { compatible = "tplink,firmware"; label = "firmware"; - reg = <0x10000 0x3d0000>; - }; - - partition@3e0000 { - label = "config"; - reg = <0x3e0000 0x10000>; - read-only; + reg = <0x10000 0x3e0000>; }; factory: partition@3f0000 { diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index c9e70b7672..4b2255bd6a 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 := 3904k + IMAGE_SIZE := 3968k DEVICE_MODEL := TL-WR841N DEVICE_VARIANT := v14 TPLINK_FLASHLAYOUT := 4Mmtk