Showing the installation process. The window on the right displays the serial RX interface for documentation purpose only. The interaction required is shown on the left, which is done entirely within the web browser.
WARNING #1 This will replace the bootloader (TF-A 2.9, U-Boot 2024.01) and convert the flash layout of the device to UBI. The installer stores a copy of the previous bootchain in a dedicated UBI volume boot_backup
.
WARNING #2 Re-flashing the installer when the device is already using UBI flash layout will erase the previously backed up bootchain, which in most cases would be the vendor/official one.
If you plan to ever go back to the stock firmware, you will need a backup of the vendor bootchain and firmware. When going back to the stock firmware, be prepared to connect to the internal serial port in case there are any bad blocks.
WARNING #3 The installer is meant to be executed only once per device unless an update explicitly requires a bootloader update. In that case, make sure to copy the content of the boot_backup
UBI volume off the device before re-running the installer, so you will still have a copy of the stock bootchain! Executing the installer more than once should be avoided in all other cases! Use normal *-linksys_e8450-ubi-squashfs-sysupgrade.itb images provided by openwrt.org instead.
This script downloads the OpenWrt ImageBuilder to generate a firmware upgrade image compatible with the stock firmware which will automatically carry out the installation. The process involves re-packaging the initramfs image to contain everything necessary for a permanent installation of a replacement Das U-Boot bootloader, ARM TrustedFirmware-A and an OpenWrt recovery (initramfs) image within the NAND flash, plus the installer script itself.
You'll need the below to use the script to generate the installer image:
libfdt-dev
cmake
If you are not interested in building yourself, the pre-built files are available here.
192.168.1.254
with netmask 255.255.255.0
, no gateway, no DNS.openwrt-...-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery-installer.itb
openwrt-...-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery-installer_signed.itb
openwrt-...-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
.Connect to the device via SSH and enter the following commands:
mkdir /tmp/boot_backup
mount -t ubifs ubi0:boot_backup /tmp/boot_backup
Then, copy the files under /tmp/boot_backup
using scp to your computer. These files are needed in case you want to restore the original/vendor firmware. They can also be used in emergency case for reflashing via JTAG.
Before upgrading you should backup the original/vendor bootchain, see above.
Install a client for the sysupgrade service: either luci-app-attendedsysupgrade
(Web UI) or auc
(command line).
Run auc
from the command-line, or navigate to System -> Attended Sysupgrade and proceed accordingly.
Hold down the "reset" button (below the "WPS" button) whilst powering on the device.
Release the button once the power LED turns into orange/yellow.
This will remove any user configuration and allow restoring or upgrading from ssh/http/tftp.
While running the production firmware enter this command in the shell
echo c > /proc/sysrq-trigger
Once the router has rebooted into recovery mode, clear PSTORE to make it reboot into production mode again:
rm /sys/fs/pstore/*
This keep user configuration but still allow restoring or upgrading from ssh/http/tftp.
openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
(note that this file doesn't have the word installer in its filename) or by holding the RESET button while connecting the device to power or by issuing echo c > /proc/sysrq-trigger
while running the production firmware. /tmp
folder on the router, which is the original/vendor bootchain. Also upload the [original/vendor firmware**](#downgrade-firmware).ubidetach -d 0
insmod mtd-rw i_want_a_brick=1
mtd write /tmp/mtd0 /dev/mtd0
mtd write /tmp/mtd1 /dev/mtd1
mtd write /tmp/mtd2 /dev/mtd2
mtd write /tmp/mtd3 /dev/mtd3
As the partition layout of the UBI-build also has changed, make sure to write things to the correct place in case your backup has been done at a point when the partition layout was different from what it is now.
Now write the original/vendor firmware:
# On Linksys E8450
mtd -p 0x200000 write /tmp/FW_E8450_1.0.01.101415_prod.img /dev/mtd3
# On Belkin RT3200
mtd -p 0x200000 write /tmp/FW_RT3200_1.0.01.101415_prod.img /dev/mtd3