[PATCH v2 1/2] environment: support DT-compatible-specific overlays

Marco Felsch m.felsch at pengutronix.de
Mon Apr 13 07:22:02 PDT 2026


On 26-04-13, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <a.fatoum at barebox.org>
> 
> Board-specific environments are registered from board code via
> defaultenv_append_directory(), but this isn't possible when using
> CONFIG_DEFAULT_ENVIRONMENT_PATH with an external environment.
> 
> Add support for a match.of_compatible/ directory convention within
> the default environment. Subdirectories named after DT root compatible
> strings are overlaid onto /env from most generic to most specific
> after the default environment is loaded. The match.of_compatible/
> directory is removed afterwards to keep /env clean.
> 
> Example layout in CONFIG_DEFAULT_ENVIRONMENT_PATH:
> 
>   barebox-defaultenv/
>     nv/boot.default
>     match.of_compatible/
>       fsl,imx8mm/
>         nv/boot.default
>       fsl,imx8mm-evk/
>         nv/boot.default
> 
> For compatible = "fsl,imx8mm-evk", "fsl,imx8mm":
>   1. fsl,imx8mm/     overlay applied first  (most generic)
>   2. fsl,imx8mm-evk/ overlay applied second (most specific)
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>

Reviewed-by: Marco Felsch <m.felsch at pengutronix.de>



More information about the barebox mailing list