default environment append from kconfig
Francesco Dolcini
francesco.dolcini at toradex.com
Wed Aug 10 11:58:41 CEST 2022
On Tue, Aug 09, 2022 at 01:02:24PM +0200, Rasmus Villemoes wrote:
> On 09/08/2022 12.47, Francesco Dolcini wrote:
> > I am aware of CONFIG_USE_DEFAULT_ENV_FILE, but this will completely
> > replace it, looking into the code I was not able to find anything,
>
> You could select CONFIG_ENV_IMPORT_FDT, then populate the
> /config/environment/ devicetree node with the key/value pairs you want.
>
> This can for example be done via the <board>-u-boot.dtsi file, or if
> you're using an in-tree board with in-tree .dts, and just want to
> maintain your own .config and environment out of tree, you could
> additionally set CONFIG_DEVICE_TREE_INCLUDES to point at a .dtsi which
> just has that
>
> / {
> config {
> environment {
> foo = "bar";
> };
> };
> };
>
> (that was exactly a use case I had in mind for
> CONFIG_DEVICE_TREE_INCLUDES, as can be seen in the commit log for
> a77f468099).
Thanks Rasmus, it looks pretty helpful, I'll give it a try.
Francesco
More information about the U-Boot
mailing list