From: Wolfgang Denk Date: Sat, 23 Oct 2010 22:11:13 +0200 Subject: [U-Boot] [PATCH v3] hwconfig: Utilize getenv_f before relocation to allow for larger buffer In-Reply-To: <1287735493-2100-1-git-send-email-galak@kernel.crashing.org> References: <1287731287-19240-1-git-send-email-galak@kernel.crashing.org> <1287735493-2100-1-git-send-email-galak@kernel.crashing.org> Message-ID: <20101023201113.12EF4135853@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Kumar Gala, In message <1287735493-2100-1-git-send-email-galak@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 > --- > * 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