Belkin RT3200/Linksys E8450 WiFi AX discussion

Ok. I stand corrected then.

And yeah, you probably should set up everything from scratch instead restoring from previous config backups.

I would suggest reset to default again and reconfigure everything from reset.

Edit:
And the reason your fw_env.config has changed is because you now have more volumes in UBI (factory, fip) compared to when your config backup was created. So volume ID of ubootenv and ubootenv2 in UBI volumes has changed after it was re-created.

Probably a good idea :slight_smile: I've not updated this device since 7 months because of OKD and i've missed in this time some configuration changes
*
in /etc/config/ubootenv are also wrong ubi IDs

This is address of your router used for TFTP recovery. You should have serverip too.

After reset the env in the uboot menu this is also again back again

Same behaviour I have in Xiaomi AX3200, those come preset from factory (it comes with UBI).

Hi, I went through this form and may be I missed it. My E8450 bricked after power outage.

Console error

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Nov 15 2018, 20:18:47.
Port /dev/ttyUSB0, 11:33:01

Press CTRL-A Z for help on special keys


F0: 102B 0000
F6: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0400 0041 [0000]
G0: 1190 0000
T0: 0000 02D5 [000F]
Jump to BL

NOTICE:  BL2: v2.9(release):OpenWrt v2023-07-24-00ac6db3-2 (mt7622-snand-1ddr)
NOTICE:  BL2: Built : 21:45:35, Oct  9 2023
NOTICE:  CPU: MT7622
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  SPI-NAND: W25N01GV (128MB)
ERROR:   BL2: Failed to load image id 3 (-2)

I tried to perform console based recovery using mt7622-ram-1ddr-bl2.bin and uboot.fip

I get console that gets stuck at following line:

mtk_uartboot - 0.1.1
Using serial port: /dev/ttyUSB0
Handshake...
hw code: 0x7622
hw sub code: 0x8a00
hw ver: 0xcb00
sw ver: 0x100
Baud rate set to 460800
sending payload to 0x201000...
Checksum: 0x2bc5
Setting baudrate back to 115200
Jumping to 0x201000 in aarch64...
Waiting for BL2. Message below:
==================================
NOTICE:  BL2: v2.10.0   (release):OpenWrt v2024.01.17~bacca82a-3 (mt7622-ram-1ddr)
NOTICE:  BL2: Built : 21:25:45, Aug 25 2024
NOTICE:  WDT: Cold boot
NOTICE:  CPU: MT7622
NOTICE:  WDT: disabled
NOTICE:  Starting UART download handshake ...
==================================
BL2 UART DL version: 0x10


I am using Ubuntu and the fip file is on same folder as mtk_uartboot
I do not know what do do next here. I was expecting from other examples that it should have continued on to upload fip file. please help and thank you...

This is a hack used in the installer used for preventing another hack from kicking in

1 Like

Not true. Using factory reset in bootloader menu resets U-Boot environment and also removes the rootfs_data volume (and so does updating the recovery volume via U-Boot menu).

2 Likes

Thank you for your summary. I put this into the wiki entry for our device so that others have it easier to find out if their device is affected by OKD or not: https://openwrt.org/toh/linksys/e8450#check_if_your_device_is_at_risk_of_okd

check if your device is at risk of OKD

  • Issue does not affect those who are still running TrustedFirmware-ARM (TF-A) v2.4 (those who ran 1.0.2 or earlier)

  • Issue affects those who are running TF-A v2.9 (those who ran installer 1.0.3 or newer)

  • You can find out which TF-A you are running by executing, for example:

grep "(release)" /dev/mtd0ro v2.4(release):OpenWrt v2021-05-08-d2c75b21-3 (mt7622-snand-1ddr)

If you are on v2.4 ⇒ You can safely sysupgrade to any 23.x

grep "(release)" /dev/mtd0ro v2.9(release):OpenWrt v2023-07-24-00ac6db3-2 (mt7622-snand-1ddr)

If you are on v2.9 ⇒ Device is affected and at risk of OKD on boot, reboot, power up. We still need to agree on the best way to proceed (wait for the new installer, patch bl2 from openwrt, patch bl2 from Uboot...)

The last line on TF-A v2.9 could be improved in the future when 24.x is released.

3 Likes

This is also very helpfull if some king of "bricked" due to bad update etc, maybe you could link it: Belkin RT3200/Linksys E8450 WiFi AX discussion - #5927 by ka2107

Note that it also affects the earliest v2.10 versions...
Only "-3" is ok.

If you set "compat_version=2.0" to be able to later import the settings, it is required that you delete this 2 files from backup:

  • /etc/config/ubootenv
  • /etc/fw_env.config

If you already imported with old/bad files, make sure you fix the files:

  • /etc/fw_env.config
/dev/ubi0_2 0x0 0x1f000 0x1f000 1
/dev/ubi0_3 0x0 0x1f000 0x1f000 1
  • /etc/config/ubootenv
config ubootenv
        option dev '/dev/ubi0_2'
        option offset '0x0'
        option envsize '0x1f000'
        option secsize '0x1f000'
        option numsec '1'

config ubootenv
        option dev '/dev/ubi0_3'
        option offset '0x0'
        option envsize '0x1f000'
        option secsize '0x1f000'
        option numsec '1'
1 Like

I wasn't having any issues, but I modified the files as per your instructions.

May I wonder what does those files do??

There are now 2 ubi partitions more now than with old layout and the ids changed. I dont know where the config in the 2 files is used, but at least the output of fw_printenv is wrong (read my older posts above with wrong and good output) then and fw_setenv should also not work

I installed 1.1.3 and the snapshot over the a factory firmware.

root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "bl2"
mtd1: 07f80000 00020000 "ubi"

From where and how do you extract the original 4 mtd files need to restore a factory image?

mkdir /tmp/boot_backup
mount -t ubifs ubi0:boot_backup /tmp/boot_backup

Gives me mtd0 and mtd1.

How do I get mtd2 & 3? out of this mtd1?

To be able to restore like this

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

mtd -p 0x200000 write /tmp/FW_RT3200_1.0.01.101415_prod.img /dev/mtd3

I added a note about affected v2.10, and also added the explanation of the "fix from SSH in a live OpenWrt" that I have used for my own router.

3 Likes

Partially answering my own question....

From snapshot (fip & factory on ubi), The mtd1 file retrieved from the boot_backup is the concatenated mtd1:3 of the factory firmware.

How would we use to restore it?

This procedure helped with the installer v1.1.3 if I read your messages correctly. v1.1.3 is marked as pre-release. I would prefer to have more complex issues with pre-release versions addressed in the installer documentation, not in the general device page at this time.

When the version v1.1.3 or a later release is marked as "latest" (stable) version I think it is time to publish solutions for frequent occuring issues in the general device page.

If there is a lot of support to document the process how to get ethernet working in current pre-release v1.1.3 installer recovery mode: please suggest a short description how to document this in the general device page.

Thanks. I removed the sentence "We still need to agree on the best way to proceed (wait for the new installer, patch bl2 from openwrt, patch bl2 from Uboot...)".

Only step 7 ("Sysupgrade v1.1.3 installer.itb") + 8 are for "prerelease". The other help for serial recovery and to recreate maybe lost facotry data