Linux kernel compilation make what has been done?

  Make the implementation of the default target dependency chain as follows:

  

  include / config / auto.conf to match include / config /%. conf, which execute the command $ (Q) $ (MAKE) -f $ (srctree) / Makefile silentoldconfig i.e. make -f ./Makefile silentoldconfig make the sentence is performed similar to match x210ii_qt_defconfig silentoldconfig% config, which depends scripts_basic, generating fixdep docproc hash back to the% config performed $ (Q) $ (MAKE) $ (build) = scripts / kconfig $ @ i.e. make scripts / Makefile.build obj = scripts / kconfig silentoldconfig, the process is Makefile.build contain scripts / kconfig / Makefile, which contains silentoldconfig goal, silentoldconfig turn depends on the scripts / kconfig / conf, Makefile.host based scripts / kconfig material generated in the conf again, back Run under certain silentoldconfig $ <-s $ (Kconfig) i.e. scripts / kconfig / conf -s arch / arm / Kconfig the command generator include / config / auto.conf.cmd the .config and arch / arm / Kconfig, include /config/auto.conf, include / generated / autoconf.h back to include / config / kernel.release, the target command $ (Q) echo "$ (KERNELVERSION) $$ ($ (CONFIG_SHELL) $ (srctree) / scripts / setlocalv ersion $ (srctree)) "> I.e., the current directory is passed to scripts / Makefile.build, will contain the makefile kbuild root directory, generating include / generated / bounds.h and include / generated / asm-offsets.h rules according to the file; Press under prepare0 to execute a $ (Q) $ (MAKE) $ (build) =. missing-syscalls the sentence to execute scripts / checksyscalls.sh script according to the rules under kbuild, back to prepare, execute the command to start the scripts $ ( Q) $ (MAKE) $ ( build) = $ (@) i.e. make -f scripts / Makefile.host obj = script to contain the default scripts Makefile execution target __build which case the dependency chain are as follows:

__build:

$(subdir-ym)  $(always)

subdir-ym=scripts/mod  always= scripts/kallsyms   scripts/pnmtologo   scripts/conmakehash

Start $ (subdir-ym) command $ (Q) $ (MAKE) $ (build) = $ @ i.e. make -f scripts / Makefile.build obj = scripts / mod with the first command scripts / mod / mk_elfconfig.c generated mk_elfconfig, then mk_elfconfig generate mk_elfconfig.h, finally get scripts / mod / modpost, exit back to $ (always) get scripts / kallsyms scripts / pnmtologo scripts / conmakehash exit scripts goal completed execution

  Then back to the target $ (vmlinux-dirs) to perform critical word $ (Q) $ (MAKE) $ (build) = $ @ First, we analyze $ (vmlinux-dirs) it contains $ (init-y ) $ (the init-m) $ (Core-Y) $ (Core-m) $ (Drivers-Y) $ (Drivers-m)    $ (NET-Y) $ (NET-m) $ (libs-Y) $ (libs-m) is substantially the whole kernel, it is printed:

vmlinux-dirs = init usr arch / arm / kernel arch / arm / mm arch / arm / common arch / arm / mach-s5pv210 arch / arm / plat-s5p arch / arm / plat-samsung arch / arm / vfp kernel mm fs ipc security crypto block drivers sound firmware net arch / arm / lib lib, $ (Q) $ (MAKE) $ (build) = $ @ to eleven performed
  when $ @ = init: $ (Q ) $ (MAKE) $ (build) = $ @ shall make -f scripts / Makefile.build obj = init comprising init / Makefile, which defines a number of variables and dependent rules cause __build into the kernel mode, that is builtin-target = init / built-in.o last generation init / built-in.o the scripts / Makefile.build, and init / Makefile the rule execution is complete exit.

  Most after generating $ (vmlinux-lds) vmlinux.o $ (kallsyms.o) vmlinux, zimage

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

 

Guess you like

Origin www.cnblogs.com/genshu123/p/11198790.html