diff options
author | B, Ravi <ravibabu@ti.com> | 2016-09-28 14:46:18 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-08 09:33:36 -0400 |
commit | d2d9bdfcf9bdd6a39119c19c644189fccbe588cc (patch) | |
tree | 38578ed2cf0331eb7e8acfb017cc2e9aec62d4ab /lib | |
parent | 6d1a718fdffc92e5d1622d6892384328f5f73d03 (diff) | |
download | u-boot-imx-d2d9bdfcf9bdd6a39119c19c644189fccbe588cc.zip u-boot-imx-d2d9bdfcf9bdd6a39119c19c644189fccbe588cc.tar.gz u-boot-imx-d2d9bdfcf9bdd6a39119c19c644189fccbe588cc.tar.bz2 |
spl: saveenv: adding saveenv support in SPL
By default saveenv option is not supported for SPL. This patch
enable the support for save environment variable for SPL build.
Enable save environment support in SPL after setenv. By default
the saveenv option is not provided in SPL, but some boards need
this support in 'Falcon' boot, where SPL need to boot from
different images based on environment variable set by OS. For
example OS may set "reboot_image" environment variable to
"recovery" inorder to boot recovery image by SPL. The SPL read
"reboot_image" and act accordingly and change the reboot_image
to default mode using setenv and save the environemnt.
Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Simon Glass <sig@chromium.org>
change in v1:
- dropped SUPPORT, use CONFIG_SPL_SAVEENV
- updates the comments in mmc_private.h
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 1 | ||||
-rw-r--r-- | lib/hashtable.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Makefile b/lib/Makefile index c81bfeb..e3383f4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,6 +47,7 @@ obj-$(CONFIG_$(SPL_)RSA) += rsa/ obj-$(CONFIG_$(SPL_)SHA1) += sha1.o obj-$(CONFIG_$(SPL_)SHA256) += sha256.o +obj-$(CONFIG_SPL_SAVEENV) += qsort.o obj-$(CONFIG_$(SPL_)OF_LIBFDT) += libfdt/ ifneq ($(CONFIG_SPL_BUILD)$(CONFIG_SPL_OF_PLATDATA),yy) obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o diff --git a/lib/hashtable.c b/lib/hashtable.c index afd2305..f088477 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -477,11 +477,11 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) return 1; } +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) /* * hexport() */ -#ifndef CONFIG_SPL_BUILD /* * Export the data stored in the hash table in linearized form. * |