[PATCH v4 2/3] env: Access Environment in SPI flashes before relocation

Simon Glass sjg at chromium.org
Mon Oct 12 05:35:03 CEST 2020


On Sat, 10 Oct 2020 at 02:28, Heiko Schocher <hs at denx.de> wrote:
>
> Enable the new Kconfig option ENV_SPI_EARLY if you want
> to use Environment in SPI flash before relocation.
> Call env_init() and than you can use env_get_f() for
> accessing Environment variables.
>
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
>
> 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.
>
>  env/Kconfig |   8 +++++
>  env/sf.c    | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 105 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list