Support a getconfig module
nikhildevshatwar opened this issue · 1 comments
I really like the Kconfig language and how it provides simple mechanism to configure a project.
With this library, I could use the Kconfig files in any non-Linux project as well and integrate everything into the build system easily.
I use the following commands
python3 -m defconfig /path/to/defconfig
python3 -m menuconfig
python3 -m genconfig
These allow me to use the different modules as-is to do most of the tasks, except currently I am not able to read values of config items.
I would like to use following
python3 -m getconfig CONFIG_XYZ
This way, I can also integrate above commands in the Makefiles and other places to quickly take decisions based on if a Kconfig is enabled or not?
Depending on the type of the symbol, expectation is that the output returns
y/n for bool
y/n/m for tristate
actual Kconfig selected for choice
I am not sure if this was intended usage of the library or not, but this has been very helpful to use the Kconfig based configuration in any project. Adding a genconfig module would fill a gap.
@ulfalizer what do you think ?