Skip to content
Snippets Groups Projects
  • Adrian Schmutzler's avatar
    735de53b
    base-files: add support for compat_version on device · 735de53b
    Adrian Schmutzler authored
    
    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. To complement the DEVICE_COMPAT_VERSION set
    for the image to be flashed, this implements a compat_version on
    the device, so it will have something to compare with the image.
    
    The only viable way to achieve this seems to be via board.d files,
    i.e. this is technically adding a compat version for the device's
    config.
    
    Like for the network setup, this will set up a command
    ucidef_set_compat_version to set the compat_version in board.d.
    This will then add a string to /etc/board.json, which will be
    translated into uci system config by bin/config_generate.
    By this, the compat_version, being a version of the config, will
    also be exposed to the user.
    
    As with DEVICE_COMPAT_VERSION, missing uci entry will be assumed
    as compat_version "1.0", so we only need to add this if a device
    needs to be bumped, e.g.
    
       ucidef_set_compat_version "1.1"
    
    Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
    735de53b
    History
    base-files: add support for compat_version on device
    Adrian Schmutzler authored
    
    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. To complement the DEVICE_COMPAT_VERSION set
    for the image to be flashed, this implements a compat_version on
    the device, so it will have something to compare with the image.
    
    The only viable way to achieve this seems to be via board.d files,
    i.e. this is technically adding a compat version for the device's
    config.
    
    Like for the network setup, this will set up a command
    ucidef_set_compat_version to set the compat_version in board.d.
    This will then add a string to /etc/board.json, which will be
    translated into uci system config by bin/config_generate.
    By this, the compat_version, being a version of the config, will
    also be exposed to the user.
    
    As with DEVICE_COMPAT_VERSION, missing uci entry will be assumed
    as compat_version "1.0", so we only need to add this if a device
    needs to be bumped, e.g.
    
       ucidef_set_compat_version "1.1"
    
    Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>