Question

I want to understand how the menuconfig is done e.g.: for a linux-kernel or Buildroot. What I know is, that it's using lxdialog as GUI, and kconfig somehow carrys the logical part (like selects, depends etc.).

But where or how does dialog gets the information out of the kconfig files? There doesn't seem to be much information in the internet.

Thanks for the support

[What i found out:]

I believe the kconfiglib is used to load the menus, but no examples are given, how this is exactly done :/

Was it helpful?

Solution

Kconfig consists of:

  • a parser of the Kconfig files, which is generated by flex/bison;
  • an internal model of the parsed files + the business logic of dependencies etc., which you can find in symbol.c, expr.c, etc.
  • several front-ends using several UI libraries, each of which has its own source file, e.g. mconf.c for the lxdialog front-end;
  • the lxdialog library itself is distributed as part of kconfig.

kconfiglib.py is an alternative implementation of the parser, internal model and business logic, which makes it possible to read the Kconfig files and to read and write .config files from python. As far as I know, however, there are no front-ends based on kconfiglib. It's also not distributed as part of the kernel.

kconfig-frontends, finally, is a stand-alone clone of the Kconfig implementation that is part of the kernel. It makes it possible to use Kconfig in other projects without having to copy it and maintain it separately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top