* [U-Boot] [PATCH] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC
@ 2015-09-16 3:34 Josh Wu
2015-09-16 22:51 ` Bo Shen
2015-10-01 7:41 ` [U-Boot] " Andreas Bießmann
0 siblings, 2 replies; 3+ messages in thread
From: Josh Wu @ 2015-09-16 3:34 UTC (permalink / raw)
To: u-boot
If defined CONFIG_ENV_IS_IN_MMC, then u-boot environment is saved in
mmc's raw sectors. Otherwise, u-boot environment is saved as a file:
uboot.env.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
include/configs/at91-sama5_common.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/configs/at91-sama5_common.h b/include/configs/at91-sama5_common.h
index 3d6b0ae..a5990ce 100644
--- a/include/configs/at91-sama5_common.h
+++ b/include/configs/at91-sama5_common.h
@@ -53,6 +53,13 @@
#define CONFIG_CMD_DHCP
#ifdef CONFIG_SYS_USE_MMC
+
+#ifdef CONFIG_ENV_IS_IN_MMC
+/* Use raw reserved sectors to save environment */
+#define CONFIG_ENV_OFFSET 0x2000
+#define CONFIG_ENV_SIZE 0x1000
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#else
/* u-boot env in sd/mmc card */
#define CONFIG_ENV_IS_IN_FAT
#define CONFIG_FAT_WRITE
@@ -60,6 +67,7 @@
#define FAT_ENV_DEVICE_AND_PART "0"
#define FAT_ENV_FILE "uboot.env"
#define CONFIG_ENV_SIZE 0x4000
+#endif
#define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \
"setenv dtb_name at91-${board_name}.dtb; " \
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC
2015-09-16 3:34 [U-Boot] [PATCH] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC Josh Wu
@ 2015-09-16 22:51 ` Bo Shen
2015-10-01 7:41 ` [U-Boot] " Andreas Bießmann
1 sibling, 0 replies; 3+ messages in thread
From: Bo Shen @ 2015-09-16 22:51 UTC (permalink / raw)
To: u-boot
Hi Josh
On 09/16/2015 11:34 AM, Josh Wu wrote:
> If defined CONFIG_ENV_IS_IN_MMC, then u-boot environment is saved in
> mmc's raw sectors. Otherwise, u-boot environment is saved as a file:
> uboot.env.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Bo Shen <voice.shen@gmail.com>
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC
2015-09-16 3:34 [U-Boot] [PATCH] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC Josh Wu
2015-09-16 22:51 ` Bo Shen
@ 2015-10-01 7:41 ` Andreas Bießmann
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2015-10-01 7:41 UTC (permalink / raw)
To: u-boot
Dear Josh Wu,
Josh Wu <josh.wu@atmel.com> writes:
>If defined CONFIG_ENV_IS_IN_MMC, then u-boot environment is saved in
>mmc's raw sectors. Otherwise, u-boot environment is saved as a file:
>uboot.env.
>
>Signed-off-by: Josh Wu <josh.wu@atmel.com>
>Reviewed-by: Bo Shen <voice.shen@gmail.com>
>---
>
> include/configs/at91-sama5_common.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-01 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 3:34 [U-Boot] [PATCH] ARM: at91: sama5: add support for CONFIG_ENV_IS_IN_MMC Josh Wu
2015-09-16 22:51 ` Bo Shen
2015-10-01 7:41 ` [U-Boot] " Andreas Bießmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox