A defconfig
file is simply a
.config
renamed to "defconfig".
You can use a defconfig
file
to retain a known set of kernel configurations from which the
OpenEmbedded build system can draw to create the final
.config
file.
defconfig
or
.config
file.
The OpenEmbedded build system creates the final
.config
file used to configure the
kernel.
To create a defconfig
, start with a
complete, working Linux kernel .config
file.
Copy that file to the appropriate
${
PN
}
directory in your layer's
recipes-kernel/linux
directory, and rename
the copied file to "defconfig" (e.g.
~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig
).
Then, add the following lines to the linux-yocto
.bbappend
file in your layer:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://defconfig"
The
SRC_URI
tells the build system how to search for the file, while the
FILESEXTRAPATHS
extends the
FILESPATH
variable (search directories) to include the
${PN}
directory you created to hold the
configuration changes.
defconfig
file before applying any
subsequent configuration fragments.
The final kernel configuration is a combination of the
configurations in the defconfig
file and any configuration fragments you provide.
You need to realize that if you have any configuration
fragments, the build system applies these on top of and
after applying the existing defconfig file configurations.
For more information on configuring the kernel, see the "Changing the Configuration" section.