kconfig-frontends icon indicating copy to clipboard operation
kconfig-frontends copied to clipboard

Examples?

Open natale-p opened this issue 10 years ago • 1 comments

Hi,

no examples are provided to start "from scratch" a Makefile which is using the kconfig syntax. Any hints?

Thank you

natale-p avatar Sep 19 '14 12:09 natale-p

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.

  1. 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).

  2. Create a Kconfig file for your project.

    config MY_PARAMETER bool "My Parameter" default n

  3. Create a .config file with the kconfig-mconf.

    kconfig-mconf Kconfig

  4. 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

jameswalmsley avatar Sep 22 '14 08:09 jameswalmsley