Thank you very much. Thanks to your explanation, it was easy for me to remove the first 32 bytes of the .bin file, and drop the new binary renamed .trx in the /tmp/ folder of the router.
However, I was not able to update the firmware.
In an effort not to brick the router, I prefer to ask questions first, rather than experiment.
sysupgrade did not work. Here is the error I get back.
BusyBox v1.15.3 (2011-11-24 02:12:13 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
Backfire (10.03.1, r29592) ------------------------
* 1/3 shot Kahlua In a shot glass, layer Kahlua
* 1/3 shot Bailey's on the bottom, then Bailey's,
* 1/3 shot Vodka then Vodka.
---------------------------------------------------
root@OpenWrt:~# sysupgrade /tmp/openwrt-19.07.7-brcm47xx-legacy-linksys-wrt54gs-squashfs.trx
Saving config files...
Switching to ramdisk...
Performing system upgrade...
Image too big for partition: linux
Image check failed.
Upgrade completed
Rebooting system...
client_loop: send disconnect: Broken pipe
The upgrade didn't happen at all, it seems. The router rebooted, the root password remained stored, and the router still displays the same firmware version:
cat /etc/openwrt_release
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="10.03.1"
DISTRIB_CODENAME="backfire"
DISTRIB_DESCRIPTION="OpenWrt Backfire 10.03.1"
By the way, for those who might find it useful, the scp command to push the firmware into the router's temporary directory is:
scp -oKexAlgorithms=+diffie-hellman-group1-sha1 openwrt-19.07.7-brcm47xx-legacy-linksys-wrt54gs-squashfs.trx root@192.168.1.1:/tmp/
The -o option temporarily allows the ssh client to negotiate encryption with an obsolete method, otherwise our newer machines can no longer find a common language with the ssh server installed on older versions of OpenWrt.