
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Wednesday, September 23, 2009 2:54 AM To: Hu Mingkai-B21284 Cc: u-boot@lists.denx.de; Wood Scott-B07421; Gala Kumar-B11780 Subject: Re: [U-Boot] [PATCH v1 2/3] Add support for save environment variable to MMC/SD card
Dear Mingkai Hu,
In message 1252640445-7890-3-git-send-email-Mingkai.hu@freescale.com you wrote:
Whether booting from MMC/SD card or not, the environment
variables can
be saved on it, this patch add the operation support.
Signed-off-by: Mingkai Hu Mingkai.hu@freescale.com
...
--- a/common/Makefile +++ b/common/Makefile @@ -61,6 +61,7 @@ COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_SDCARD) += env_sdcard.o COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
Please keep the list sorted.
OK.
# command diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 2186205..83969ef 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -60,9 +60,10 @@ DECLARE_GLOBAL_DATA_PTR; !defined(CONFIG_ENV_IS_IN_NVRAM) && \ !defined(CONFIG_ENV_IS_IN_ONENAND) && \ !defined(CONFIG_ENV_IS_IN_SPI_FLASH) && \
- !defined(CONFIG_ENV_IS_IN_SDCARD) && \
Ditto.
OK.
# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\ -SPI_FLASH|MG_DISK|NVRAM|NOWHERE} +SPI_FLASH|MG_DISK|NVRAM|SDCARD|NOWHERE}
Please take the opportunity to sort this list, too. Thanks.
OK.
...
+int env_init(void) +{
- /* eSDHC isn't usable before relocation */
- gd->env_addr = (ulong)&default_environment[0];
- gd->env_valid = 1;
Argh... Does that mean that your environment suddenly changes while running? That you start running from the default environment (which cannot be changed) and then switch to a the real, changable environment?
Yes. I refered to env_sf.c file, maybe it has the same issue.
This is going to cause a hell of confusion to users who for example want to define a different console baud rate or such...
It's a problem.
Thanks, Mingkai