Skip to content
Snippets Groups Projects
Commit 5b3375ac authored by Mike Frysinger's avatar Mike Frysinger Committed by Wolfgang Denk
Browse files

env_sf: support embedded environments


If both CONFIG_ENV_SECT_SIZE and CONFIG_ENV_SIZE are defined, and the sect
size is larger than the env size, then it means the env is embedded in a
block.  So we have to save/restore the part of the sector which is not the
environment.  Previously, saving the environment in SPI flash in this
setup would probably brick the board as the rest of the sector tends to
contain actual U-Boot data/code.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
parent ecf5f077
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment