[U-Boot] [PATCH] NAND: cmd_nand.c: fix invalid pointers to static relocated chip names

Wolfgang Denk wd at denx.de
Mon Jan 19 14:29:40 CET 2009


Dear Valeriy Glushkov,

In message <12323711841178-git-send-email-gvv at lstec.com> you wrote:
> When U-boot starting from NAND the pointers to chip names are set before relocation.
> If the original memory block is overwritten after relocation that led to invalid
> string data in the nand utility.

This means that the pointers need to be manually relocated.

> -				       i, nand_info[i].name,
> +				       i, nand_info[i].name + gd->reloc_off,

Such relocation shouldbe done exactly once, right after relocation.

Doing this everywhere where the pointers are references is error
prone, ugly and wastes memory.

Please change your patch to fix the pointers. 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
"We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
                - Larry Wall in  <1991Nov13.194420.28091 at netlabs.com>


More information about the U-Boot mailing list