Skip to contentSkip to conversation

Fix KBUILD_DEFCONFIG documentation

PATCH Superseded Adam Blank 3 participants 7 messages Sep 23, 2025 – Sep 25, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Adam Blank

author
#0 lore raw

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(-)
author
#1 lore raw

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
index 654c4e0a0..c7b25765a 100644
@@ -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
#2 lore raw

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_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 +0 -0
index 654c4e0a0..c7b25765a 100644

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
author
#3 lore raw

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_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(-)
(quoted diff) +0 -0

b/documentation/kernel-dev/common.rst

documentation/kernel-dev/common.rst Aside from modifying your kernel recipe and

Quoted 4 lines

index 654c4e0a0..c7b25765a 100644

documentation/kernel-dev/common.rst +0 -0
@@ -655,7 +655,7 @@ Aside from modifying your kernel recipe and

providing 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 -1
 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

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#4 lore raw

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
#5 lore raw

Re: [docs] [PATCH 1/2] kernel-dev/common.rst: fix the in-tree defconfig description

In reply to Antonin Godard

On 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_DEFCONFIG variable.

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

author
#6 lore raw

PATCH 2/2 ref-manual/variables.rst: fix the description of KBUILD_DEFCONFIG

In reply to Adam Blank

Remove 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
index 18ead7d04..2f9f1a9d8 100644
@@ -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