Documentation/translations/zh_CN/kbuild/kbuild.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/kbuild/kbuild.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/kbuild/kbuild.rst- Extension
.rst- Size
- 9801 bytes
- Lines
- 326
- 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/kbuild.rst
:Translator: 慕冬亮 Dongliang Mu <dzm91@hust.edu.cn>
======
Kbuild
======
输出文件
========
modules.order
-------------
该文件记录模块在 Makefile 中出现的顺序。modprobe 使用该文件来确定性
解析匹配多个模块的别名。
modules.builtin
---------------
该文件列出了所有内置到内核中的模块。modprobe 使用该文件来避免尝试加载
内置模块时出错。
modules.builtin.modinfo
-----------------------
该文件包含所有内置模块的 modinfo。与单独模块的 modinfo 不同,所有字段
都带有模块名称前缀。
modules.builtin.ranges
----------------------
该文件包含所有内核内置模块的地址偏移范围(每个 ELF 节)。结合 System.map
文件,它可以用来将模块名称与符号关联起来。
环境变量
========
KCPPFLAGS
---------
在预处理时传递的额外选项。kbuild 进行所有预处理(包括构建 C 文件和汇编文件)
时,都会使用这些预处理选项。
KAFLAGS
-------
传递给汇编器的额外选项(适用于内置模块和外部模块)。
AFLAGS_MODULE
-------------
外部模块的额外汇编选项。
AFLAGS_KERNEL
-------------
内置模块的额外汇编选项。
KCFLAGS
-------
传递给 C 编译器的额外选项(适用于内置模块和外部模块)。
KRUSTFLAGS
----------
传递给 Rust 编译器的额外选项(适用于内置模块和外部模块)。
CFLAGS_KERNEL
-------------
在编译内置代码时,传递给 $(CC) 的额外选项。
CFLAGS_MODULE
-------------
编译外部模块时,传递给 $(CC) 的额外模块特定选项。
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.