kconfig-frontends
kconfig-frontends copied to clipboard
Examples?
Hi,
no examples are provided to start "from scratch" a Makefile which is using the kconfig syntax. Any hints?
Thank you
Hi Kronat,
I'm not the maintainer of this project, and I'd agree there's lacking a lot of documentation on how to get going.
-
Compile and install kconfig-frontends. (You may have to run ldconfig, e.g. sudo ldconfig to make it work). This places several programs in your path. e.g. kconfig-mconf (menuconfig).
-
Create a Kconfig file for your project.
config MY_PARAMETER bool "My Parameter" default n
-
Create a .config file with the kconfig-mconf.
kconfig-mconf Kconfig
-
The tool creates a .config file which can be used inside Makefiles. However you probably also want a C/C++ header file with all parameters inside.
Take a look at the mkconfig tool inside the BitThunder build system: https://github.com/jameswalmsley/bitthunder/tree/master/.dbuild/scripts/mkconfig
This is a simple C program that parses the .config file and outputs a header file. Its borrowed from NuttX.
There's also lots of documentation on the Kconfig language available in the linux kernel. https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-language.txt
Any questions please just ask and I'll try my best. Take a look at the Kconfig files in BitThunder for examples also.
https://github.com/jameswalmsley/bitthunder/blob/master/Kconfig
All the best,
James