Patchwork [U-Boot,2/7,v6] spl: env_common.c: add new symbol CONFIG_SPL_ENV_IMPORT to contain function env_import

login
register
mail settings
Submitter ying.zhang@freescale.com
Date June 26, 2013, 7:18 a.m.
Message ID <1372231112-25185-2-git-send-email-ying.zhang@freescale.com>
Download mbox | patch
Permalink /patch/254601/
State Superseded
Delegated to: Andy Fleming
Headers show

Comments

ying.zhang@freescale.com - June 26, 2013, 7:18 a.m.
From: Ying Zhang <b40530@freescale.com>

The functionality env_import will be used in the SPL. They
had been excluded by ifndef CONFIG_SPL_BUILD. Now, add new
symbol CONFIG_SPL_ENV_IMPORT to contian the functionality
env_import in SPL.

Signed-off-by: Ying Zhang <b40530@freescale.com>
---
Compared with the original version, Changed as below:
1. Split from "boot from SD card/SPI flash with SPL".
2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality"
3. No change.
4. No change.
5. Add new symbol CONFIG_SPL_ENV_IMPORT

 README              |    3 +++
 common/env_common.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/README b/README
index 137e8cb..8a6c26c 100644
--- a/README
+++ b/README
@@ -3046,6 +3046,9 @@  FIT uImage format:
 		It conflicts with SPL env from storage medium specified by
 		CONFIG_ENV_IS_xxx but CONFIG_ENV_IS_NOWHERE
 
+		CONFIG_SPL_ENV_IMPORT
+		Support for importing the environment in SPL.
+
 		CONFIG_SPL_PAD_TO
 		Image offset to which the SPL should be padded before appending
 		the SPL payload. By default, this is defined as
diff --git a/common/env_common.c b/common/env_common.c
index 906b41f..1a36660 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -156,7 +156,7 @@  int set_default_vars(int nvars, char * const vars[])
 				H_NOCLEAR | H_INTERACTIVE, nvars, vars);
 }
 
-#ifndef CONFIG_SPL_BUILD
+#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT)
 /*
  * Check if CRC is valid and (if yes) import the environment.
  * Note that "buf" may or may not be aligned.