* [PATCH] defaultenv: don't pass environment path to zero env
@ 2026-09-01 12:28 Ahmad Fatoum
0 siblings, 0 replies; only message in thread
From: Ahmad Fatoum @ 2026-09-01 12:28 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum, Fabian Pflug
bareboxenv -z sets ENVFS_FLAGS_FORCE_BUILT_IN, which makes envfs_save()
emit a bare header and never look at its directory argument. Passing
CONFIG_DEFAULT_ENVIRONMENT_PATH there was pointless, but harmless until
the Kconfig sync made auto.conf no longer quote string options:
The result is that the quotes became part of the value.
This is triggered by OpenEmbedded's barebox.bbclass for example, which
overrides the option on the make command line in the old, quoted form:
oe_runmake CONFIG_DEFAULT_ENVIRONMENT_PATH="\"${BAREBOX_DEFAULT_ENV} ${BAREBOX_ENV_DIR}\""
The recipe's quotes split this value apart:
bareboxenv -z "" /path/to/env"" defaultenv/barebox_zero_env
and bareboxenv takes the environment directory for its output file and
then aborts with "open: Is a directory".
Thus drop the argument. The generated file remains unchanged.
It's probably also apt to drop the quotes from newer versions of the
barebox.bbclass even though it doesn't currently lead to other errors.
Fixes: 243abef11b8f ("kconfig: sync with Linux v6.18")
Reported-by: Fabian Pflug <f.pflug@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
defaultenv/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/defaultenv/Makefile b/defaultenv/Makefile
index 79edf5604cf6..6c429d5c3b0b 100644
--- a/defaultenv/Makefile
+++ b/defaultenv/Makefile
@@ -32,7 +32,7 @@ $(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(bbenv-suffix-y) FORCE
$(call if_changed,env_h)
quiet_cmd_env_zero = ENVZ $@
-cmd_env_zero = ($(objtree)/scripts/bareboxenv -z "$(CONFIG_DEFAULT_ENVIRONMENT_PATH)" $@)
+cmd_env_zero = $(objtree)/scripts/bareboxenv -z "" $@
$(obj)/barebox_zero_env: FORCE
$(call if_changed,env_zero)
--
2.47.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-01 12:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 12:28 [PATCH] defaultenv: don't pass environment path to zero env Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox