aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/mikrotik
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/mikrotik')
-rw-r--r--target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
index d79bd03af5..5ee5492369 100644
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -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