defconfig、.config 和 Kconfig

In Linux kernel development, there are several related concepts such as defconfig, .config and Kconfig.

1.defconfig(Default Configuration):

        defconfig is the default configuration file in the Linux kernel, which defines the default configuration options when the kernel is compiled. These options include which driver modules are compiled into the kernel, which modules are compiled as load modules, and other switch options for kernel functions. The defconfig file usually exists in  kernel/arch/<架构>/configs the directory. When compiling the kernel, you can choose to use a specific defconfig file as the base configuration.

2..config:

        The .config file is a configuration file generated during the Linux kernel compilation process. When compiling the kernel, you can   perform interactive configuration operations through  the or  make menuconfigcommands , and then save the configuration results to the .config file. The .config file records user-defined configuration options, as well as option values ​​in the default configuration (if they have not been modified).make xconfigmake defconfig

3.Kconfig:

        Kconfig is the configuration language used in the Linux kernel configuration system. It allows developers to define various configuration options and provides an interactive configuration interface, allowing users to select and configure kernel functions through menus, configuration items, etc. Kconfig files exist in each subdirectory of the Linux source tree and form a hierarchical structure. You can open the Kconfig configuration interface through the  make menuconfig or  make xconfig command and perform corresponding configuration operations.

To sum up, defconfig is the default configuration file of the kernel, .config is the configuration file generated by the kernel compilation process, and Kconfig is the configuration language and configuration description file used by the Linux kernel configuration system.

Guess you like

Origin blog.csdn.net/qq_53676406/article/details/131460073