[PATCH v4 0/3] env: Access Environment in SPI flashes before relocation
Heiko Schocher
hs at denx.de
Sat Oct 10 10:28:03 CEST 2020
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.
Add this to aristainetos board, as aristainetos DM board
updates are now in mainline.
travis build:
https://travis-ci.org/github/hsdenx/u-boot-test/builds/733559949
Changes in v4:
- rebased to current master 5dcf7cc590
Changes in v3:
- 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.
- add comment from Simon Glass
- add missing function comments
- use if(IS_ENABLED...)
- drop extra brackets
- let env_sf_init() decide, which function to call
add comment that it is necessary to return env_sf_init()
with 0.
- new in v3 as aristainetos board DM changes are in
mainline now
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.
Heiko Schocher (3):
env: split env_import_redund() into 2 functions
env: Access Environment in SPI flashes before relocation
imx6: enable early spi environment access on aristainetos boards
configs/aristainetos2_defconfig | 1 +
configs/aristainetos2b_defconfig | 1 +
configs/aristainetos2bcsl_defconfig | 1 +
configs/aristainetos2c_defconfig | 1 +
env/Kconfig | 8 +++
env/common.c | 42 +++++++++---
env/sf.c | 100 +++++++++++++++++++++++++++-
include/env.h | 18 +++++
8 files changed, 159 insertions(+), 13 deletions(-)
--
2.25.4
More information about the U-Boot
mailing list