From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 19 Jan 2009 14:29:40 +0100 Subject: [U-Boot] [PATCH] NAND: cmd_nand.c: fix invalid pointers to static relocated chip names In-Reply-To: <12323711841178-git-send-email-gvv@lstec.com> References: <12323711841178-git-send-email-gvv@lstec.com> Message-ID: <20090119132940.5000D832E425@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 Valeriy Glushkov, In message <12323711841178-git-send-email-gvv@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@netlabs.com>