public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] uboot-config: fix KCONFIG_CONFIG_ROOTDIR path
@ 2026-03-04 23:04 Francesco Valla
  2026-03-12 20:56 ` Ryan Eatmon
  0 siblings, 1 reply; 3+ messages in thread
From: Francesco Valla @ 2026-03-04 23:04 UTC (permalink / raw)
  To: openembedded-core
  Cc: Ryan Eatmon, Mathieu Dubois-Briand, Richard Purdie,
	Francesco Valla

Commit 22e96b3 ("u-boot: Make sure the build dir is unique for each
UBOOT_CONFIG") changed the u-boot build directory name to include the
UBOOT_CONFIG value the build is performed for. Align to the new pattern
also the KCONFIG_CONFIG_ROOTDIR variable, which is used by devtool to
create a config baseline in case the menuconfig task is enabled.

This fixes the following error, which can be seen when building u-boot
under devtool and UBOOT_CONFIG contains a single configuration:

  cp: cannot stat '<u-boot-builddir>/<u-boot-defconfig>/.config': No such file or directory

Signed-off-by: Francesco Valla <francesco@valla.it>
---
 meta/classes-recipe/uboot-config.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index 112fea2de44cd716fbe65598b275410a4fb90056..f7848396c17fdf4835053b9f5a45480ef8ce9f1f 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -251,7 +251,8 @@ python () {
             # Ensure the uboot specific menuconfig settings do not leak into other recipes
             if 'u-boot' in recipename:
                 if len(ubootconfig) == 1:
-                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", d.getVar("UBOOT_MACHINE").strip()))
+                    builddir = "%s-%s" % (d.getVar("UBOOT_MACHINE").strip(), config)
+                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", builddir))
                 else:
                     # Disable menuconfig for multiple configs
                     d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")

---
base-commit: d3e757f21403554e7064c5fa2b353080d14d2ce7
change-id: 20260304-uboot_devtool_fix-170221fd17bc

Best regards,
-- 
Francesco Valla <francesco@valla.it>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] uboot-config: fix KCONFIG_CONFIG_ROOTDIR path
  2026-03-04 23:04 [PATCH] uboot-config: fix KCONFIG_CONFIG_ROOTDIR path Francesco Valla
@ 2026-03-12 20:56 ` Ryan Eatmon
  2026-03-15  9:59   ` Francesco Valla
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Eatmon @ 2026-03-12 20:56 UTC (permalink / raw)
  To: Francesco Valla, openembedded-core; +Cc: Mathieu Dubois-Briand, Richard Purdie



On 3/4/2026 5:04 PM, Francesco Valla wrote:
> Commit 22e96b3 ("u-boot: Make sure the build dir is unique for each
> UBOOT_CONFIG") changed the u-boot build directory name to include the
> UBOOT_CONFIG value the build is performed for. Align to the new pattern
> also the KCONFIG_CONFIG_ROOTDIR variable, which is used by devtool to
> create a config baseline in case the menuconfig task is enabled.
> 
> This fixes the following error, which can be seen when building u-boot
> under devtool and UBOOT_CONFIG contains a single configuration:
> 
>    cp: cannot stat '<u-boot-builddir>/<u-boot-defconfig>/.config': No such file or directory
> 
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
>   meta/classes-recipe/uboot-config.bbclass | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
> index 112fea2de44cd716fbe65598b275410a4fb90056..f7848396c17fdf4835053b9f5a45480ef8ce9f1f 100644
> --- a/meta/classes-recipe/uboot-config.bbclass
> +++ b/meta/classes-recipe/uboot-config.bbclass
> @@ -251,7 +251,8 @@ python () {
>               # Ensure the uboot specific menuconfig settings do not leak into other recipes
>               if 'u-boot' in recipename:
>                   if len(ubootconfig) == 1:
> -                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", d.getVar("UBOOT_MACHINE").strip()))
> +                    builddir = "%s-%s" % (d.getVar("UBOOT_MACHINE").strip(), config)
> +                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", builddir))
>                   else:
>                       # Disable menuconfig for multiple configs
>                       d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")
> 
> ---
> base-commit: d3e757f21403554e7064c5fa2b353080d14d2ce7
> change-id: 20260304-uboot_devtool_fix-170221fd17bc
> 
> Best regards,


I'm working on adding a test for this change to make sure we don't break 
it again in the future and I noticed two things.

1) This whole if block for the check is indented one for level too deep 
for what is required.  I'll include moving this when I send in the test.

2) Do we really want to disable this if you have multiple configs.  The 
logic of UBOOT_CONFIG is that the last entry in the list acts like the 
"default" set of uboot files.  In other words, there is a symlink 
created with the proper UBOOT_BINARYNAME that points to the final 
version generated by the final config.  So we could point 
KCONFIG_CONFIG_ROOTDIR to that final build directory and not disable 
this feature 100%.


-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] uboot-config: fix KCONFIG_CONFIG_ROOTDIR path
  2026-03-12 20:56 ` Ryan Eatmon
