diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-09 19:14:45 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-31 11:40:15 +0200 |
commit | 6867d86e085dd4a284c8ee8878839c9e77546f46 (patch) | |
tree | 9b854ef3d4dcfc10b991bcf88862175fc499e3f2 /include/image.mk | |
parent | 84cb0f7ace73fad15e29e1d74c469b37f90b334d (diff) | |
download | openwrt-6867d86e085dd4a284c8ee8878839c9e77546f46.tar.gz openwrt-6867d86e085dd4a284c8ee8878839c9e77546f46.tar.bz2 openwrt-6867d86e085dd4a284c8ee8878839c9e77546f46.zip |
build: add DEVICE_COMPAT_VERSION and DEVICE_COMPAT_MESSAGE
We regularly encounter the situation that devices are subject to
changes that will make them incompatible to previous versions.
Removing SUPPORTED_DEVICES will not really be helpful in most of these
cases, as this only helps after a rename.
To solve this situation, this patchset introduces a compatibility
version for devices. It will be implemented via a per-device
Make variable DEVICE_COMPAT_VERSION, which will be set to 1.0
globally by default and then can be overwritten as needed.
Furthermore, a variable DEVICE_COMPAT_MESSAGE is added, where
a message to be displayed during sysupgrade may be specified
optionally.
This patch only implements the build variables and adds them
to the sysupgrade metadata, the evaluation will be addressed
in a subsequent patch.
To set it, one would just need to add the following to a device node:
define Device/somedevice
...
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
endef
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'include/image.mk')
-rw-r--r-- | include/image.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk index be934e94d3..e8c2cf7100 100644 --- a/include/image.mk +++ b/include/image.mk @@ -419,6 +419,8 @@ define Device/Init BOARD_NAME := UIMAGE_NAME := + DEVICE_COMPAT_VERSION := 1.0 + DEVICE_COMPAT_MESSAGE := SUPPORTED_DEVICES := IMAGE_METADATA := @@ -436,6 +438,7 @@ DEFAULT_DEVICE_VARS := \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \ IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH IMAGE_SIZE \ + DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \ DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \ DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \ |