From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Harvey Date: Mon, 13 Jun 2011 09:12:39 -0500 Subject: [U-Boot] newbie questions regarding some config options. In-Reply-To: References: <4DF617BC.4040009@arcor.de> Message-ID: <900370e88f15c7517c5e2bb29f0a1408@basementcode.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 Mon, 13 Jun 2011 15:08:35 +0100, PHIL.EDWORTHY at renesas.com wrote: > Hi Matthias, > >> >> What is the CONFIG_SYS_TEXT_BASE variable and how can >> >> I figure out what it should be? >> > >> > U-boot is typically stored in flash and one of the first things it >> does when executed is relocate to ram. CONFIG_SYS_TEXT_BASE is >> > the relocation >> > address. Typically, u-boot global data, heap and then stack is >> stored just below this. >> >> On ARM, CONFIG_SYS_TEXT_BASE is typically the base address of the >> image >> in flash. This is, on a system booting from NOR, the address of the >> first instruction which is fetched from the CPU. >> >> > Since u-boot is used to load some other program like the kernel, >> you need the u-boot relocation address to be out of the way of this. >> So, for the >> > boards I have seen (not arm), CONFIG_SYS_TEXT_BASE is set to the >> top of ram - 256KB, i.e. enough room for the u-boot image. >> >> The relocation address is dynamically calculated from a couple of >> (runtime) information and has nothing to do with >> CONFIG_SYS_TEXT_BASE. >> This is true for ARM and AFAIK for PPC. > > Thanks for the additional info - SH is a little different then! > > Phil Thanks for the information. Since CONFIG_SYS_TEXT_BASE seems to be a critical value and isn't something that can be ignored, maybe it deserves an entry in the already helpful README. I'd write it myself but I'm not qualified. -Chris