It might be desirable to have kernel configuration fragment
support through a defconfig
file that
is pulled from the kernel source tree for the configured
machine.
By default, the OpenEmbedded build system looks for
defconfig
files in the layer used for
Metadata, which is "out-of-tree", and then configures them
using the following:
SRC_URI += "file://defconfig"
If you do not want to maintain copies of
defconfig
files in your layer but would
rather allow users to use the default configuration from the
kernel tree and still be able to add configuration fragments
to the
SRC_URI
through, for example, append files, you can direct the
OpenEmbedded build system to use a
defconfig
file that is "in-tree".
To specify an "in-tree" defconfig
file,
edit the recipe that builds your kernel so that it has the
following command form:
KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
You need to append the variable with
KMACHINE
and then supply the path to
your "in-tree" defconfig
file.
Aside from modifying your kernel recipe and providing your own
defconfig
file, you need to be sure no
files or statements set SRC_URI
to use a
defconfig
other than your "in-tree"
file (e.g. a kernel's linux-
machine
.inc
file).
In other words, if the build system detects a statement
that identifies an "out-of-tree"
defconfig
file, that statement
will override your
KBUILD_DEFCONFIG
variable.
See the
KBUILD_DEFCONFIG
variable description for more information.