aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/mktplinkfw2.c
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-03 12:02:48 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-03 12:17:08 +0200
commit1deaf695ec02d765c9ae28b1bac264798ca54a05 (patch)
tree535a5ef2cb725c714b96377780441bec9f6e2d5e /tools/firmware-utils/src/mktplinkfw2.c
parent18b7d87a8f76b4cf36e943d9211bd26d79f55ec6 (diff)
downloadupstream-1deaf695ec02d765c9ae28b1bac264798ca54a05.tar.gz
upstream-1deaf695ec02d765c9ae28b1bac264798ca54a05.tar.bz2
upstream-1deaf695ec02d765c9ae28b1bac264798ca54a05.zip
ramips: fix/tidy up 4M tplink-v2-image flash layouts
For the TP-Link 4M devices with tplink-v2-image recipe (mktplinkfw2.c), there are two different flash layouts based on the size of the (u)boot partition: device uboot OEM firmware OpenWrt (incl. config) tl-wr840n-v5 0x20000 0x3c0000 0x3d0000 tl-wr841n-v14 0x10000 0x3d0000 0x3e0000 In both cases, the 0x10000 config partition is used for the firmware partition as well due to the limited space available and since it's recreated by the OEM firmware anyway. However, the TFTP flashing process will only copy data up to the size of the initial (OEM) firmware size. Therefore, while we can use the bigger partition to have additional erase blocks on the device, we have to limit the image sizes to the TFTP limits. So far, only one layout definition has been set up in mktplinkfw2.c for 4M mediatek devices. This adds a second one and assigns them to the devices so the image sizes are correctly restrained. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'tools/firmware-utils/src/mktplinkfw2.c')
-rw-r--r--tools/firmware-utils/src/mktplinkfw2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c
index 102d72b1cc..e1c28e6347 100644
--- a/tools/firmware-utils/src/mktplinkfw2.c
+++ b/tools/firmware-utils/src/mktplinkfw2.c
@@ -124,6 +124,12 @@ char md5salt_boot[MD5SUM_LEN] = {
static struct flash_layout layouts[] = {
{
.id = "4Mmtk",
+ .fw_max_len = 0x3c0000,
+ .kernel_la = 0x80000000,
+ .kernel_ep = 0x80000000,
+ .rootfs_ofs = 0x140000,
+ }, {
+ .id = "4MLmtk",
.fw_max_len = 0x3d0000,
.kernel_la = 0x80000000,
.kernel_ep = 0x80000000,