u-boot-brain/env
Rasmus Villemoes 95fd977201 env: allow environment to be amended from control dtb
It can be useful to use the same U-Boot binary for multiple purposes,
say the normal one, one for developers that allow breaking into the
U-Boot shell, and one for use during bootstrapping which runs a
special-purpose bootcmd. Or one can have several board variants that
can share almost all boot logic, but just needs a few tweaks in the
variables used by the boot script.

To that end, allow the control dtb to contain a /config/enviroment
node (or whatever one puts in fdt_env_path variable), whose
property/value pairs are used to update the run-time environment after
it has been loaded from its persistent location.

The indirection via fdt_env_path is for maximum flexibility - for
example, should the user wish (or board logic dictate) that the values
in the DTB should no longer be applied, one simply needs to delete the
fdt_env_path variable; that can even be done automatically by
including a

  fdt_env_path = "";

property in the DTB node.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2021-05-04 11:50:50 -04:00
..
Kconfig env: allow environment to be amended from control dtb 2021-05-04 11:50:50 -04:00
Makefile env: remove callback.o for an SPL build 2020-04-24 10:09:59 -04:00
attr.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
callback.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
common.c env: allow environment to be amended from control dtb 2021-05-04 11:50:50 -04:00
eeprom.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
embedded.c env: Finish migration of common ENV options 2019-11-20 18:32:09 -05:00
env.c env: Fix invalid env handling in env_init() 2021-04-16 13:37:07 -04:00
ext4.c env: add ENV_ERASE_PTR macro 2021-04-16 17:32:34 -04:00
fat.c env/fat.c: support redund environment 2021-04-16 13:37:06 -04:00
flags.c env: Fix warning when forcing environment without ENV_ACCESS_IGNORE_FORCE 2021-04-16 11:55:55 -04:00
flash.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mmc.c env: add ENV_ERASE_PTR macro 2021-04-16 17:32:34 -04:00
nand.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
nowhere.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
nvram.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
onenand.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
remote.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sata.c env: Discern environment coming from external storage 2020-07-31 10:13:00 -04:00
sf.c env: sf: remove the static env_flash variable 2021-04-16 17:33:33 -04:00
ubi.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00