public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
@ 2023-05-11  6:16 Christophe Leroy
  2023-05-11 12:50 ` Tom Rini
  2023-05-16 15:21 ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe Leroy @ 2023-05-11  6:16 UTC (permalink / raw)
  To: Simon Glass, Tom Rini, Masahiro Yamada, Marek Beh�n,
	u-boot
  Cc: Christophe Leroy, stephane.franjou

After converting my targets from CFG_EXTRA_ENV_SETTINGS to
CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
fw_setenv doesn't set the entire defaut environment anymore.

I tried to fix it with the below patch, but it fails qemu-x86 CI test,
see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
That's the only CI test that fails AFAICS.

Could you help with a solution ? This needs to be fixed.

Thanks
Christophe

---- >8 ----
From: Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: [RFC PATCH] envtools: Fix default environment

After converting some targets from CFG_EXTRA_ENV_SETTINGS to
CONFIG_EXTRA_ENV_TEXT, default environment embedded in
fw_env tool missed all extra settings.

Commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
a .env file") restricted the inclusion of the content of that
file to builds without USE_HOSTCC.

But as mentionned in commit 79fc0c5f49 ("tools/env: cross-compile
fw_printenv without setting HOSTCC"), HOSTCC and USE_HOSTCC are
kept for code re-use.

Remove the restricting so that settings included in a .env
file are also added to fw_env tool.

Fixes: 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in a .env file")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 Makefile              | 2 +-
 include/env_default.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index fb02bba08f..a5ab5e3da9 100644
--- a/Makefile
+++ b/Makefile
@@ -2119,7 +2119,7 @@ tools/version.h: include/version.h
 	$(Q)mkdir -p $(dir $@)
 	$(call if_changed,copy)
 
-envtools: scripts_basic $(version_h) $(timestamp_h) tools/version.h
+envtools: u-boot-initial-env scripts_basic $(version_h) $(timestamp_h) tools/version.h
 	$(Q)$(MAKE) $(build)=tools/env
 
 tools-only: export TOOLS_ONLY=y
diff --git a/include/env_default.h b/include/env_default.h
index c0df39d62f..b16c22d5a2 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -10,9 +10,7 @@
 #include <env_callback.h>
 #include <linux/stringify.h>
 
-#ifndef USE_HOSTCC
 #include <generated/environment.h>
-#endif
 
 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
 env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
-- 
2.39.2


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

* Re: envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
  2023-05-11  6:16 envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in Christophe Leroy
@ 2023-05-11 12:50 ` Tom Rini
  2023-05-11 13:32   ` Christophe Leroy
  2023-05-16 15:21 ` Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2023-05-11 12:50 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Simon Glass, Masahiro Yamada, Marek Beh�n, u-boot,
	stephane.franjou

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

On Thu, May 11, 2023 at 08:16:49AM +0200, Christophe Leroy wrote:

> After converting my targets from CFG_EXTRA_ENV_SETTINGS to
> CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
> fw_setenv doesn't set the entire defaut environment anymore.
> 
> I tried to fix it with the below patch, but it fails qemu-x86 CI test,
> see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
> That's the only CI test that fails AFAICS.
> 
> Could you help with a solution ? This needs to be fixed.

Sometimes qemu fails in random ways, and the job just needs to be
re-run.  I hit re-run on that one now.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
  2023-05-11 12:50 ` Tom Rini
@ 2023-05-11 13:32   ` Christophe Leroy
  2023-05-11 13:57     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe Leroy @ 2023-05-11 13:32 UTC (permalink / raw)
  To: Tom Rini
  Cc: Simon Glass, Masahiro Yamada, Marek Beh�n,
	u-boot@lists.denx.de, FRANJOU Stephane



Le 11/05/2023 à 14:50, Tom Rini a écrit :
> On Thu, May 11, 2023 at 08:16:49AM +0200, Christophe Leroy wrote:
> 
>> After converting my targets from CFG_EXTRA_ENV_SETTINGS to
>> CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
>> fw_setenv doesn't set the entire defaut environment anymore.
>>
>> I tried to fix it with the below patch, but it fails qemu-x86 CI test,
>> see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
>> That's the only CI test that fails AFAICS.
>>
>> Could you help with a solution ? This needs to be fixed.
> 
> Sometimes qemu fails in random ways, and the job just needs to be
> re-run.  I hit re-run on that one now.
> 

Gosh. It passed now.

So you can take the patch as is under the scisor line. Or you prefer I 
resend it ?

Thanks
Christophe

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

* Re: envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
  2023-05-11 13:32   ` Christophe Leroy
@ 2023-05-11 13:57     ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2023-05-11 13:57 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Simon Glass, Masahiro Yamada, Marek Beh�n,
	u-boot@lists.denx.de, FRANJOU Stephane

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On Thu, May 11, 2023 at 01:32:23PM +0000, Christophe Leroy wrote:
> 
> 
> Le 11/05/2023 à 14:50, Tom Rini a écrit :
> > On Thu, May 11, 2023 at 08:16:49AM +0200, Christophe Leroy wrote:
> > 
> >> After converting my targets from CFG_EXTRA_ENV_SETTINGS to
> >> CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
> >> fw_setenv doesn't set the entire defaut environment anymore.
> >>
> >> I tried to fix it with the below patch, but it fails qemu-x86 CI test,
> >> see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
> >> That's the only CI test that fails AFAICS.
> >>
> >> Could you help with a solution ? This needs to be fixed.
> > 
> > Sometimes qemu fails in random ways, and the job just needs to be
> > re-run.  I hit re-run on that one now.
> > 
> 
> Gosh. It passed now.
> 
> So you can take the patch as is under the scisor line. Or you prefer I 
> resend it ?

I'll pick it up, thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
  2023-05-11  6:16 envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in Christophe Leroy
  2023-05-11 12:50 ` Tom Rini
@ 2023-05-16 15:21 ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2023-05-16 15:21 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Simon Glass, u-boot, stephane.franjou, Masahiro Yamada,
	Marek Behún

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

On Thu, May 11, 2023 at 08:16:49AM +0200, Christophe Leroy wrote:

> After converting my targets from CFG_EXTRA_ENV_SETTINGS to
> CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
> fw_setenv doesn't set the entire defaut environment anymore.
> 
> I tried to fix it with the below patch, but it fails qemu-x86 CI test,
> see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
> That's the only CI test that fails AFAICS.
> 
> Could you help with a solution ? This needs to be fixed.
> 
> Thanks
> Christophe
> 

Resending with corrected addresses, applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2023-05-16 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  6:16 envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in Christophe Leroy
2023-05-11 12:50 ` Tom Rini
2023-05-11 13:32   ` Christophe Leroy
2023-05-11 13:57     ` Tom Rini
2023-05-16 15:21 ` Tom Rini

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