[PATCH] firmware-utils: tplink-safeloader: Add alternative partition table offset

Sander Vanheule sander at svanheule.net
Tue Jan 31 04:27:59 PST 2023


Hi Andreas,

On Tue, 2023-01-31 at 12:20 +0100, Andreas Böhler wrote:
> Hi Sander,
> 
> thanks for the review.
> 
> 
> On 28/01/2023 16:42, Sander Vanheule wrote:
> > Hi Andreas,
> > 
> > On Sun, 2023-01-22 at 22:36 +0100, Andreas Böhler wrote:
> > > Some newer OEM firmware files, even for existing devices, have the
> > > fwup-ptn at offset 0x1050 instead of 0x1014. If the fwup-ptn header is not
> > > found at 0x1014, the alternative offset at 0x1050 is tried.
> > > 
> > > Signed-off-by: Andreas Böhler <dev at aboehler.at>
> > Would've been handy if you had mentioned some examples.
> > Via the forum I found TL-WPA8631P V3 and TL-WPA8630 V2:
> > 
> > https://www.tp-link.com/support/download/tl-wpa8631p/v3.8/#Firmware
> > https://www.tp-link.com/support/download/tl-wpa8630/v2/#Firmware
> > 
> > These images have a very suspicious looking '?NEW' at position 0x14, right
> > where
> > the old header used to end. Can this be used to discriminate between the two
> > formats instead?
> > 
> > The patch seems to only implement the new format for image conversion to
> > sysupgrade files (-z), but that isn't mentioned in the commit message
> > either. I
> > think it's best if the other input (-x and -i) options would also support
> > the
> > new format.
> 
> Unfortunately, I don't have access to one of the affected devices. I 
> just fixed the "-z" for a forum user and got confirmation that it worked 
> for him. I will try my best to fix it for "-x" and "-i", but I have no 
> clue on the changed (?) header format either.

I've just had a quick look at the "?NEW" header format in a few images, so the
remarks in my review were only based on that.

Let me have a look this week to see if I can these merge the different tool
options a bit. Perhaps it'll be easier to add alternative header formats then.


Best,
Sander



More information about the openwrt-devel mailing list