diff mbox series

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

Message ID 20250923121422.24593-2-adam.blank.g@gmail.com
State New
Headers show
Series Fix KBUILD_DEFCONFIG documentation | expand

Commit Message

Adam Blank Sept. 23, 2025, 12:14 p.m. UTC
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.

Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
---
 documentation/kernel-dev/common.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Antonin Godard Sept. 25, 2025, 8:51 a.m. UTC | #1
On Tue Sep 23, 2025 at 2:14 PM CEST, Adam Blank via lists.yoctoproject.org wrote:
> 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.
>
> Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
> ---
>  documentation/kernel-dev/common.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst
> index 654c4e0a0..c7b25765a 100644
> --- a/documentation/kernel-dev/common.rst
> +++ b/documentation/kernel-dev/common.rst
> @@ -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
Adam Blank Sept. 25, 2025, 9:09 a.m. UTC | #2
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

On Thu, 25 Sept 2025 at 10:51, Antonin Godard <antonin.godard@bootlin.com>
wrote:

> On Tue Sep 23, 2025 at 2:14 PM CEST, Adam Blank via lists.yoctoproject.org
> wrote:
> > 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.
> >
> > Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
> > ---
> >  documentation/kernel-dev/common.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/documentation/kernel-dev/common.rst
> b/documentation/kernel-dev/common.rst
> > index 654c4e0a0..c7b25765a 100644
> > --- a/documentation/kernel-dev/common.rst
> > +++ b/documentation/kernel-dev/common.rst
> > @@ -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
>
> --
> Antonin Godard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
Robert P. J. Day Sept. 25, 2025, 9:50 a.m. UTC | #3
On Thu, 25 Sep 2025, Antonin Godard via lists.yoctoproject.org wrote:

... snip ...

> 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
Antonin Godard Sept. 25, 2025, 11:17 a.m. UTC | #4
On Thu Sep 25, 2025 at 11:09 AM CEST, Adam Blank wrote:
> 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
diff mbox series

Patch

diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst
index 654c4e0a0..c7b25765a 100644
--- a/documentation/kernel-dev/common.rst
+++ b/documentation/kernel-dev/common.rst
@@ -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