[U-Boot] [PATCH v1 3/3] mpc8536: Get the address of env on the SDCard

Wolfgang Denk wd at denx.de
Tue Sep 22 20:59:59 CEST 2009


Dear Mingkai Hu,

In message <1252640445-7890-4-git-send-email-Mingkai.hu at freescale.com> you wrote:
> Both the save env and load env operation will call this function
> to get the address of env on the SDCard, so the user can control
> where to put the env freely.
> 
> Also enable the functionlity of saving env variable to SDCard on
> mpc8536
> 
> Signed-off-by: Mingkai Hu <Mingkai.hu at freescale.com>
...
> +#if defined(CONFIG_MMC)
> +/*
> + * The environment variables are written to just after the u-boot image
> + * on SDCard, so we must read the MBR to get the start address and code
> + * length of the u-boot image, then calculate the address of the env.

This seems to be broken by design. If your U-Boot image grows, it
would overwrite the environment? Or am I missing something?

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
If A equals success, then the formula is A = X + Y + Z. X is work.  Y
is play. Z is keep your mouth shut.                 - Albert Einstein


More information about the U-Boot mailing list