Retain old compat_version for sysupgrade compatibility #170

Closed
fbl wants to merge 2 commits from fbl:compatversion into master
3 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,19 @@
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
Date: Sat, 23 Oct 2021 23:34:07 +0200
Subject: [PATCH] mt7621: retain old compat_version
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index a3bc14d59d..99887e8192 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -91,8 +91,7 @@ define Build/zytrx-header
endef
define Device/dsa-migration
- DEVICE_COMPAT_VERSION := 1.1
- DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
+ DEVICE_COMPAT_VERSION := 1.0
endef
define Device/adslr_g7

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-support
PKG_RELEASE:=8
PKG_RELEASE:=9
include $(INCLUDE_DIR)/package.mk

View File

@ -0,0 +1,15 @@
BOARD="$(uci get board.model.name)"
# bump compat_version to be in sync with OpenWrt's compat_version.
# This is necessary, because our configuration currently does not require any
# manual migration. To prevent users from having to force-sysupgrade due to the
# bumped compat_version upstream, the previous compat_version is retained for
# a single release of our firmware and is bumped in this script afterwards.
case "$BOARD" in
ubnt,edgerouter-x|\
ubnt,edgerouter-x-sfp|\
netgear,r6220)
uci -q set "system.@system[-1].compat_version=1.1"
;;
esac