Kernel Makefile
- Kernel Configuration Menu Language
- 在核心配置 make menuconfig(或 xconfig 等)時,從 Kconfig 中讀出功能表,用戶選擇後保存到 .config的核心配置文件中。
- 在核心編譯時,主Makefile 調用這個 .config,就知道了用戶的選擇。
- Kernel Makefiles
- Top Makefile
- KBUILD_VERBOSE
- KBUILD_CHECKSRC
- KBUILD_EXTMOD
- KBUILD_SRC
- KBUILD_OUTPUT
- _all
- MAKECMDGOALS
- skip-makefile
- VPATH
- SUBARCH
- ARCH
- verbose
make V=1
- Goals
- Built-in object goals
- Loadable module goals
- Composite objects
- Export symbols
- Library file goals
- Descending down
- Compilation flags
- Relative path
- Echo
- Host Program support
- $(obj-y)
- Kbuild compiles all the $(obj-y) files.
- It then calls "$(LD) -r"(generate relocatable output) to merge these files into one built-in.o file.
- built-in.o is later linked into vmlinux by the parent Makefile.
- Link order is significant, because certain functions(module_init() / __initcall) will be called during boot in the order they appear.
page revision: 69, last edited: 06 May 2010 06:51