mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-19 05:26:53 +00:00
kirkwood: implement compatibility version for DSA migration
This implements the newly introduced compat-version to prevent upgrade between swconfig and DSA for kirkwood. Just define a compat version with minor increment and an appropriate message for both image (in Makefile) and device (in base-files). Since we never removed SUPPORTED_DEVICES for this target, we don't have to add it back either. 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>
This commit is contained in:
parent
494f12c52d
commit
090779b24e
20
target/linux/kirkwood/base-files/etc/board.d/05_compat-version
Executable file
20
target/linux/kirkwood/base-files/etc/board.d/05_compat-version
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2020 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
linksys,audi|\
|
||||
linksys,viper)
|
||||
ucidef_set_compat_version "1.1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
@ -10,6 +10,11 @@ include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
KERNEL_LOADADDR:=0x8000
|
||||
|
||||
define Device/dsa-migration
|
||||
DEVICE_COMPAT_VERSION := 1.1
|
||||
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
DEVICE_DTS = $$(if $$(BOARD_NAME),kirkwood-$$(BOARD_NAME),)
|
||||
@ -92,6 +97,7 @@ endef
|
||||
TARGET_DEVICES += iom_ix2-200
|
||||
|
||||
define Device/linksys_audi
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA3500 (Audi)
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
|
||||
@ -107,6 +113,7 @@ endef
|
||||
TARGET_DEVICES += linksys_audi
|
||||
|
||||
define Device/linksys_viper
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := E4200v2 / EA4500 (Viper)
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
|
||||
|
Loading…
Reference in New Issue
Block a user