compat-version for mt7621
mail at adrianschmutzler.de
mail at adrianschmutzler.de
Fri Jul 31 06:56:46 EDT 2020
I just finally merged my compat-version patchset to master. This already takes care of bumping the compat-version for the kirkwood/mvebu devices affected by the DSA introduction.
However, the biggest swap (based on number of devices) from swconfig to DSA has been done for ramips/mt7621. Since the entire subtarget is affected here, we essentially have two options how two address this, which I'd like to discuss.
Generally, increasing the compat-version needs two changes:
1. adding the following to image/mt7621.mk for the affected devices (used for the image metadata):
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
2. adding the following to a board.d file (used for the compat version "on the device")
While this is straightforward for the devices actually affected by the migration, the question is how to deal with the devices that were added _after_ that, i.e. those that have been added with DSA in the first place, as well as new devices added in the future.
This is where the two options become available:
Option 1. Only bump actually migrated devices:
Strictly, the version bump only is meant for _changed_ devices, so devices added with DSA in the first place would be 1.0, i.e. the first version added to OpenWrt.
This would save us from specifying DEVICE_COMPAT_VERSION := 1.1 for these in image/mt7621.mk, but would require to list all 1.1 devices in the switch-case in a board.d file.
Option 2. Set all mt7621 devices to 1.1 from the start
The obvious alternative is to have _all_ mt7621 devices set to compat version 1.1, even those that have been added after DSA introduction and those that will be added in the future.
While this is less strict in applying the compat version, it's actually easier to grasp for the user and easier to implement.
- No need to add a lot of devices to switch-case in board.d file (unless something else requires a 1.2 etc.)
- "DSA = 1.1" without having to look at the specific device (for this subtarget)
- DEVICE_COMPAT_VERSION can be moved to common/shared definitions (as that will also affect new devices), i.e. is stated less often
- If somebody backports a device to 19.07 (locally) by switching to swconfig, the compat-version mechanism would also cover his/her case (as the 19.07 swconfig device would be 1.0) for a future upgrade
- DEVICE_COMPAT_VERSION = 1.1 in image/mt7621.mk would need to be added to every new device added to this subtarget in the future
- There would be no official version 1.0 for the "newer" devices
- DSA would be linked to 1.1 in the mind of people, while technically other reasons could lead to a compat-version bump to 1.1 as well (and DSA could then be 1.2 if that other things happens before)
Personally, I prefer option 2, as I think the advantages outweigh the disadvantages and I think it is easier to maintain the DEVICE_COMPAT_VERSION in Makefile that a big switch-case in board.d.
I'd be happy about your opinions on this one.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 834 bytes
Desc: not available
More information about the openwrt-devel