public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/26] ARM: add relocation support
Date: Thu, 16 Sep 2010 09:06:42 +0200	[thread overview]
Message-ID: <20100916070642.DA3CA15242D@gemini.denx.de> (raw)
In-Reply-To: <20100916062347.GA25290@morgana.i.gnudd.com>

Dear Alessandro Rubini,

In message <20100916062347.GA25290@morgana.i.gnudd.com> you wrote:
> 
> One of the things I love(d) with u-boot (at least the ARM one) is that
> I could place it in flash at any address and it would just work.  So
> when I have a new binary I first write it to another flash sector and
> "go" to it.  Only if it works I flash at offset 0.  Sure I test in RAM

This may, or may not work. In general you have to be lucky if it does
work.  Many processors have steps in their initialization sequence
which cannot be repeated easily, at least not without a reset.

> first, but since writing the ram image to flash is not uncommon, the
> final test for me has always been in flash -- also for other reasons.

Even if it works, this is not, and cannot be, any guarantee that the
image would run when started out of reset. On contrary, on many
processors you will have to modify the code so that it can be started
on an already running system.

> Is there any chance we could go on testing on a different flash
> address without relinking in-between (with the risk of mismatching the
> two images?)

I don't understand why you think this could (or should) be working? 

We have a static configuration with CONFIG_SKIP_LOWLEVEL_INIT (and
CONFIG_SKIP_RELOCATE_UBOOT); if CONFIG_SKIP_LOWLEVEL_INIT is not set,
starting another U-Boot instance with "go" would repeat the whole
low-level initialization which _will_ break on many systems.


I agree that it would be nice to have U-Boot completely position-
independent and completelky restartable, but this would be a new
feature, which newer existed before.

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
"'Tis true, 'tis pity, and pity 'tis 'tis true."
    - Poloniouius, in Willie the Shake's _Hamlet, Prince of Darkness_

  reply	other threads:[~2010-09-16  7:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 18:16 [U-Boot] [PATCH 12/26] ARM: add relocation support Heiko Schocher
2010-09-15 21:06 ` Albert ARIBAUD
2010-09-16  5:09   ` Heiko Schocher
2010-09-16  6:23     ` Alessandro Rubini
2010-09-16  7:06       ` Wolfgang Denk [this message]
2010-09-16  7:18         ` Graeme Russ
2010-09-16  8:23           ` Wolfgang Denk
2010-09-16  9:54             ` Graeme Russ
2010-09-16 10:18               ` Wolfgang Wegner
2010-09-16 10:49                 ` Albert ARIBAUD
2010-09-16 11:06                 ` Wolfgang Denk
2010-09-16 11:24                   ` Wolfgang Wegner
2010-09-16 10:50     ` Albert ARIBAUD
2010-09-16 11:29       ` Wolfgang Denk
2010-09-16 20:20         ` Albert ARIBAUD
2010-09-16 21:26           ` Wolfgang Denk
2010-09-17  6:16             ` Albert ARIBAUD
2010-09-17 11:05               ` Wolfgang Denk
2010-09-17 12:58                 ` Albert ARIBAUD
2010-09-17 14:52                   ` Wolfgang Denk
2010-09-17 16:39                     ` Albert ARIBAUD
2010-09-17 19:04                       ` Wolfgang Denk
2010-09-17 22:19                         ` Albert ARIBAUD
2010-09-17 22:42                           ` Wolfgang Denk
2010-09-17 23:25                             ` 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=20100916070642.DA3CA15242D@gemini.denx.de \
    --to=wd@denx.de \
    --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