Linux Kconfig Command Line Interface

Debugging or verbose mode for Kconfig?

Sorry if this is a bit pluggish. :)

I've written a Python library for working with Kconfig-based configuration systems (Kconfiglib). It allows for easy inspection of symbol dependencies (see Symbol.__str__(), invoked e.g. by printing a Symbol) and lets you set values and evaluate arbitrary expressions in the context of a configuration, which can be handy to figure out what's going on.

Meaning of the code in the linux-kernel config file

I try search it but I can't find it.

Use find piped to grep to locate the definition(s) of the configuration parameter in the Kconfig* files in the kernel source:

find . -name "Kconfig*" | xargs grep "config PARM"

where PARM is the text of CONFIG_PARM.

The tree structure of Kconfig* files and the menu entires are documented in https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt


CONFIG_SYSVIPC=y -> what does CONFIG_SYSVIPC mean?

Using the search method produces

/home/test/linux-4.4.1$ find . -name "Kconfig*" | xargs grep "config SYSVIPC"
./arch/x86/Kconfig:config SYSVIPC_COMPAT
./arch/mips/Kconfig:config SYSVIPC_COMPAT
./arch/powerpc/Kconfig:config SYSVIPC_COMPAT
./arch/parisc/Kconfig:config SYSVIPC_COMPAT
./arch/s390/Kconfig:config SYSVIPC_COMPAT
./arch/ia64/Kconfig.debug:config SYSVIPC_COMPAT
./arch/sparc/Kconfig:config SYSVIPC_COMPAT
./arch/tile/Kconfig:config SYSVIPC_COMPAT
./arch/arm64/Kconfig:config SYSVIPC_COMPAT
./init/Kconfig:config SYSVIPC
./init/Kconfig:config SYSVIPC_SYSCTL
/home/test/linux-4.4.1$

Besides the arch-dependent entries, the init subsystem has the primary configuration entry in init/Kconfig.

If you're lucky, there's a decent explanation in the "help" section.

config SYSVIPC
bool "System V IPC"
---help---
Inter Process Communication is a suite of library functions and
system calls which let processes (running programs) synchronize and
exchange information. It is generally considered to be a good thing,
and some programs won't run unless you say Y here. In particular, if
you want to run the DOS emulator dosemu under Linux (read the
DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
you'll need to say Y here.

You can find documentation about IPC with "info ipc" and also in
section 6.4 of the Linux Programmer's Guide, available from
<http://www.tldp.org/guides.html>.

CONFIG_POSIX_MQUEUE=y -> what does CONFIG_POSIX_MQUEUE mean?

Using the search method produces

/home/test/linux-4.4.1$ find . -name "Kconfig*" | xargs grep "config POSIX_MQUEUE"
./init/Kconfig:config POSIX_MQUEUE
./init/Kconfig:config POSIX_MQUEUE_SYSCTL
/home/test/linux-4.4.1$

Inspection of init/Kconfig finds this configuration entry:

config POSIX_MQUEUE
bool "POSIX Message Queues"
depends on NET
---help---
POSIX variant of message queues is a part of IPC. In POSIX message
queues every message has a priority which decides about succession
of receiving it by a process. If you want to compile and run
programs written e.g. for Solaris with use of its POSIX message
queues (functions mq_*) say Y here.

POSIX message queues are visible as a filesystem called 'mqueue'
and can be mounted somewhere if you want to do filesystem
operations on message queues.

If unsure, say Y.

Of course you should not be directly editing a .config file.

Use the menuconfig (or similar) make target (e.g. make menuconfig) to ensure that all dependencies are satisfied and that all auto-selects will be enabled.



Related Topics



Leave a reply



Submit