[RFC PATCH 0/2] defaultenv: board defaultenv now overrides CONFIG_DEFAULT_ENVIRONMENT_PATH
Florijan Plohl
florijan.plohl at norik.com
Tue Oct 6 22:59:51 PDT 2026
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
More information about the barebox
mailing list