[PATCH firmware-utils v1 00/10] Refactor image ingestion to support new formats

Sander Vanheule sander at svanheule.net
Fri Feb 3 14:03:14 PST 2023


TP-Link is playing fast and loose with the safeloader format, having
resulted in different types of images with their specific quirks.

A new incompatible format is currently used in the wild, which places
the payload partition table at a different offset, causing the image
parsers to fail. [1]

This series starts by fixing a bug or two and cleaning up the code a
tiny bit, and then refactors the different image ingestion options to
use one common parser.

Finally, support for the QNEW and Cloud images types is added through the
new parser. The latter doesn't really need explicit support at the
moment, so the patch serves mostly as documentation.

[1] https://forum.openwrt.org/t/148982

Best,
Sander

Sander Vanheule (10):
  tplink-safeloader: stricter free_image_partition()
  tplink-safeloader: use enum for table types
  tplink-safeloader: replace hardcoded offsets
  tplink-safeloader: stop at nameless partition
  tplink-safeloader: don't end-pad sysupgrade file
  tplink-safeloader: ignore NULLs in version info
  tplink-safeloader: refactor image ingestion
  tplink-safeloader: add vendor info support
  tplink-safeloader: add QNEW image detection
  tplink-safeloader: add Cloud image detection

 src/tplink-safeloader.c | 341 ++++++++++++++++++++++++++--------------
 1 file changed, 222 insertions(+), 119 deletions(-)

-- 
2.39.0




More information about the openwrt-devel mailing list