mvebu: implement compatibility version for DSA migration

This implements the newly introduced compat-version to prevent
upgrade between swconfig and DSA for mvebu.

Just define a compat version with minor increment and an appropriate
message for both image (in Makefile) and device (in base-files).

Having taken care of sysupgrade, we can put back the SUPPORTED_DEVICES
that have been removed in previous patches to prevent broken config.

Attention:

All users that already updated to the DSA versions in master will
receive the same incompatibility warning since their devices are still
"1.0" as far as fwtool can tell.
Those, and only those, can bypass the upgrade check by using force (-F)
without having to reset config again. In addition, the new version
string needs to be put into uci config manually, so the new fwtool
knows that it actually deals with a "1.1":

   uci set "system.@system[-1].compat_version=1.1"
   uci commit system

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
master
Adrian Schmutzler 2020-07-14 16:11:22 +02:00
parent 02d6ac1060
commit 494f12c52d
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# Copyright (C) 2020 OpenWrt.org
#
. /lib/functions.sh
. /lib/functions/uci-defaults.sh
board_config_update
case "$(board_name)" in
linksys,wrt1200ac|\
linksys,wrt1900ac-v1|\
linksys,wrt1900ac-v2|\
linksys,wrt1900acs|\
linksys,wrt3200acm|\
linksys,wrt32x|\
solidrun,clearfog-pro-a1)
ucidef_set_compat_version "1.1"
;;
esac
board_config_flush
exit 0

View File

@ -6,6 +6,11 @@
# See /LICENSE for more information.
#
define Device/dsa-migration
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
endef
define Device/buffalo_ls421de
$(Device/NAND-128K)
DEVICE_VENDOR := Buffalo
@ -77,16 +82,19 @@ endef
define Device/linksys_wrt1200ac
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT1200AC
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Caiman
DEVICE_DTS := armada-385-linksys-caiman
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
SUPPORTED_DEVICES += armada-385-linksys-caiman linksys,caiman
endef
TARGET_DEVICES += linksys_wrt1200ac
define Device/linksys_wrt1900acs
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT1900ACS
DEVICE_VARIANT := v1
DEVICE_ALT0_VENDOR := Linksys
@ -96,11 +104,13 @@ define Device/linksys_wrt1900acs
DEVICE_ALT1_MODEL := Shelby
DEVICE_DTS := armada-385-linksys-shelby
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
SUPPORTED_DEVICES += armada-385-linksys-shelby linksys,shelby
endef
TARGET_DEVICES += linksys_wrt1900acs
define Device/linksys_wrt1900ac-v1
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT1900AC
DEVICE_VARIANT := v1
DEVICE_ALT0_VENDOR := Linksys
@ -108,33 +118,39 @@ define Device/linksys_wrt1900ac-v1
DEVICE_DTS := armada-xp-linksys-mamba
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
KERNEL_SIZE := 3072k
SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba
DEFAULT := n
endef
TARGET_DEVICES += linksys_wrt1900ac-v1
define Device/linksys_wrt1900ac-v2
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT1900AC
DEVICE_VARIANT := v2
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Cobra
DEVICE_DTS := armada-385-linksys-cobra
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
SUPPORTED_DEVICES += armada-385-linksys-cobra linksys,cobra
endef
TARGET_DEVICES += linksys_wrt1900ac-v2
define Device/linksys_wrt3200acm
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT3200ACM
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Rango
DEVICE_DTS := armada-385-linksys-rango
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
SUPPORTED_DEVICES += armada-385-linksys-rango linksys,rango
endef
TARGET_DEVICES += linksys_wrt3200acm
define Device/linksys_wrt32x
$(call Device/linksys)
$(Device/dsa-migration)
DEVICE_MODEL := WRT32X
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Venom
@ -142,6 +158,7 @@ define Device/linksys_wrt32x
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
KERNEL_SIZE := 3072k
KERNEL := kernel-bin | append-dtb
SUPPORTED_DEVICES += armada-385-linksys-venom linksys,venom
DEFAULT := n
endef
TARGET_DEVICES += linksys_wrt32x
@ -234,6 +251,7 @@ endef
TARGET_DEVICES += solidrun_clearfog-base-a1
define Device/solidrun_clearfog-pro-a1
$(Device/dsa-migration)
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := ClearFog Pro
KERNEL_INSTALL := 1
@ -244,5 +262,6 @@ define Device/solidrun_clearfog-pro-a1
DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
UBOOT := clearfog-u-boot-spl.kwb
BOOT_SCRIPT := clearfog
SUPPORTED_DEVICES += armada-388-clearfog armada-388-clearfog-pro
endef
TARGET_DEVICES += solidrun_clearfog-pro-a1