Linux kernel configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.