When you are done with debricking put a few fw_setenv
command in /etc/rc.local
:
# to select slot 0, only need to set once ;)
fw_setenv flag_last_success 0
# to reset "try counters" for slot 0 and slot 1
fw_setenv flag_try_sys1_failed 0
fw_setenv flag_try_sys2_failed 0
It will do the trick to survive 7 reboots.
And to verify if you have 2022 or newer U-Boot, just grep
for it in the u-boot
partition:
root@OpenWrt:/# grep ^U-Boot /dev/mtd2
U-Boot
U-Boot console
U-Boot
U-Boot BUG at %s:%d!
U-Boot 2014.04-rc1 (May 20 2022 - 10:19:21)
root@OpenWrt:/# grep mtd2 /proc/mtd
mtd2: 00080000 00020000 "u-boot"