[U-Boot] [PATCH 1/2] env: fix allow to build multiple environments

Rajesh Bhagat rajesh.bhagat at nxp.com
Thu Jan 3 04:37:46 UTC 2019


Patch fixes build error when enabling CONFIG_ENV_IS_IN_SPI_FLASH
and CONFIG_ENV_IS_IN_MMC at the same time mentioned issue in
below link:

Refer: https://lists.denx.de/pipermail/u-boot/2018-February/319565.html

build error when enabling CONFIG_ENV_IS_IN_SPI_FLASH and
CONFIG_ENV_IS_IN_MMC at the same time.

Signed-off-by: Rajesh Bhagat <rajesh.bhagat at nxp.com>
---
Depends on:
https://patchwork.ozlabs.org/project/uboot/list/?series=83635

 include/environment.h | 9 ---------
 include/mmc.h         | 3 +++
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/environment.h b/include/environment.h
index 7da1291d5b..cd96676141 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -162,15 +162,6 @@ extern const unsigned char default_environment[];
 extern void env_reloc(void);
 #endif
 
-#ifdef CONFIG_ENV_IS_IN_MMC
-#include <mmc.h>
-
-extern int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
-# ifdef CONFIG_SYS_MMC_ENV_PART
-extern uint mmc_get_env_part(struct mmc *mmc);
-# endif
-#endif
-
 #ifndef DO_DEPS_ONLY
 
 #include <env_attr.h>
diff --git a/include/mmc.h b/include/mmc.h
index 95548e94c4..d84e4fca73 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -828,6 +828,9 @@ void board_mmc_power_init(void);
 int board_mmc_init(bd_t *bis);
 int cpu_mmc_init(bd_t *bis);
 int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
+# ifdef CONFIG_SYS_MMC_ENV_PART
+extern uint mmc_get_env_part(struct mmc *mmc);
+# endif
 int mmc_get_env_dev(void);
 
 /* Set block count limit because of 16 bit register limit on some hardware*/
-- 
2.17.1



More information about the U-Boot mailing list