Documentation/translations/zh_CN/kbuild/kconfig.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/kbuild/kconfig.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/kbuild/kconfig.rst- Extension
.rst- Size
- 9336 bytes
- Lines
- 260
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/kbuild/kconfig.rst
:Translator: 慕冬亮 Dongliang Mu <dzm91@hust.edu.cn>
================
配置目标和编辑器
================
本文件包含使用 ``make *config`` 的一些帮助。
使用 ``make help`` 列出所有可能的配置目标。
xconfig('qconf')、menuconfig('mconf')和 nconfig('nconf')程序也包含
内嵌的帮助文本。请务必查看这些帮助文本以获取导航、搜索和其他帮助信息。
gconfig('gconf')程序的帮助文本较少。
通用信息
========
新的内核版本通常会引入新的配置符号。更重要的是,新的内核版本可能会重命名配置符号。
当这种情况发生时,使用之前正常工作的 .config 文件并运行 "make oldconfig"
不一定会生成一个可正常工作的新内核,因此,你可能需要查看哪些新的内核符号被引入。
要查看新配置符号的列表,请使用::
cp user/some/old.config .config
make listnewconfig
配置程序将列出所有新配置符号,每行一个。
或者,你可以使用暴力破解方法::
make oldconfig
scripts/diffconfig .config.old .config | less
环境变量
========
``*config`` 的环境变量:
``KCONFIG_CONFIG``
该环境变量可用于指定一个默认的内核配置文件名,以覆盖默认的 ".config"。
``KCONFIG_DEFCONFIG_LIST``
该环境变量指定了一个配置文件列表,当 .config 不存在时,这些文件可用作基础配置。
列表中的条目以空格分隔,只有第一个存在的文件会被使用。
``KCONFIG_OVERWRITECONFIG``
如果该环境变量被设置,当 .config 是指向其他位置的符号链接时,Kconfig 不会
破坏符号链接。
``KCONFIG_WARN_UNKNOWN_SYMBOLS``
该环境变量使 Kconfig 对配置输入中所有无法识别的符号发出警告。
``KCONFIG_WERROR``
如果该环境变量被设置,Kconfig 将所有警告视为错误。
``CONFIG_``
如果该环境变量被设置,Kconfig 将在保存配置时,为所有符号添加其值作为前缀,
而不是使用默认值。
``{allyes/allmod/allno/rand}config`` 的环境变量:
``KCONFIG_ALLCONFIG``
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.