[U-Boot] [PATCH v3] hwconfig: Utilize getenv_f before relocation to allow for larger buffer

Wolfgang Denk wd at denx.de
Sat Oct 23 22:11:13 CEST 2010


Dear Kumar Gala,

In message <1287735493-2100-1-git-send-email-galak at kernel.crashing.org> you wrote:
> Since we use hwconfig in cases before relocation (like getting DDR
> params on FSL PPC systems), we can have strings that exceed the early
> small (32 byte) buffer size that getenv will handle.
> 
> So we explicitly allocate our own buffer on the stack and use if to
> handle getting the hwconfig env string.  We currently utilize a string
> length of 128 bytes.
> 
> This allows us to get rid of boot messages like:
> 
> env_buf too small [32]
> 
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> ---
> * Fix typo in commit
> * restore DECLARE_GLOBAL_DATA_PTR - we use it for gd->flags
> 
>  common/hwconfig.c |   21 ++++++++++++++++++++-
>  1 files changed, 20 insertions(+), 1 deletions(-)

Applied, thanks.

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
I thought my people would grow tired of killing. But you were  right,
they  see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
	-- Apella, "A Private Little War", stardate 4211.8


More information about the U-Boot mailing list