All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE
@ 2024-07-19 14:50 Brandon Maier via buildroot
  2024-07-19 16:33 ` Luca Ceresoli via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Brandon Maier via buildroot @ 2024-07-19 14:50 UTC (permalink / raw)
  To: buildroot; +Cc: Luca Ceresoli, Brandon Maier, Thomas Petazzoni

The following warning occurs from commit "boot/uboot: allow taking the
entire default environment from a text file".

  boot/uboot/Config.in:141:warning: config symbol
  'BR2_TARGET_UBOOT_DEFAULT_ENV_FILE' uses select, but is not bool or
  tristate

Add a hidden 'bool' config so we can enable dependencies.

In addition, the DEFAULT_ENV_FILE works by setting Kconfig options,
therefore we also need to depend on
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
Changes in v2:
- Use a hidden bool [Arnout, Thomas]
- Link to v1: https://lore.kernel.org/r/20240718-boot-uboot-env-select-v1-1-e6c778e814d8@collins.com
---
 boot/uboot/Config.in | 7 ++++++-
 boot/uboot/uboot.mk  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 57aac06e20..e9689b9f33 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -136,9 +136,14 @@ config BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES
 	  that will be merged to the main U-Boot configuration file.
 endif
 
+config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_HIDDEN
+	bool
+	default y if BR2_TARGET_UBOOT_DEFAULT_ENV_FILE != ""
+	select BR2_TARGET_UBOOT_NEEDS_XXD
+
 config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE
 	string "Text file with default environment"
-	select BR2_TARGET_UBOOT_NEEDS_XXD
+	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
 	help
 	  Text file containing the variables to be used as the default
 	  environment in U-Boot.
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 6cc87b35d3..80059a1a88 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -391,8 +391,8 @@ UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
 # time, so use HOSTCC_NOCCACHE.
 UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTLDFLAGS=""
 
+ifeq ($(BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_HIDDEN),y)
 UBOOT_DEFAULT_ENV_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_DEFAULT_ENV_FILE))
-ifneq ($(UBOOT_DEFAULT_ENV_FILE),)
 define UBOOT_KCONFIG_DEFAULT_ENV_FILE
 	$(call KCONFIG_SET_OPT,CONFIG_USE_DEFAULT_ENV_FILE,y)
 	$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENV_FILE,"$(shell readlink -f $(UBOOT_DEFAULT_ENV_FILE))")

---
base-commit: c624eee120b6ee0c81e636bd47abe92452610cf7
change-id: 20240718-boot-uboot-env-select-2f98051c7af9

Best regards,
-- 
Brandon Maier <brandon.maier@collins.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE
  2024-07-19 14:50 [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE Brandon Maier via buildroot
@ 2024-07-19 16:33 ` Luca Ceresoli via buildroot
  2024-07-19 20:32 ` Thomas Petazzoni via buildroot
  2024-07-22 16:29 ` Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-07-19 16:33 UTC (permalink / raw)
  To: Brandon Maier; +Cc: Thomas Petazzoni, buildroot

Hi Brandon,

On Fri, 19 Jul 2024 14:50:26 +0000
Brandon Maier <brandon.maier@collins.com> wrote:

> The following warning occurs from commit "boot/uboot: allow taking the
> entire default environment from a text file".
> 
>   boot/uboot/Config.in:141:warning: config symbol
>   'BR2_TARGET_UBOOT_DEFAULT_ENV_FILE' uses select, but is not bool or
>   tristate
> 
> Add a hidden 'bool' config so we can enable dependencies.
> 
> In addition, the DEFAULT_ENV_FILE works by setting Kconfig options,
> therefore we also need to depend on
> BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG.
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>

Thanks for addressing this so quickly!

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE
  2024-07-19 14:50 [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE Brandon Maier via buildroot
  2024-07-19 16:33 ` Luca Ceresoli via buildroot
@ 2024-07-19 20:32 ` Thomas Petazzoni via buildroot
  2024-07-20  9:36   ` Luca Ceresoli via buildroot
  2024-07-22 16:29 ` Thomas Petazzoni via buildroot
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-19 20:32 UTC (permalink / raw)
  To: Brandon Maier via buildroot; +Cc: Luca Ceresoli, Brandon Maier

Hello,

On Fri, 19 Jul 2024 14:50:26 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> +config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_HIDDEN

No need to resend for that, and even though I know I was the one
suggesting this name, I don't actually like it. Maybe:

config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_ENABLED

or something like that?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE
  2024-07-19 20:32 ` Thomas Petazzoni via buildroot
@ 2024-07-20  9:36   ` Luca Ceresoli via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-07-20  9:36 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Brandon Maier, Brandon Maier via buildroot

Hi Thomas, Brandon,

On Fri, 19 Jul 2024 22:32:24 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Fri, 19 Jul 2024 14:50:26 +0000
> Brandon Maier via buildroot <buildroot@buildroot.org> wrote:
> 
> > +config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_HIDDEN  
> 
> No need to resend for that, and even though I know I was the one
> suggesting this name, I don't actually like it. Maybe:
> 
> config BR2_TARGET_UBOOT_DEFAULT_ENV_FILE_ENABLED
> 
> or something like that?

I agree _HIDDEN is not the best possible name. In my v1 it was
BR2_TARGET_UBOOT_USE_DEFAULT_ENV_FILE, but that was a visible option to
"USE" (imperative) would make sense. Now it might be OK for a hidden
option, but perhaps _ENABLED is even better so my vote for that.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE
  2024-07-19 14:50 [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE Brandon Maier via buildroot
  2024-07-19 16:33 ` Luca Ceresoli via buildroot
  2024-07-19 20:32 ` Thomas Petazzoni via buildroot
@ 2024-07-22 16:29 ` Thomas Petazzoni via buildroot
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-22 16:29 UTC (permalink / raw)
  To: Brandon Maier via buildroot; +Cc: Luca Ceresoli, Brandon Maier

On Fri, 19 Jul 2024 14:50:26 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> The following warning occurs from commit "boot/uboot: allow taking the
> entire default environment from a text file".
> 
>   boot/uboot/Config.in:141:warning: config symbol
>   'BR2_TARGET_UBOOT_DEFAULT_ENV_FILE' uses select, but is not bool or
>   tristate
> 
> Add a hidden 'bool' config so we can enable dependencies.
> 
> In addition, the DEFAULT_ENV_FILE works by setting Kconfig options,
> therefore we also need to depend on
> BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG.
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
> Changes in v2:
> - Use a hidden bool [Arnout, Thomas]
> - Link to v1: https://lore.kernel.org/r/20240718-boot-uboot-env-select-v1-1-e6c778e814d8@collins.com
> ---
>  boot/uboot/Config.in | 7 ++++++-
>  boot/uboot/uboot.mk  | 2 +-
>  2 files changed, 7 insertions(+), 2 deletions(-)

Applied to master after changing _HIDDEN to _ENABLED as discussed.
Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-07-22 16:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 14:50 [Buildroot] [PATCH v2] boot/uboot: fix Kconfig warning for DEFAULT_ENV_FILE Brandon Maier via buildroot
2024-07-19 16:33 ` Luca Ceresoli via buildroot
2024-07-19 20:32 ` Thomas Petazzoni via buildroot
2024-07-20  9:36   ` Luca Ceresoli via buildroot
2024-07-22 16:29 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.