aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2021-05-04 23:32:00 -0400
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-06-05 23:39:14 +0200
commit7b9a0c264cb9dc2c5a946a0aa9a290427a5e559c (patch)
tree7d4fd1386e3c35be7ec2de8ecec13efbf66d31fc /tools
parent6bc4c0ae3eb3dff6e410b5b012ab0bec267adb5a (diff)
downloadupstream-7b9a0c264cb9dc2c5a946a0aa9a290427a5e559c.tar.gz
upstream-7b9a0c264cb9dc2c5a946a0aa9a290427a5e559c.tar.bz2
upstream-7b9a0c264cb9dc2c5a946a0aa9a290427a5e559c.zip
ath79: use dynamic partitioning for TP-Link CPE series
CPExxx and WBSxxx boards with AR9344 SOC use the OKLI lzma kernel loader with the offset of 3 blocks of length 4k (0x3000) in order to have a fake "kernel" that cannot grow larger than how it is defined in the now static OEM partition table. Before recent changes to the mtdsplit driver, the uImage parser for OKLI only supported images that started exactly on an eraseblock boundary. The mtdsplit parser for uImage now supports identifying images with any magic number value and at any offset from the eraseblock boundary using DTS properties to define those values. So, it is no longer necessary to use fixed sizes for kernel and rootfs Tested-by: Andrew Cameron <apcameron@softhome.net> [CPE510 v2] Tested-by: Bernhard Geier <freifunk@geierb.de> [WBS210 v2] Tested-by: Petrov <d7c48mWsPKx67w2@gmail.com> [CPE210 v1] Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'tools')
-rw-r--r--tools/firmware-utils/src/tplink-safeloader.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 878a0afbe5..e5974325ae 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -156,8 +156,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -279,8 +278,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -358,8 +356,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -400,8 +397,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -445,8 +441,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -485,8 +480,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -525,8 +519,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -557,8 +550,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -589,8 +581,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -622,8 +613,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},
@@ -655,8 +645,7 @@ static struct device_info boards[] = {
{"default-mac", 0x30000, 0x00020},
{"product-info", 0x31100, 0x00100},
{"signature", 0x32000, 0x00400},
- {"os-image", 0x40000, 0x300000},
- {"file-system", 0x340000, 0x470000},
+ {"firmware", 0x40000, 0x770000},
{"soft-version", 0x7b0000, 0x00100},
{"support-list", 0x7b1000, 0x00400},
{"user-config", 0x7c0000, 0x10000},