From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Thompson Date: Wed, 22 Sep 2010 16:15:58 +0100 Subject: [U-Boot] [PATCH] [NEXT] da830: fixup ARM relocation support In-Reply-To: References: <4C9A01C8.30205@ge.com> <4C9A0F6D.5040509@ge.com> Message-ID: <4C9A1DAE.5000002@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 22/09/10 16:07, Ben Gardiner wrote: > On Wed, Sep 22, 2010 at 10:15 AM, Nick Thompson wrote: >> On 22/09/10 14:43, Ben Gardiner wrote: >>> What about removing "#define CONFIG_SKIP_RELOCATE_UBOOT" as in commit >>> ab86f72c354f9b2572340f72b74ca0a258c451bd ? >> >> Hmmm. It wouldn't hurt I guess. The UBL copies the code to the correct >> address though doesn't it? The copy is not executed and so the code is >> redundant - or did I miss something? > > Yeah, good point. UBL does copy the code to the correct address -- but > I also remember that I needed to remove that define in my testing of > Heiko's patches on the da850. > > I'll get around to testing -next again soon and I'll try with > CONFIG_SKIP_RELOCATE_UBOOT defined. No, don't do that. I just did some testing myself. The relocation address is calculated at run time and includes the size of u-boot itself. I got away with it once in my debugger (I was trying to dodge the extra copy), but it broke once I added more code. You would have to change the UBL on more or less every build of u-boot to skip the copy, which is clearly impractical. I have removed CONFIG_SKIP_RELOCATE_UBOOT as you suggested and now everything takes care of itself. I've already sent a v2 patch. Thanks for pointing me in the right direction. Nick.