openwrt/tools
Petr Štetiar e6d66375cb tplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x
Currently it's not possible to flash factory images on devices shipped
with vendor firmware versions 1.1.0 Build 20201120 rel. 50406 (published
2020-12-22):

 (curFw_ver, newFw_ver) == (1.1, 1.0) [NM_Error](nm_checkSoftVer) 00848: Firmwave not supports, check failed.
 [NM_Error](nm_checkUpdateContent) 01084: software version dismatched
 [NM_Error](nm_buildUpgradeStruct) 01188: checkUpdateContent failed.

They've even following note in release notes:

 Note: You will be unable to downgrade to the previous firmware version
       after updating this firmware.

This version check in vendor firmware is implemented in
/usr/bin/nvrammanager binary likely as following C code[1]:

 sscanf(buf, "%d.%d.%*s",&upd_fw_major, &upd_fw_minor);
 ...
 if (((int)upd_fw_major < (int)cur_fw_major) ||
     ((ret = 1, cur_fw_major == upd_fw_major && (upd_fw_minor < (int)cur_fw_minor)))) {
       ret = 0;
       printf("[NM_Error](%s) %05d: Firmwave not supports, check failed.\r\n\r\n","nm_checkSoftVer" ,0x350);
 }
 ...
 return ret;

So in order to fix this and make it future proof it should be enough to
ship our factory firmware images with major version 7 (lucky number).

Tested on latest firmware version 1.1.2 Build 20210125 rel.37999:

 Firmwave supports, check OK.
  (curFw_ver, newFw_ver) == (1.1, 7.0) check firmware ok!

Flashing back to vendor firmware
c7v5_us-up-ver1-1-2-P1[20210125-rel37999]_2021-01-25_10.33.55.bin works
as well:

 U-Boot 1.1.4-gbec22107-dirty (Nov 18 2020 - 18:19:12)
 ...
 Firmware downloaded... filesize = 0xeeae77 fileaddr = 0x80060000.
 Firmware Recovery file length : 15642231
 Firmware process id 2.
 handle_fw_cloud 146
 Image verify OK!
 Firmware file Verify ok!
 product-info:product_name:Archer C7
 product_ver:5.0.0
 special_id:55530000
 [Error]sysmgr_cfg_checkSupportList(): 1023 @ specialId 45550000 NOT Match.
 Firmware supports, check OK.
 Firmware Recovery check ok!

1. https://gist.github.com/ynezz/2e0583647d863386a66c3d231541b6d1

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-04-13 10:29:25 +02:00
..
autoconf
autoconf-archive
automake
b43-tools
bc tools/bc: use autoreconf to fix build failure on macOS with recent Xcode versions 2020-11-14 14:48:30 +01:00
bison tools/bison: update to 3.7.4 2020-11-21 18:49:08 +01:00
cbootimage treewide: update email address of Tomasz Maciej Nowak 2020-11-24 15:39:07 +01:00
cbootimage-configs treewide: update email address of Tomasz Maciej Nowak 2020-11-24 15:39:07 +01:00
ccache tools/ccache: find libzstd using rpath 2021-01-10 21:40:23 -10:00
cmake tools/cmake: always use non-ccache CC and CXX variables 2021-01-06 21:44:56 -10:00
coreutils
cpio tools: add cpio 2021-02-28 00:09:09 +00:00
dosfstools
e2fsprogs
elftosb
expat tools/expat: update to 2.2.10 2020-11-21 18:48:39 +01:00
fakeroot download: add mirror alias for Debian 2021-02-26 20:41:00 +01:00
findutils
firmware-utils tplink-safeloader: fix C7v5 factory flashing from vendor fw > v1.1.x 2021-04-13 10:29:25 +02:00
flex
flock
genext2fs
gengetopt
gmp tools/gmp: update to 6.2.1 2020-11-21 18:49:17 +01:00
include
isl
kernel2minor
libressl ccache: update to 4.1 2020-12-31 10:03:21 +01:00
libtool
lzma treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
lzma-old treewide: unify OpenWrt hosted source via @OPENWRT 2021-02-05 12:00:24 -10:00
m4
make-ext4fs
missing-macros
mkimage tools: mkimage: add patches for 64-bit MediaTek BootROM 2021-03-11 16:24:20 +00:00
mklibs download: add mirror alias for Debian 2021-02-26 20:41:00 +01:00
mm-macros
mpc tools/mpc: update to 1.2.1 2020-11-21 18:49:27 +01:00
mpfr
mtd-utils
mtools
padjffs2
patch
patch-image
patchelf tools/patchelf: bump to use latest master 2021-02-15 07:12:51 +01:00
pkgconf ccache: update to 4.1 2020-12-31 10:03:21 +01:00
quilt
sdimage
sed
sparse tools/sparse: update to version 0.6.3 2021-03-19 00:59:22 +01:00
squashfs
squashfskit4
sstrip tools/sstrip: update to latest version 2020-11-26 12:44:25 -10:00
tar
xxd tools/xxd: fix source URL 2021-03-01 16:39:17 +00:00
xz
zip
zlib
zstd tools/zstd: compile with cmake 2021-01-30 18:14:50 -10:00
Makefile tools/libelf: remove unneeded host library 2021-03-13 22:20:02 +00:00