Skip to content

Commit

Permalink
ipq807x: set compat version for ifname change
Browse files Browse the repository at this point in the history
Now that interface names are set per physical markings, sysupgrading while
preserving config would cause devices that are not accessible over network
so make sure to increase the compat version to prevent sysupgrade with
config preservation.

Signed-off-by: Robert Marko <robimarko@gmail.com>
  • Loading branch information
robimarko committed Jan 5, 2023
1 parent 78859e9 commit 70f607d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions target/linux/ipq807x/base-files/etc/board.d/05_compat-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (C) 2022 OpenWrt.org
#

. /lib/functions.sh
. /lib/functions/uci-defaults.sh

board_config_update

case "$(board_name)" in
*)
ucidef_set_compat_version "1.1"
;;
esac

board_config_flush

exit 0
11 changes: 11 additions & 0 deletions target/linux/ipq807x/image/generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ define Device/UbiFit
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef

define Device/IfnameMigration
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Network interface names have changed
endef

define Device/dynalink_dl-wrx36
$(call Device/FitImage)
$(call Device/UbiFit)
$(call Device/IfnameMigration)
DEVICE_VENDOR := Dynalink
DEVICE_MODEL := DL-WRX36
BLOCKSIZE := 128k
Expand All @@ -33,6 +39,7 @@ TARGET_DEVICES += dynalink_dl-wrx36
define Device/edgecore_eap102
$(call Device/FitImage)
$(call Device/UbiFit)
$(call Device/IfnameMigration)
DEVICE_VENDOR := Edgecore
DEVICE_MODEL := EAP102
BLOCKSIZE := 128k
Expand All @@ -47,6 +54,7 @@ TARGET_DEVICES += edgecore_eap102
define Device/edimax_cax1800
$(call Device/FitImage)
$(call Device/UbiFit)
$(call Device/IfnameMigration)
DEVICE_VENDOR := Edimax
DEVICE_MODEL := CAX1800
BLOCKSIZE := 128k
Expand All @@ -59,6 +67,7 @@ TARGET_DEVICES += edimax_cax1800

define Device/qnap_301w
$(call Device/FitImage)
$(call Device/IfnameMigration)
DEVICE_VENDOR := QNAP
DEVICE_MODEL := 301w
DEVICE_DTS_CONFIG := config@hk01
Expand All @@ -83,6 +92,7 @@ TARGET_DEVICES += redmi_ax6
define Device/xiaomi_ax3600
$(call Device/FitImage)
$(call Device/UbiFit)
$(call Device/IfnameMigration)
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := AX3600
BLOCKSIZE := 128k
Expand All @@ -101,6 +111,7 @@ TARGET_DEVICES += xiaomi_ax3600
define Device/xiaomi_ax9000
$(call Device/FitImage)
$(call Device/UbiFit)
$(call Device/IfnameMigration)
DEVICE_VENDOR := Xiaomi
DEVICE_MODEL := AX9000
BLOCKSIZE := 128k
Expand Down

0 comments on commit 70f607d

Please sign in to comment.