ramips: tl-wr840n-v5: increase firmware partition for 4Mmtk layot
authorSerg Studzinskii <serguzhg@gmail.com>
Sun, 24 Dec 2017 16:00:13 +0000 (18:00 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 18 Jan 2018 07:04:18 +0000 (08:04 +0100)
According to console log during TP-Link TL-WR840N v5 OEM firmware update
procedure 0x3e0000-0x3f0000 64kB "config" partition, which is used to store
router's configuration settings, is erased and recreated again during every
OEM firmware update procedure, thus does not contain any valuable factory data.
So it is conviniant to use this extra 64kB erase block for jffs overlay due
limited flash size on this device like it used on TP-Link's ar71xx boards.

Signed-off-by: Serg Studzinskii <serguzhg@gmail.com>
target/linux/ramips/dts/TL-WR840NV5.dts
target/linux/ramips/image/mt76x8.mk
tools/firmware-utils/src/mktplinkfw2.c

index 340f2bbd83898fae42b63bb3a8f05a05148b2628..ecc0fedd5938d016af3b2c6c3053922844793112 100644 (file)
 
                partition@20000 {
                        label = "firmware";
-                       reg = <0x20000 0x3c0000>;
-               };
-
-               partition@3e0000 {
-                       label = "config";
-                       reg = <0x3e0000 0x10000>;
-                       read-only;
+                       reg = <0x20000 0x3d0000>;
                };
 
                factory: partition@3f0000 {
index 60864cfed3cb303446b617af6be2abda3e6d72ea..8332c7c4233d06f61fc5f3984cf2a282b8f7863c 100644 (file)
@@ -112,7 +112,7 @@ TARGET_DEVICES += tl-wr840n-v4
 
 define Device/tl-wr840n-v5
   DTS := TL-WR840NV5
-  IMAGE_SIZE := 3840k
+  IMAGE_SIZE := 3904k
   DEVICE_TITLE := TP-Link TL-WR840N v5
   TPLINK_FLASHLAYOUT := 4Mmtk
   TPLINK_HWID := 0x08400005
index 3cb5ba0835ff9ca431717fcd869753a478af1e49..dead49e7af8839bac5d1dee7445cf8921208c970 100644 (file)
@@ -124,7 +124,7 @@ char md5salt_boot[MD5SUM_LEN] = {
 static struct flash_layout layouts[] = {
        {
                .id             = "4Mmtk",
-               .fw_max_len     = 0x3c0000,
+               .fw_max_len     = 0x3d0000,
                .kernel_la      = 0x80000000,
                .kernel_ep      = 0x80000000,
                .rootfs_ofs     = 0x140000,