]> git.dujemihanovic.xyz Git - u-boot.git/commit
env: Fix env_load_location
authorYork Sun <york.sun@nxp.com>
Wed, 7 Feb 2018 22:17:11 +0000 (14:17 -0800)
committerTom Rini <trini@konsulko.com>
Fri, 16 Feb 2018 16:12:41 +0000 (11:12 -0500)
commite1caa5841e8a9bc0ee658bdacae0519fa28e1e6a
tree97f85fa34ef28e76d53a27eddd76fce321acb333
parent32fe36574ea5e6ea55313e16547b98a984af7767
env: Fix env_load_location

Commit 7d714a24d725 ("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>
env/env.c
include/asm-generic/global_data.h
include/environment.h