Adding support for menuconfig / Kconfig in my project

I plan to add menuconfig support in my project. The project is not related to the Linux kernel, so I have to write everything from scratch in menuconfig and Makefile.

How to add menuconfig support, create Kconfig and force the makefile to read the definitions in .config?

Any good tutorial to start with?

+8
linux linux-kernel makefile kbuild
source share
2 answers

If you are interested in using KBuild / KConfig for your custom applications, you can try the following Github projects. They strive to provide an initial template for projects using KBuild / KConfig and therefore supporting menuconfig.

+1
source share

I assume that you are creating a driver that is outside the kernel directory. Information for this can be found here: https://www.kernel.org/doc/Documentation/kbuild/modules.txt .

In addition, if you want the userpace file to display .config variables, you can depend on its kernel assembly and then turn on autoconf.h, which is located in the include / generated folder for the latest kernel versions. User space does not use kbuild directly.

0
source share

All Articles