gluon/targets/ar71xx-nand
Matthias Schiffer 9e23534ec3
build: rework config generation
So far, we were using a sort operation on the generated .config to
implement precedence of =y packages over =m, and =m over unset.
Unfortunately, this sort not only used for packages, but for all config
lines. This made it impossible to override settings from targets/generic
in a target config when the new setting was sorted before the generic
setting.

To fix this, track configurations by their keys, so we can properly
override config keys that were set before. Value-based precedence is
only preserved for package configuration.

The config() and try_config() calls always take key and value as
separate arguments now. Strings are quoted automatically; the values
true, nil and false map to y, m and unset for tristate options. config()
can take an optional third argument to override the error message to
display when the setting fails to apply.

All existing target configs generate the same .config with the old and the
new code. The new code is also a bit faster on targets with many devices.
2020-05-31 02:20:58 +02:00

34 lines
622 B
Plaintext

config('CONFIG_GLUON_SPECIALIZE_KERNEL', true)
local ATH10K_PACKAGES = {'kmod-ath10k', '-kmod-ath10k-ct', 'ath10k-firmware-qca988x', '-ath10k-firmware-qca988x-ct'}
defaults {
sysupgrade_ext = '.tar',
}
-- Aerohive
device('aerohive-hiveap-121', 'hiveap-121')
-- Netgear
device('netgear-wndr3700v4', 'wndr3700v4', {
profile = 'WNDR3700V4',
factory = '-ubi-factory',
factory_ext = '.img',
})
device('netgear-wndr4300', 'wndr4300', {
profile = 'WNDR4300V1',
factory = '-ubi-factory',
factory_ext = '.img',
})
-- ZyXEL
device('zyxel-nbg6716', 'nbg6716', {
profile = 'NBG6716',
packages = ATH10K_PACKAGES,
})