[PATCH] defaultenv: don't pass environment path to zero env
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Sep 1 05:28:31 PDT 2026
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 at pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum at 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
More information about the barebox
mailing list