Sander Vanheule fe96e718c8 firmware-utils: tplink-safeloader: refactor meta-partition generation
TP-Link safeloader firmware images contain a number of (small)
partitions with information about the device. These consist of:
* The data length as a 32-bit integer
* A 32-bit zero padding
* The partition data, with its length set in the first field

The OpenWrt factory image partitions that follow this structure are
soft-version, support-list, and extra-para. Refactor the code to put all
common logic into one allocation call, and let the rest of the data be
filled in by the original functions.

Due to the extra-para changes, this patch results in factory images that
change by 2 bytes (not counting the checksum) for three devices:
* ARCHER-A7-V5
* ARCHER-C7-V4
* ARCHER-C7-V5

These were the devices where the extra-para blob didn't match the common
format. The hardcoded data also didn't correspond to TP-Link's (recent)
upgrade images, which actually matches the meta-partition format.

A padding byte is also added to the extra-para partition for EAP245-V3.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: maurerr <mariusd84@gmail.com>
2021-09-01 08:07:20 +00:00
..
2021-09-01 08:07:13 +00:00
2021-09-01 08:06:53 +00:00
2021-09-01 08:07:13 +00:00
2021-09-01 08:06:55 +00:00
2021-09-01 08:07:13 +00:00
2018-11-25 19:23:03 +01:00
2019-07-08 16:42:26 +02:00
2021-09-01 08:07:13 +00:00
2020-03-14 13:20:06 +00:00
2019-02-26 23:20:04 +01:00
2021-09-01 08:07:00 +00:00
2021-09-01 08:07:13 +00:00
2021-09-01 08:06:53 +00:00
2020-04-09 22:09:04 +02:00
2021-09-01 08:06:56 +00:00
2020-02-18 21:39:03 +01:00
2019-11-24 21:35:45 +01:00
2020-02-18 21:39:14 +01:00
2018-06-08 09:56:26 +02:00
2019-03-10 21:36:28 +01:00
2020-04-09 22:09:13 +02:00
2020-05-31 11:03:30 +02:00