How to flash from openwrt cli?
I've semi-bricked my router. I flashed my own build, which was broken. I would like to flash to factory firmware (or a working build) and start over.
uhttpd won't start normally, but I can start it manually and flash with the Web UI, it says it's working, then boots exactly the same firmware I was already running.
I can ssh to the router, and try flashing with sysupgrade, I get this:
root@wrt1900ac:/tmp# sysupgrade FW_WRT1900AC_1.1.7.160582_prod.img
Mamba check image
Saving config files...
Mamba preupgrade called...
umount: can't forcibly umount /overlay: Invalid argument
umount: can't forcibly umount /tmp/syscfg: Invalid argument
Sending TERM to remaining processes ... udhcpc dnsmasq uhttpd sleep sleep ubusd askfirst logd netifd odhcpd ntpd sensors
_monitor wan_monitor
Sending KILL to remaining processes ... sleep askfirst
Switching to ramdisk...
Performing system upgrade...
ash: /usr/sbin/fw_printenv: not found
ash: bad number
ash: bad number
ash: fw_setenv: not found
ash: fw_setenv: not found
Mamba do upgrade on kernel
ash: flash_erase: not found
ash: nandwrite: not found
Upgrade completed
Rebooting system...
.. and then it boots to the same firmware I was already running.
Does someone know a way to flash this from the command line that might work? Since I can still boot openwrt I'm hoping I can avoid the serial connection route. Thank you.