Fix KBUILD_DEFCONFIG documentation
cover Fix KBUILD_DEFCONFIG documentation
Adam Blank (2):
kernel-dev/common.rst: fix the in-tree defconfig description ref-manual/variables.rst: fix the description of KBUILD_DEFCONFIG
documentation/kernel-dev/common.rst | 2 +- documentation/ref-manual/variables.rst | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
PATCH 1/2 kernel-dev/common.rst: fix the in-tree defconfig description
The description of the relation between KBUILD_DEFCONFIG and SRC_URI is reversed. In fact it is the SRC_URI provided defconfig which will be dropped by the kernel-yocto class if both are provided.
--- documentation/kernel-dev/common.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/kernel-dev/common.rst +1 -1
@@ -655,7 +655,7 @@ Aside from modifying your kernel recipe and providing your own :term:`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 +``defconfig`` file, that statement will be overriden by your :term:`KBUILD_DEFCONFIG` variable. See the
Re: [docs] [PATCH 1/2] kernel-dev/common.rst: fix the in-tree defconfig description
Quoted 15 lines · Adam Blank via lists.yoctoproject.org
The description of the relation between
KBUILD_DEFCONFIGandSRC_URIis reversed. In fact it is theSRC_URIprovided defconfig which will be dropped by the kernel-yocto class if both are provided.Signed-off-by Adam Blank <[email protected]>--- documentation/kernel-dev/common.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)documentation/kernel-dev/common.rst +0
-0
documentation/kernel-dev/common.rst Aside from modifying your kernel recipe and providing your own · line 658
Quoted 5 lines
documentation/kernel-dev/common.rst +1
-1@@ -655,7 +655,7 @@ Aside from modifying your kernel recipe and providing your own :term:`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 +``defconfig`` file, that statement will be overriden by your
s/overriden/overridden/
Thanks, I can also verify that behavior so the logic is indeed reverted.
In this case I think the previous sentence should also be removed:
Aside from modifying your kernel recipe and providing your own ``defconfig`` file, you need to be sure no files or statements set :term:SRC_URI to use a ``defconfig`` other than your "in-tree" file (e.g. a kernel's ``linux-``\
machine\ ``.inc`` file).
And instead only have one:
If the build system detects a statement that identifies an "out-of-tree" ``defconfig`` file, that statement will be overriden by your :term:KBUILD_DEFCONFIG variable.
What do you think?
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [docs] [PATCH 1/2] kernel-dev/common.rst: fix the in-tree defconfig description
Yes, that was also my first approach, but eventually I decided towards a minimal change.
Shall I send a V2 of the patchset?
Thanks,
Adam
Quoted 55 lines · Antonin Godard
Review
Quoted 11 lines · Adam Blank via lists.yoctoproject.org
The description of the relation between
KBUILD_DEFCONFIGandSRC_URIis reversed. In fact it is theSRC_URIprovided defconfig which will be dropped by the kernel-yocto class if both are provided.Signed-off-by Adam Blank <[email protected]>--- documentation/kernel-dev/common.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/documentation/kernel-dev/common.rstdocumentation/kernel-dev/common.rst Aside from modifying your kernel recipe and
Quoted 4 lines
index
654c4e0a0..c7b25765a100644documentation/kernel-dev/common.rst +0
-0@@ -655,7 +655,7 @@ Aside from modifying your kernel recipe andproviding your own
documentation/kernel-dev/common.rst Aside from modifying your kernel recipe and · line 655
Quoted 1 line
documentation/kernel-dev/common.rst +0
-0:term:`SRC_URI` to use a ``defconfig`` other than your "in-tree" file(e.g.
documentation/kernel-dev/common.rst Aside from modifying your kernel recipe and providing your own · line 658
Quoted 4 lines
documentation/kernel-dev/common.rst +1
-1a 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 +``defconfig`` file, that statement will be overriden by yours/overriden/overridden/
Thanks, I can also verify that behavior so the logic is indeed reverted.
In this case I think the previous sentence should also be removed:
Aside from modifying your kernel recipe and providing your own
``defconfig``
file, you need to be sure no files or statements set :term:SRC_URIto
use a
``defconfig`` other than your "in-tree" file (e.g. a kernel's ``linux-``\
machine\ ``.inc`` file).And instead only have one:
If the build system detects a statement that identifies an "out-of-tree" ``defconfig`` file, that statement will be overriden by your :term:
KBUILD_DEFCONFIGvariable.What do you think?
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [docs] [PATCH 1/2] kernel-dev/common.rst: fix the in-tree defconfig description
Quoted 3 lines · Adam Blank
Yes, that was also my first approach, but eventually I decided towards a minimal change.
Shall I send a V2 of the patchset?
Yes, please. Feel free to rephrase to something better as suggested by Robert in this thread.
Thanks!
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [docs] [PATCH 1/2] kernel-dev/common.rst: fix the in-tree defconfig description
In reply to Antonin GodardOn Thu, 25 Sep 2025, Antonin Godard via lists.yoctoproject.org wrote:
... snip ...
Quoted 5 lines
And instead only have one:
If the build system detects a statement that identifies an "out-of-tree" ``defconfig`` file, that statement will be overriden by your :term:
KBUILD_DEFCONFIGvariable.
I dislike the order of this information -- rather than saying A "will be overridden" by B, I prefer the more direct "B will take precedence over A". But that's just me.
rday
PATCH 2/2 ref-manual/variables.rst: fix the description of KBUILD_DEFCONFIG
In reply to Adam BlankRemove some leftover confusing mention of KMACHINE.
--- documentation/ref-manual/variables.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
documentation/ref-manual/variables.rst +1 -2
@@ -4892,8 +4892,7 @@ system and gives an overview of their function and contents. would place patch files and configuration fragment files (i.e. "out-of-tree"). However, if you want to use a ``defconfig`` file that is part of the kernel tree (i.e. "in-tree"), you can use the - :term:`KBUILD_DEFCONFIG` variable and append the - :term:`KMACHINE` variable to point to the + :term:`KBUILD_DEFCONFIG` variable to point to the ``defconfig`` file. To use the variable, set it in the append file for your kernel recipe