From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Florijan Plohl <florijan.plohl@norik.com>,
s.hauer@pengutronix.de, barebox@lists.infradead.org
Cc: upstream@lists.phytec.de
Subject: Re: [RFC PATCH 0/2] defaultenv: board defaultenv now overrides CONFIG_DEFAULT_ENVIRONMENT_PATH
Date: Wed, 14 Oct 2026 14:42:57 +0200 [thread overview]
Message-ID: <74cf8b9b-3509-406d-9a18-092939c76acf@pengutronix.de> (raw)
In-Reply-To: <20261007055953.1001705-1-florijan.plohl@norik.com>
Hello Florian,
On 10/7/26 7:59 AM, Florijan Plohl wrote:
> Hi,
>
> since commit 7f1cc5dd869d ("defaultenv: add base and external
> defaultenv in pure_initcall"), a board's own defaultenv overrides the
> environment from CONFIG_DEFAULT_ENVIRONMENT_PATH instead of the other
> way round:
>
> before: base -> board defaultenv -> CONFIG_DEFAULT_ENVIRONMENT_PATH
> after: base -> CONFIG_DEFAULT_ENVIRONMENT_PATH -> board defaultenv
>
> Documentation/user/defaultenv-2.rst still describes the old order.
>
> On phytec-som-imx6 this means the board's boot/* scripts now replace
> the ones with the same names from our Yocto BSP (meta-phytec). Booting
> via these entries then skips the BSP's additional setup, e.g. the
> device tree overlays it applies for mmc, emmc and nand boot.
>
> This RFC restores the old order for this board only: patch 1 adds
> defaultenv_append_external(), patch 2 calls it at the end of
> physom_imx6_probe(). Before polishing it, we'd like to ask:
>
> 1. Is the new order intended?
I must have had blinders on when I did it this way. I agree with you
that it makes more sense for external to override board defaultenv than
the other way round.
> 2. If not, is a per-board opt-in like this series acceptable, or would
> you rather see this fixed generically in defaultenv.c?
I would rather seen this fixed generically. An entry in
Documentation/migration-guides/migration-master.rst is probably apt to
point out the change/restoration of behavior.
Watch out that CONFIG_DEFAULT_ENVIRONMENT_PATH can not be assumed to be
the last element always, e.g. fw_cfg should still be able to override it
as it can be specified at runtime.
Thanks,
Ahmad
>
> 3. If it is, what is the recommended way for a BSP to replace a board's
> boot scripts?
>
> Thanks,
> Florijan
>
> Primoz Fiser (2):
> defaultenv: add defaultenv_append_external() to re-apply BSP
> environment
> ARM: boards: phytec-som-imx6: re-apply BSP environment after board
> defaultenv
>
> arch/arm/boards/phytec-som-imx6/board.c | 12 ++++++++++++
> defaultenv/defaultenv.c | 16 ++++++++++++++++
> include/envfs.h | 5 +++++
> 3 files changed, 33 insertions(+)
>
>
> base-commit: ba8e34dfa96f80ae405e0ea7ac1e62762c28246a
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-10-14 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 5:59 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 ` [RFC PATCH 2/2] ARM: boards: phytec-som-imx6: re-apply BSP environment after board defaultenv Florijan Plohl
2026-10-14 12:42 ` Ahmad Fatoum [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=74cf8b9b-3509-406d-9a18-092939c76acf@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=florijan.plohl@norik.com \
--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