[U-Boot] [PATCH 6/6] omap3evm: fix errors caused by multiple definitions

Sanjeev Premi premi at ti.com
Fri Sep 30 13:19:01 CEST 2011


Fix these errors when building with recently added
omap3_evm_quick_nand_config:

env_nowhere.o: In function `env_relocate_spec':
/home/premi/u-boot/common/env_nowhere.c:40: multiple definition
 of `env_relocate_spec'
env_nand.o:/home/premi/u-boot/common/env_nand.c:416: first defi
ned here
env_nowhere.o: In function `env_get_char_spec':
/home/premi/u-boot/common/env_nowhere.c:44: multiple definition
 of `env_get_char_spec'
env_nand.o:/home/premi/u-boot/common/env_nand.c:77: first defin
ed here
env_nowhere.o: In function `env_init':
/home/premi/u-boot/common/env_nowhere.c:54: multiple definition
 of `env_init'
env_nand.o:/home/premi/u-boot/common/env_nand.c:144: first defi
ned here
env_nowhere.o: In function `env_relocate_spec':
/home/premi/u-boot/common/env_nowhere.c:40: multiple definition
 of `env_ptr'
env_nand.o:/home/premi/u-boot/common/env_nand.c:77: first defin
ed here

Signed-off-by: Sanjeev Premi <premi at ti.com>
---
 include/configs/omap3_evm_common.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index baa74bf..7a5f602 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -239,15 +239,20 @@
 
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT
-#define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_SYS_FLASH_BASE		PISMO1_ONEN_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
+#endif
 
+#if !defined(CONFIG_ENV_IS_NOWHERE)
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND
 #define CONFIG_ENV_OFFSET		ONENAND_ENV_OFFSET
 #endif
+#endif /* CONFIG_ENV_IS_NOWHERE */
 
 #define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
 
-- 
1.7.0.4



More information about the U-Boot mailing list