[OpenWrt-Devel] [RFC] device compat version

Adrian Schmutzler mail at adrianschmutzler.de
Thu Jun 4 03:58:20 EDT 2020


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.

An easy way to address this would be the introduction of a
DEVICE_COMPAT_VERSION to the build parameters of a device (and to
This could be put into image.mk with a default value of 1, and therefore
would be applied to all devices in the tree automatically. It could then be
inserted into the image metadata, and effectively lead to a similar
comparison (and message) like done for SUPPORTED_DEVICES now.

If an incompatible change without migration was introduced (i.e.
swconfig->DSA, sector size chance, whatever ...), one could just bump the
DEVICE_COMPAT_VERSION in image/Makefile to the next integer only for the
affected devices.
All older images without a defined compat_version would just be assumed to
be "1" or "0".

This should provide an easy option to indicate an incompatible change to the
user, without having to bloat configuration too much, as most devices will
just stick to the default forever.

Since I'm not an expert of the sysupgrade mechanics, though, I'd be happy
about pointers on whether/how that could be implemented.



openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list