[RFC] use kconfig for configuration #6581
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows tracking the LibreELEC configuration options through kconfig.
For this purpose I have been testing with Kconfiglib. It can be easily installed with pip.
The main reason I wanted to do this was to have a uniform and central location for all configuration options. This allows us to have better help, and dependency tracking for config options. Options will be able to depend on other options instead of having to handle that in shell scripts.
This also allow one to use
menuconfig
(and other kconfig utilities) to configure the options. This is quite nice.This can be invoked with
or similar.
I have created a helper script that is also available to call directly (for other kconfig utilities).
Basically all options files are merged into a single file during the build and
olddefconfig
is used to create a final config file which is then sourced by the shell scripts. This is nice because it tells you if options are wrong or specified multiple times.I've made this PR just to get some feedback if people like this idea or not. I didn't want to commit a bunch of time to writing a bunch of documentation and changing all the current shell logic to use
y
instead ofyes
. I have also (ab)used the use of strings in kconfig when a lot of them should really be booleans. This can be improved if we decide we like this direction.I've only built for Generic-gbm and RPI4, I haven't tested the other projects/devices.
Projects that use kconfig (of some kind)
some screenshots
Thanks for reading.