[openwrt/openwrt] ath79: mikrotik: set compat version for NAND devices
LEDE Commits
lede-commits at lists.infradead.org
Wed Jun 19 03:26:22 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/070b87e7ac48c8fcb48f7275658ccb9b5affc123
commit 070b87e7ac48c8fcb48f7275658ccb9b5affc123
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed Jun 19 12:15:16 2024 +0200
ath79: mikrotik: set compat version for NAND devices
Currently, trying to upgrade on a MikroTik NAND device will force you to
use sysupgrade -n due to:
upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
upgrade: NAND images switched to yafut. If running older image, reinstall from initramfs.
So instead of having users manually set the new compat version lets do
what other targets do and set it for all NAND devices after good boot.
Link: https://github.com/openwrt/openwrt/pull/15754
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../base-files/etc/board.d/05_compat-version | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/05_compat-version b/target/linux/ath79/mikrotik/base-files/etc/board.d/05_compat-version
new file mode 100644
index 0000000000..2e079bfa55
--- /dev/null
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ mikrotik,routerboard-493g|\
+ mikrotik,routerboard-911g-5hpacd|\
+ mikrotik,routerboard-911g-xhpnd|\
+ mikrotik,routerboard-912uag-2hpnd|\
+ mikrotik,routerboard-921gs-5hpacd-15s|\
+ mikrotik,routerboard-922uags-5hpacd|\
+ mikrotik,routerboard-951g-2hnd|\
+ mikrotik,routerboard-951ui-2hnd|\
+ mikrotik,routerboard-sxt-5nd-r2)
+ ucidef_set_compat_version "1.1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
More information about the lede-commits
mailing list