diff options
author | Daniel Wagenknecht <dwagenknecht@emlix.com> | 2021-05-05 10:57:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-13 11:28:34 +0100 |
commit | e145129aaa7aefd057ba7551445965602447045c (patch) | |
tree | 0adfd50c77efee7e69f9e4c7138e3a8f61b88a20 /documentation | |
parent | 0fc54213c235229d82af2a0acb516a14b02d106e (diff) | |
download | poky-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.rst | 9 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 38 |
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` | |||
650 | variable (search directories) to include the ``${PN}`` directory you | 650 | variable (search directories) to include the ``${PN}`` directory you |
651 | created to hold the configuration changes. | 651 | created to hold the configuration changes. |
652 | 652 | ||
653 | You can also use a regular ``defconfig`` file, as generated by the | ||
654 | :ref:`ref-tasks-savedefconfig` | ||
655 | task instead of a complete ``.config`` file. This only specifies the | ||
656 | non-default configuration values. You need to additionally set | ||
657 | :term:`KCONFIG_MODE` | ||
658 | in 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 |