Accidentally performed sysupgrade with a -factory bin (WPA8630P)

So I got a little ahead of myself and just did a:

sysupgrade -F openwrt-21.02.5-ath79-tiny-tplink_tl-wpa8630p-v2-int-squashfs-factory.bin

…note the -factory.bin rather than -sysupgrade.bin! :frowning_face:

(I thought needed the -F to resolve a generic "Image metadata not present" error without it, which I assumed was related to the existing install which I thought was a snapshot. In retrospect it probably was complaining about the new image.)

The full irony being that looking back into my logs from the previous upgrade I'd done, it was already to this same old latest version so I shouldn't have
been bothering in the first place :face_with_head_bandage:

But regardless, now I'm stuck in what seems to perhaps be a boot loop? It blinks the power and "home" (PLC) indicators, then periodically lights all five LEDs, over and over. I was expecting to lose just my configuration and have to restore from defaults but I don't get any DHCP lease on any of the three LAN ports now.

My main question is: would I indeed have bricked this device by forcing sysupgrade using a -factory.bin file? And if so, what state would I likely be in? Specifically should I expect U-Boot to still be available and try a serial recovery, or am I likely straight to the flash chip at this point?

If you are very lucky, you might have a chance with bootloader based recovery mechanisms (be it push-button tftp recovery or via serial console), what's possible or not depends on your particular model, so check the device pages in the wiki first. Independent of the success chances of that, you may already have permanently overwritten die crucial wireless calibration data (which is specific to your individual device and required to bring up the wifi).

Forcing a sysupgrade disables all sanity checks, it will happily flash an MP3 of your favourite marching band, the latest Windows ME ISO or the Metropolis movie - needless to say that your device wouldn't really appreciate either of these, nor the factory image. What happens exactly, is again device specific, its OEM partitioning, flash type/ size, etc. Given the device specs and its age, buying additional tools you don't already own (which are effectively free to you) to recover a device of this kind is generally not economically viable, you are likely to find fully functional -better- devices on the used markets for the amount of money required to buy serial console adapters, flash writers, soldering equipment, etc.

2 Likes

Yep, I'm guessing that's exactly what happened then. The question is — to where? Without any "image metadata" does sysupgrade just pretty much map the bytes straight to Flash starting right at at base 0x00000 offset therein? Or would it still aim only to fill in the os-image partition?

So I did go ahead and order a TL-WPA8631P which despite same 8MB of Flash and only half the RAM looks to have significantly less complications running OpenWrt. But the 8630 here was working fine and I'm not real keen on it being eWaste just on account of grabbing the wrong download link.

I've got plenty of equipment incl. SOIC clips and programmers and might just need to dig them up and get a little more practice with them. This is:

Model: TL-WPA8630(US) Ver: 2.0
S/N: 2192032Axxxxx

if anyone has an original flash dump they could share?

You should be able to recover with serial console. Flashing the -factory bin does not touch the bootloader, sysupgrade still writes only to the firmware partition. And since it still blinks, the bootloader should be alive. Just connect to UART and install OpenWrt from there.

Please keep in mind that there is line voltage inside when tinkering with it!

If that doesn't work, then you need a flash dump and an SOIC clip. I've done this several times on my WPA8630P where I accidentally flashed the non-P stock firmware on one occasion and on another I killed U-Boot (because the stock firmware really writes to 0x00). In the latter case, only the PLC LED would come on IIRC.

1 Like