diff mbox series

[1/2] qoriq: add missing compat_version to allow sysupgrade to save old config

Message ID 20231201214949.2333622-1-russell@personaltelco.net
State Accepted, archived
Headers show
Series [1/2] qoriq: add missing compat_version to allow sysupgrade to save old config | expand

Commit Message

Russell Senior Dec. 1, 2023, 9:48 p.m. UTC
Currently, sysupgrade without the -n option complains:

  # sysupgrade -v tmp/openwrt-qoriq-generic-watchguard_firebox-m300-squashfs-sysupgrade.img.gz
  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: Kernel switched to FIT uImage. Update U-Boot environment.
  upgrade: Reading partition table from bootdisk...
  upgrade: Extract boot sector from the image
  upgrade: Reading partition table from image...
  Image check failed.

So, add the missing 05_compat-version to /etc/board.d/

Signed-off-by: Russell Senior <russell@personaltelco.net>
---
 .../base-files/etc/board.d/05_compat-version   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 target/linux/qoriq/base-files/etc/board.d/05_compat-version
diff mbox series

Patch

diff --git a/target/linux/qoriq/base-files/etc/board.d/05_compat-version b/target/linux/qoriq/base-files/etc/board.d/05_compat-version
new file mode 100644
index 0000000000..62ad804389
--- /dev/null
+++ b/target/linux/qoriq/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,18 @@ 
+#
+# Copyright (C) 2020 OpenWrt.org
+#
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+	watchguard,firebox-m300)
+		ucidef_set_compat_version "1.1"
+		;;
+esac
+
+board_config_flush
+
+exit 0