From 070b87e7ac48c8fcb48f7275658ccb9b5affc123 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 19 Jun 2024 12:15:16 +0200 Subject: [PATCH] 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 --- .../base-files/etc/board.d/05_compat-version | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 target/linux/ath79/mikrotik/base-files/etc/board.d/05_compat-version 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