1.autoconf.h file
Older Linux kernel, after executing make Menuconfig, the compilation system will save all configuration information to the. config file in the top-level directory of the source code,
The contents of the. config are then converted to the C language-aware macro definition to be updated in the Autoconf.h file in the include/generated directory .
For example, the config_xxx =y definition will be converted to a # define CONFIG_XXX 1 pattern written to the Autoconf.h file . autoconf.h files are automatically included ,
Explicit inclusion in C code files is not required. In the root directory of the kernel source code to implement the makefile, the top-level makefile related content as follows:
# Use Linuxinclude If you must reference the Include/directory.
# Needed to being compatible with the o= option
Linuxinclude: =-i$ (Srctree)/arch/$ (hdr-arch)/include-iarch/$ (hdr-arch)/include/generated-iinclude $ (if $ (KBUILD_ SRC),-i$ (srctree)/include)-include include/generated/autoconf.h
......
Export kbuild_cppflags nostdinc_flags linuxinclude objcopyflags ldflags
The last line of the Linuxinclude assignment contains the autoconf.h file, which is then exported to other makefile files using export.
In the new kernel (4.14) $ (Q) test-e include/generated/autoconf.h
Linux kernel configuration