Patchwork [U-Boot,2/8,v4] powerpc/corenet_ds: Correct the compilation errors about ENV

login
register
mail settings
Submitter Liu Gang
Date March 8, 2012, 10:33 a.m.
Message ID <1331202801-8965-2-git-send-email-Gang.Liu@freescale.com>
Download mbox | patch
Permalink /patch/145481/
State Accepted, archived
Delegated to: Andy Fleming
Headers show

Comments

Liu Gang - March 8, 2012, 10:33 a.m.
When defined CONFIG_ENV_IS_NOWHERE, there will be some
compilation errors:

./common/env_nowhere.o: In function `env_relocate_spec':
./common/env_nowhere.c:38: multiple definition of `env_relocate_spec'
./common/env_flash.o: ./common/env_flash.c:326: first defined here
./common/env_nowhere.o: In function `env_get_char_spec':
./common/env_nowhere.c:42: multiple definition of `env_get_char_spec'
./common/env_flash.o:./common/env_flash.c:78: first defined here
./common/env_nowhere.o: In function `env_init':
./common/env_nowhere.c:51: multiple definition of `env_init'
./common/env_flash.o:./common/env_flash.c:237: first defined here
make[1]: *** [./common/libcommon.o] Error 1
make[1]: Leaving directory `./common'
make: *** [./common/libcommon.o] Error 2

Remove the CONFIG_ENV_IS_IN_FLASH if defined CONFIG_ENV_IS_NOWHERE.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
---
Changes in v2:
 - Subject changed to "powerpc/corenet_ds".
 - Change the commit message more clearly.

Changes in v3:
 - No

Changes in v4:
 - No

 include/configs/corenet_ds.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 77dd0a2..fd8291e 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -97,6 +97,8 @@ 
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_SIZE			CONFIG_SYS_NAND_BLOCK_SIZE
 #define CONFIG_ENV_OFFSET		(5 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#elif defined(CONFIG_ENV_IS_NOWHERE)
+#define CONFIG_ENV_SIZE		0x2000
 #else
 #define CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)