firmware-utils: tplink-safeloader: support strings as soft_version
authorJan Niehusmann <jan@gondor.com>
Fri, 19 May 2017 07:42:24 +0000 (09:42 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 11 Jun 2017 17:06:49 +0000 (19:06 +0200)
commitc4022243d8fe198b41488bc736f1c6cc3c7895bf
tree19c1b923e852cdede3641b3fda09a7a010f99d8d
parent8960f2b80c7f40d6943f093fcb99475d145e9dc9
firmware-utils: tplink-safeloader: support strings as soft_version

Some TP-Link routers (C25, C59, C60) contain a version string instead
of a binary structure in the soft_version partition.

Flashing LEDE from the original firmware's GUI, this version string
taken from the soft_ver partition of the firmware image is written to
the router's config partition.

When using tftp recovery to go back to the original Archer C25 firmware,
a version check compares that version to the version of the firmware to
be flashed.

Without proper contents in the config partition, reverting to the
original firmware fails.

Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver
partition.

Signed-off-by: Jan Niehusmann <jan@gondor.com>
tools/firmware-utils/src/tplink-safeloader.c