From: Florijan Plohl <florijan.plohl@norik.com>
To: s.hauer@pengutronix.de, barebox@lists.infradead.org
Cc: upstream@lists.phytec.de, a.fatoum@pengutronix.de
Subject: [RFC PATCH 2/2] ARM: boards: phytec-som-imx6: re-apply BSP environment after board defaultenv
Date: Wed, 7 Oct 2026 07:59:53 +0200 [thread overview]
Message-ID: <20261007055953.1001705-3-florijan.plohl@norik.com> (raw)
In-Reply-To: <20261007055953.1001705-1-florijan.plohl@norik.com>
From: Primoz Fiser <primoz.fiser@norik.com>
physom_imx6_probe() appends the board's own defaultenv-physom-imx6*
directories via defaultenv_append_directory(). Since commit 7f1cc5dd869d
("defaultenv: add base and external defaultenv in pure_initcall") moved
the Kconfig/BSP-supplied environment (CONFIG_DEFAULT_ENVIRONMENT_PATH)
to an early pure_initcall, this probe - which runs later - now wins any
path collision against it.
For this board that silently shadows the per-machine environment a
Yocto BSP supplies via DEFAULT_ENVIRONMENT_PATH (e.g. meta-phytec's
env_add()-generated boot scripts) with the board's own, much older,
generic defaultenv-physom-imx6* content, without any build failure or
warning to indicate it.
Call the new defaultenv_append_external() after the board-specific
appends so the BSP-supplied environment, when actually provided, takes
final precedence again - restoring the pre-7f1cc5dd869d behavior for
this board. Standalone (non-Yocto) builds without a
DEFAULT_ENVIRONMENT_PATH are unaffected, and the board's own
defaultenv-physom-imx6* directories remain as the fallback for that
case.
Fixes: 7f1cc5dd869d ("defaultenv: add base and external defaultenv in pure_initcall")
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
---
arch/arm/boards/phytec-som-imx6/board.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 7e6f61bc36..7f59f8864b 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -276,6 +276,18 @@ static int physom_imx6_probe(struct device *dev)
defaultenv_append_directory(defaultenv_physom_imx6ul_phycore);
}
+ /*
+ * Since barebox commit 7f1cc5dd869d ("defaultenv: add base and
+ * external defaultenv in pure_initcall"), the Kconfig/BSP-supplied
+ * environment (CONFIG_DEFAULT_ENVIRONMENT_PATH, i.e. Yocto's
+ * env_add()-generated content) is appended very early and no longer
+ * automatically wins over the board-specific defaultenv-physom-imx6*
+ * directories appended above. Re-append it here so it takes final
+ * precedence again when it is actually supplied (standalone/non-Yocto
+ * builds without DEFAULT_ENVIRONMENT_PATH content are unaffected).
+ */
+ defaultenv_append_external();
+
return 0;
}
--
2.43.0
prev parent reply other threads:[~2026-10-07 6:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 5:59 [RFC PATCH 0/2] defaultenv: board defaultenv now overrides CONFIG_DEFAULT_ENVIRONMENT_PATH Florijan Plohl
2026-10-07 5:59 ` [RFC PATCH 1/2] defaultenv: add defaultenv_append_external() to re-apply BSP environment Florijan Plohl
2026-10-07 5:59 ` Florijan Plohl [this message]
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=20261007055953.1001705-3-florijan.plohl@norik.com \
--to=florijan.plohl@norik.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
--cc=upstream@lists.phytec.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