mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] defaultenv: board defaultenv now overrides CONFIG_DEFAULT_ENVIRONMENT_PATH
@ 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
  0 siblings, 2 replies; 3+ messages in thread
From: Florijan Plohl @ 2026-10-07  5:59 UTC (permalink / raw)
  To: s.hauer, barebox; +Cc: upstream, a.fatoum

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?

2. If not, is a per-board opt-in like this series acceptable, or would
   you rather see this fixed generically in defaultenv.c?

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
-- 
2.43.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-07  6:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [RFC PATCH 2/2] ARM: boards: phytec-som-imx6: re-apply BSP environment after board defaultenv Florijan Plohl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox