public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/5] allow default environment to be amended from dtb
@ 2020-11-10 20:25 Rasmus Villemoes
  2020-11-10 20:25 ` [PATCH 1/5] fdtdec: make fdtdec_get_config_string() return const char* Rasmus Villemoes
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Rasmus Villemoes @ 2020-11-10 20:25 UTC (permalink / raw)
  To: u-boot

These patches introduce the ability to amend the default environment
baked into the U-Boot binary by a DT property under /config. This is
useful to create a few different images based on the same U-Boot
binary, e.g. one for normal use, one for development and one for
bootstrapping the board. It's also useful when SPL loads U-Boot from a
FIT image and decides between multiple possible control DTBs; those
control DTBs can then contain tweaks of the default environment
suitable for that particular board variant.

There are already various /config/ properties one can use for some of
this; e.g. /config/bootdelay overrides any bootdelay set in the
environment. This is intended as a flexible way to achieve these kinds
of tweaks instead of adding more /config/* properties. [It should be
noted that adding "bootdelay=123" to /config/default-environment is
not a drop-in replacement for setting /config/bootdelay to 123, as the
latter takes effect whether the environment is the default one or one
loaded from storage.]

It does not affect the case where an environment is loaded from a
storage device, nor is there any change if the new CONFIG_ option is
not selected.

Rasmus Villemoes (5):
  fdtdec: make fdtdec_get_config_string() return const char*
  fdtdec: introduce fdtdec_get_config_property
  env: make env_set_default_vars() return void
  env: allow default environment to be amended from control dtb
  test: add tests for default environment

 arch/arm/mach-exynos/include/mach/mipi_dsim.h |   2 +-
 arch/arm/mach-rockchip/rk3188/rk3188.c        |   2 +-
 board/dhelectronics/dh_stm32mp1/board.c       |   2 +-
 board/firefly/firefly-rk3288/firefly-rk3288.c |   2 +-
 board/st/stm32mp1/stm32mp1.c                  |   2 +-
 cmd/nvedit.c                                  |  37 +++++++
 common/cli.c                                  |   2 +-
 configs/sandbox64_defconfig                   |   1 +
 configs/sandbox_defconfig                     |   1 +
 env/Kconfig                                   |  21 ++++
 env/common.c                                  |  23 +++-
 include/configs/sandbox.h                     |   8 +-
 include/env.h                                 |   2 +-
 include/fdtdec.h                              |  16 ++-
 lib/fdtdec.c                                  |  29 +++--
 test/env/Makefile                             |   1 +
 test/env/default.c                            | 102 ++++++++++++++++++
 17 files changed, 227 insertions(+), 26 deletions(-)
 create mode 100644 test/env/default.c

-- 
2.23.0

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

end of thread, other threads:[~2020-11-22 16:12 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-10 20:25 [PATCH 0/5] allow default environment to be amended from dtb Rasmus Villemoes
2020-11-10 20:25 ` [PATCH 1/5] fdtdec: make fdtdec_get_config_string() return const char* Rasmus Villemoes
2020-11-16 23:52   ` Simon Glass
2020-11-10 20:26 ` [PATCH 2/5] fdtdec: introduce fdtdec_get_config_property Rasmus Villemoes
2020-11-16 23:52   ` Simon Glass
2020-11-10 20:26 ` [PATCH 3/5] env: make env_set_default_vars() return void Rasmus Villemoes
2020-11-12 19:51   ` Wolfgang Denk
2020-11-10 20:26 ` [PATCH 4/5] env: allow default environment to be amended from control dtb Rasmus Villemoes
2020-11-12 19:58   ` Wolfgang Denk
2020-11-16 23:52     ` Simon Glass
2020-11-17  9:49       ` Rasmus Villemoes
2020-11-20 10:13         ` Wolfgang Denk
2020-11-20 10:33           ` Rasmus Villemoes
2020-11-20 10:53             ` Wolfgang Denk
2020-11-17 11:31       ` Wolfgang Denk
2020-11-17 18:23         ` Tom Rini
2020-11-18 14:37           ` Simon Glass
2020-11-20 10:28             ` Wolfgang Denk
2020-11-21 23:07               ` Simon Glass
2020-11-22 16:12                 ` Wolfgang Denk
2020-11-20 10:16           ` Wolfgang Denk
2020-11-17 10:01   ` Stefano Babic
2020-11-10 20:26 ` [PATCH 5/5] test: add tests for default environment Rasmus Villemoes

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