[U-Boot] [PATCH v1 2/3] Add support for save environment variable to MMC/SD card
Wolfgang Denk
wd at denx.de
Tue Sep 22 20:54:00 CEST 2009
Dear Mingkai Hu,
In message <1252640445-7890-3-git-send-email-Mingkai.hu at 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 at 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.
> # 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.
> # 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.
...
> +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?
This is going to cause a hell of confusion to users who for example
want to define a different console baud rate or such...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is surely a great calamity for a human being to have no ob-
sessions. - Robert Bly
More information about the U-Boot
mailing list