1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 17:52:07 +02:00

env: Fix env_load_location

Commit 7d714a24d7 ("env: Support multiple environments") added
static variable env_load_location. When saving environmental
variables, this variable is presumed to have the value set before.
In case the value was set before relocation and U-Boot runs from a
NOR flash, this variable wasn't writable. This causes failure when
saving the environment. To save this location, global data must be
used instead.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
York Sun
2018-02-07 14:17:11 -08:00
committed by Tom Rini
parent 32fe36574e
commit e1caa5841e
3 changed files with 5 additions and 6 deletions

View File

@@ -188,6 +188,7 @@ enum env_valid {
};
enum env_location {
ENVL_UNKNOWN,
ENVL_EEPROM,
ENVL_EXT4,
ENVL_FAT,
@@ -202,7 +203,6 @@ enum env_location {
ENVL_NOWHERE,
ENVL_COUNT,
ENVL_UNKNOWN,
};
/* value for the various operations we want to perform on the env */