OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Other
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Robert Högberg - 28.01.2021

FS#3601 - tplink-safeloader: Unexpected firmware offset when reading oem firmware for TL-WPA8630p V2.1

I was trying to return to oem firmware for TL-WPA8630P V2.1 by following the instructions at https://openwrt.org/toh/tp-link/tp-link_tl-wpa8630p_v2#reverting_to_stock

When running tplink-safeloader it fails with the error message:

DEBUG: can not find fwuphdr
Error can not read the partition table (fwup-ptn): Success

I think the problem is that the firmware offset is “wrong” in tplink-safeloader or in the firmware file.

Here’s what the firmware file looks like:

00000000  fb b0 40 4b 3d ef 81 6e  ed 61 ac 42 7a 7a 86 e4  |..@K=..n.a.Bzz..|
00000010  00 6d 79 d7 3f 4e 45 57  00 00 00 28 00 64 de 8f  |.my.?NEW...(.d..|
00000020  00 6d 22 8f 00 00 00 00  00 64 de 53 c8 cb b9 c0  |.m"......d.S....|
00000030  25 21 80 2a d0 c6 39 eb  17 c6 73 64 00 64 de 53  |%!.*..9...sd.d.S|
00000040  0b a1 cb 12 8c 9e 34 9e  40 9d c8 9d 92 a5 03 cd  |......4.@.......|
00000050  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00001050  66 77 75 70 2d 70 74 6e  20 6f 73 2d 69 6d 61 67  |fwup-ptn os-imag|
00001060  65 20 62 61 73 65 20 30  78 30 31 30 30 30 20 73  |e base 0x01000 s|

Ie, “fwup-ptn” is at 0×1050 while tplink-safeloader seems to look at 0×1014:

size_t firmware_offset = 0x1014;

I changed firmware_offset to 0×1050 and recompiled tplink-safeloader, then it works (but I don’t know if the output firmware is correct or not).

- Steps to reproduce

1. Get the firmware file from https://www.tp-link.com/en/support/download/tl-wpa8630p/v2.1/#Firmware 2. Extract the firmware archive
3. Run “tplink-safeloader -z wpa8630pv2_uk-up-ver2-1-0-P1-20171117-rel42724-APPLC.bin -o oem-sysupgrade.bin”

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing