mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-19 11:16:32 +00:00
ath79: mikrotik: erase firmware on SPI NOR before install
On Mikrotik SPI NOR devices, the firmware partition must be erased when flashing from stock firmware, otherwise leftover bits (in particular a kernel signature) can trigger a boot loop. When booted from initramfs (the only way to install OpenWRT on these devices), this patch unconditionally erases the firmware partition in the do_upgrade() stage for all supported SPI NOR devices. This is forward-ported fromed49d0876
and20452a8db
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
parent
d0498872ff
commit
2cac31223d
@ -38,6 +38,9 @@ platform_do_upgrade() {
|
||||
platform_do_upgrade_mikrotik_nand "$1"
|
||||
;;
|
||||
*)
|
||||
# NOR devices: erase firmware if booted from initramfs
|
||||
[ -z "$(rootfs_type)" ] && mtd erase firmware
|
||||
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user