我想为raspberry 3配置并构建一个内核,但是当我读取一个配置文件时,我不知道linux-kernel配置文件中代码的含义。我试着搜,但找不到。
例:
CONFIG_SYSVIPC=y -> CONFIG_SYSVIPC是什么意思?
CONFIG_POSIX_MQUEUE=y -> CONFIG_POSIX_MQUEUE是什么意思?
发布于 2017-06-21 19:25:44
我试着搜,但找不到。
使用find管道到grep定位内核源代码中Kconfig*文件中配置参数的定义:
find . -name "Kconfig*" | xargs grep "config PARM"其中PARM是CONFIG_PARM的文本。
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt中记录了Kconfig*文件的树结构和菜单实体。
CONFIG_SYSVIPC=y -> CONFIG_SYSVIPC是什么意思?
使用搜索方法生成
/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$除了与拱形相关的条目外,init/Kconfig.中的init子系统还具有主要的配置条目。
如果你幸运的话,在“帮助”部分有一个很好的解释。
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 -> CONFIG_POSIX_MQUEUE是什么意思?
使用搜索方法生成
/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$ 对init/Kconfig的检查发现这个配置条目:
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.当然,您不应该直接编辑.config文件。
使用menuconfig (或类似的) make目标(例如make menuconfig)确保满足所有依赖项,并启用所有自动选择。
发布于 2017-06-21 09:36:32
用于配置内核的内核配置文件,比如启用/禁用驱动程序。
CONFIG_PCI=y意味着,内核源代码中的PCI部分将包括在编译中。如果PCI接口在硬件上可用,我们将在配置文件中启用PCI。
CONFIG_SYSVIPC=y在内核中启用消息队列、信号量集和共享内存段。
CONFIG_POSIX_MQUEUE=y在内核中启用posix消息队列。
为了更好地理解,http://www.tldp.org/HOWTO/SCSI-2.4-HOWTO/kconfig.html,请参考下面的链接
https://stackoverflow.com/questions/44670591
复制相似问题