Kernel Makefile
  • Kernel Configuration Menu Language
    • 在核心配置 make menuconfig(或 xconfig 等)時,從 Kconfig 中讀出功能表,用戶選擇後保存到 .config的核心配置文件中。
    • 在核心編譯時,主Makefile 調用這個 .config,就知道了用戶的選擇。
  • Kernel Makefiles
  • 2.6.22.6版本的主目录下的Makefile 语法分析 1, 2, 3, 4, 5, 6, 7
  • Top Makefile
  • verbose
make V=1
  • Goals
  • $(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.
  • /path to src/arch/$(ARCH)/Makefile
    • archprepare
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License