summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorDaniel Wagenknecht <dwagenknecht@emlix.com>2021-05-05 10:57:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-13 11:28:34 +0100
commite145129aaa7aefd057ba7551445965602447045c (patch)
tree0adfd50c77efee7e69f9e4c7138e3a8f61b88a20 /documentation
parent0fc54213c235229d82af2a0acb516a14b02d106e (diff)
downloadpoky-e145129aaa7aefd057ba7551445965602447045c.tar.gz
kernel-dev: document KCONFIG_MODE
(From yocto-docs rev: 12aa6f9c6af68ea03fbb056677213b00d693cf5f) Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Quentin Schulz <foss@0leil.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/kernel-dev/common.rst9
-rw-r--r--documentation/ref-manual/variables.rst38
2 files changed, 47 insertions, 0 deletions
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst
index 3f35d8412f..5935d6f560 100644
--- a/documentation/kernel-dev/common.rst
+++ b/documentation/kernel-dev/common.rst
@@ -650,6 +650,15 @@ extends the :term:`FILESPATH`
650variable (search directories) to include the ``${PN}`` directory you 650variable (search directories) to include the ``${PN}`` directory you
651created to hold the configuration changes. 651created to hold the configuration changes.
652 652
653You can also use a regular ``defconfig`` file, as generated by the
654:ref:`ref-tasks-savedefconfig`
655task instead of a complete ``.config`` file. This only specifies the
656non-default configuration values. You need to additionally set
657:term:`KCONFIG_MODE`
658in the linux-yocto ``.bbappend`` file in your layer::
659
660 KCONFIG_MODE = "alldefconfig"
661
653.. note:: 662.. note::
654 663
655 The build system applies the configurations from the ``defconfig`` 664 The build system applies the configurations from the ``defconfig``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index c339d45e18..957362bb6d 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -3745,6 +3745,44 @@ system and gives an overview of their function and contents.
3745 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`" 3745 ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
3746 section in the Yocto Project Linux Kernel Development Manual. 3746 section in the Yocto Project Linux Kernel Development Manual.
3747 3747
3748 :term:`KCONFIG_MODE`
3749 When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3750 class, specifies the kernel configuration values to use for options
3751 not specified in the provided ``defconfig`` file. Valid options are::
3752
3753 KCONFIG_MODE = "alldefconfig"
3754 KCONFIG_MODE = "allnoconfig"
3755
3756 In ``alldefconfig`` mode the options not explicitly specified will be
3757 assigned their Kconfig default value. In ``allnoconfig`` mode the
3758 options not explicitly specified will be disabled in the kernel
3759 config.
3760
3761 In case ``KCONFIG_MODE`` is not set the behaviour will depend on where
3762 the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3763 will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3764 in ``${WORKDIR}`` through a meta-layer will be handled in
3765 ``allnoconfig`` mode.
3766
3767 An "in-tree" ``defconfig`` file can be selected via the
3768 :term:`KBUILD_DEFCONFIG` variable. ``KCONFIG_MODE`` does not need to
3769 be explicitly set.
3770
3771 A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3772 generated by copying the ``.config`` file from a working Linux kernel
3773 build, renaming it to ``defconfig`` and placing it into the Linux
3774 kernel ``${WORKDIR}`` through your meta-layer. ``KCONFIG_MODE`` does
3775 not need to be explicitly set.
3776
3777 A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3778 generated using the
3779 :ref:`ref-tasks-savedefconfig`
3780 task and placed into the Linux kernel ``${WORKDIR}`` through your
3781 meta-layer. Explicitely set ``KCONFIG_MODE``::
3782
3783 KCONFIG_MODE = "alldefconfig"
3784
3785
3748 :term:`KERNEL_ALT_IMAGETYPE` 3786 :term:`KERNEL_ALT_IMAGETYPE`
3749 Specifies an alternate kernel image type for creation in addition to 3787 Specifies an alternate kernel image type for creation in addition to
3750 the kernel image type specified using the 3788 the kernel image type specified using the