[U-Boot] [PATCH v2 0/2] env: Access Environment in SPI flashes before relocation

Heiko Schocher hs at denx.de
Fri Nov 15 07:27:35 UTC 2019


Add the possibility to access Environment stored in SPI NOR
Flash before relocation. This is used in DM/DTS rework for
the aristainetos boards. There mutliple DTS are packed into
a FIT image and through a variable in the Environment
the correct DTS will be selected. For this we need very
early access to the Environment. Also may this is good
for selecting the console baudrate again through Environment
which I think currently does not work for any board based on
DM/DTS and with Environment in SPI NOR flash.

base:
3ff1ff3ff7 - Merge branch '2019-11-12-migrate-SYS_REDUNDAND_ENVIRONMENT'

travis build:
https://travis-ci.org/hsdenx/u-boot-test/builds/612239100
(travis has currently some problems...)

Therefore I started an build on azure, which worked, see:
https://dev.azure.com/hs0298/hs/_build/results?buildId=1&view=results

Changes in v2:
- patch "env: split env_import_redund into 2 functions"
  is new in version 2. Idea is to not duplicate too much
  code as Simon suggested.
- env_sf_init_early() always return 0 now. If we do not return
  0 in this function, env_set_inited() never get called,
  which has the consequence that env_load/save/erase never
  work, because they check if the init bit is set.

Heiko Schocher (2):
  env: split env_import_redund() into 2 functions
  env: Access Environment in SPI flashes before relocation

 env/Kconfig   |  8 +++++
 env/common.c  | 40 +++++++++++++++++++------
 env/sf.c      | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 include/env.h | 18 ++++++++++++
 4 files changed, 138 insertions(+), 9 deletions(-)

-- 
2.21.0



More information about the U-Boot mailing list