[U-Boot] [PATCH 8/8] configs: j721e_evm_r5: Add configs for environment in eMMC

Faiz Abbas faiz_abbas at ti.com
Tue Nov 19 08:19:25 UTC 2019


Add config to save and read back environment from eMMC.

Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
---
 configs/j721e_evm_a72_defconfig | 3 +++
 include/configs/j721e_evm.h     | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 8b70f11a21..a8be24411c 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -23,6 +23,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs;
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_DM_MAILBOX=y
 CONFIG_SPL_DM_RESET=y
@@ -50,6 +51,8 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-common-proc-board"
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index c7a6cd4fab..950f40eb40 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -119,4 +119,13 @@
 /* Now for the remaining common defines */
 #include <configs/ti_armv7_common.h>
 
+/* MMC ENV related defines */
+#ifdef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		0
+#define CONFIG_SYS_MMC_ENV_PART	1
+#define CONFIG_ENV_SIZE		(128 << 10)
+#define CONFIG_ENV_OFFSET		0x680000
+#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#endif
+
 #endif /* __CONFIG_J721E_EVM_H */
-- 
2.19.2



More information about the U-Boot mailing list