@ 2026-03-15  9:59   ` Francesco Valla
  0 siblings, 0 replies; 3+ messages in thread
From: Francesco Valla @ 2026-03-15  9:59 UTC (permalink / raw)
  To: Ryan Eatmon; +Cc: openembedded-core, Mathieu Dubois-Briand, Richard Purdie

Hello Ryan,

On Thu, Mar 12, 2026 at 03:56:51PM -0500, Ryan Eatmon wrote:
> 
> 
> On 3/4/2026 5:04 PM, Francesco Valla wrote:
> > Commit 22e96b3 ("u-boot: Make sure the build dir is unique for each
> > UBOOT_CONFIG") changed the u-boot build directory name to include the
> > UBOOT_CONFIG value the build is performed for. Align to the new pattern
> > also the KCONFIG_CONFIG_ROOTDIR variable, which is used by devtool to
> > create a config baseline in case the menuconfig task is enabled.
> > 
> > This fixes the following error, which can be seen when building u-boot
> > under devtool and UBOOT_CONFIG contains a single configuration:
> > 
> >    cp: cannot stat '<u-boot-builddir>/<u-boot-defconfig>/.config': No such file or directory
> > 
> > Signed-off-by: Francesco Valla <francesco@valla.it>
> > ---
> >   meta/classes-recipe/uboot-config.bbclass | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
> > index 112fea2de44cd716fbe65598b275410a4fb90056..f7848396c17fdf4835053b9f5a45480ef8ce9f1f 100644
> > --- a/meta/classes-recipe/uboot-config.bbclass
> > +++ b/meta/classes-recipe/uboot-config.bbclass
> > @@ -251,7 +251,8 @@ python () {
> >               # Ensure the uboot specific menuconfig settings do not leak into other recipes
> >               if 'u-boot' in recipename:
> >                   if len(ubootconfig) == 1:
> > -                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", d.getVar("UBOOT_MACHINE").strip()))
> > +                    builddir = "%s-%s" % (d.getVar("UBOOT_MACHINE").strip(), config)
> > +                    d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join("${B}", builddir))
> >                   else:
> >                       # Disable menuconfig for multiple configs
> >                       d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")
> > 
> > ---
> > base-commit: d3e757f21403554e7064c5fa2b353080d14d2ce7
> > change-id: 20260304-uboot_devtool_fix-170221fd17bc
> > 
> > Best regards,
> 
> 
> I'm working on adding a test for this change to make sure we don't break it
> again in the future and I noticed two things.
> 
> 1) This whole if block for the check is indented one for level too deep for
> what is required.  I'll include moving this when I send in the test.
>

Right, I did not notice it.

> 2) Do we really want to disable this if you have multiple configs.  The
> logic of UBOOT_CONFIG is that the last entry in the list acts like the
> "default" set of uboot files.  In other words, there is a symlink created
> with the proper UBOOT_BINARYNAME that points to the final version generated
> by the final config.  So we could point KCONFIG_CONFIG_ROOTDIR to that final
> build directory and not disable this feature 100%.
> 

This might help quick config change testing, but I'd at least leave a
warning in that case, as it might mislead users, especially when
approaching third-party layers with ton of configurations.

> 
> -- 
> Ryan Eatmon                reatmon@ti.com
> -----------------------------------------
> Texas Instruments, Inc.  -  LCPD  -  MGTS


Regards,

Francesco



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-15 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 23:04 [PATCH] uboot-config: fix KCONFIG_CONFIG_ROOTDIR path Francesco Valla
2026-03-12 20:56 ` Ryan Eatmon
2026-03-15  9:59   ` Francesco Valla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox