mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Fabian Pflug <f.pflug@pengutronix.de>
Subject: [PATCH] defaultenv: don't pass environment path to zero env
Date: Tue,  1 Sep 2026 14:28:31 +0200	[thread overview]
Message-ID: <20260901122834.3004512-1-a.fatoum@pengutronix.de> (raw)

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




                 reply	other threads:[~2026-09-01 12:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260901122834.3004512-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=f.pflug@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox