public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] new uboot with relocation change cannot boot when download the bin file to different address than TEXT_BASE
Date: Sun, 10 Oct 2010 08:48:52 +0200	[thread overview]
Message-ID: <4CB161D4.7030703@free.fr> (raw)
In-Reply-To: <AANLkTi=-Ppr=4eCqT2gkpp8Tb4XrtdWNyuauD-5xzj4w@mail.gmail.com>

Le 10/10/2010 06:33, Lei Wen a ?crit :

> But I am still a little confussed, even for the new scheme, at the end
> of board_init_f, there is a relocate_code, which is
> the exactly as original "simply copied" code.
> What the relocation in new scheme is different with the old simply
> copy, has more feature, or could fix some bug?

Before relocation, for ARM926 we used to put in TEXT_BASE the RAM 
address where we wanted u-boot to end up at once relocated, and the 
first thing we did was initalize RAM, move the code and jump there; so 
we did not really relocate the code, just move it -- no fixups.

The new relocation allows putting u-boot as high in RAM as possible 
without computing this location by hand (which would be tedious for 
fixed-size RAM targets) or impossible (for targets with variable amount 
of RAM). But this meant u-boot might run at different places, which in 
turns meant truly relocating -- with fixups.

In the process, TEXT_BASE for ARM went back to what is should have been 
all along in order to converge with other platforms, i.e. the FLASH, not 
RAM, target address.

The general goal is to be able to have a single binary running on 
several HW variants.

> Thanks,
> Lei

You're welcome.

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-10-10  6:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-09  5:50 [U-Boot] new uboot with relocation change cannot boot when download the bin file to different address than TEXT_BASE Lei Wen
2010-10-09  6:27 ` Graeme Russ
2010-10-09  6:48   ` Lei Wen
2010-10-09 17:50     ` Wolfgang Denk
2010-10-10  4:33       ` Lei Wen
2010-10-10  6:48         ` Albert ARIBAUD [this message]
2010-10-10  6:50         ` Wolfgang Denk
2010-10-10  9:00           ` Lei Wen
2010-10-09  7:43 ` Albert ARIBAUD
2010-10-09  7:53   ` Lei Wen
2010-10-09  8:10     ` Albert ARIBAUD
2010-10-09  8:18       ` Albert ARIBAUD
2010-10-09  8:24       ` Lei Wen
2010-10-09  8:57         ` Albert ARIBAUD
2010-10-09  9:08           ` Lei Wen
2010-10-09  9:23             ` Albert ARIBAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CB161D4.7030703@free.fr \
    --to=albert.aribaud@free.fr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox