From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] (imp) uboot image size
Date: Wed, 14 Jul 2010 21:43:23 +0200 [thread overview]
Message-ID: <4C3E135B.7040403@free.fr> (raw)
In-Reply-To: <AANLkTikU-szcraLAd6kmsYneZWPQH2uQnFmFcTyyugZl@mail.gmail.com>
Le 14/07/2010 21:25, Sagar Heroorkar a ?crit :
> I changed the TEXT_BASE to implement the uboot redundancy. I got in to
> problem of having image size.
> See this:
> I am planning to implement uboot redundancy.
> This means having the following idea which we thought.
>
> Golden-Uboot which is flashed in the NOR-FLASH. This is not field
> upgradable.
> This golden uboot is going to have logic to pick the other uboot based
> on certain flags or env vriables
>
> As i mentioned i wanted the uboot to be redundant.
> So i will have 2 copies of uboot now.
> Uboot1
> Uboot2
>
> Golden uboot will pick either of one uboots mentioned above. If the
> uboot1 which is picked fails to boot, then we will have uboot2 as back
> up to boot. vice versa.
>
> Golden uboot recides in the address fffa0000 (start.s).
> There is a relocation code which copies the code from flash to ram. if
> the uboot which i have picked addressess will change , hence how can i
> do the relocation?
>
> Any pointers will help me if any one already did this kind of approach
> making uboot redundant.
I see several issues in your overall plan, the main one of which being,
once you've chosen from uboot1 or uboot2 and given control to it, it can
fail in many irrecoverable ways, so you won't be able to detect it
failed. But let's assume your failure scenarios handle this (or discuss
it in another thread).
The way your system is designed, as I understand it, you don't need to
touch TEXT_BASE at all:
1) your golden u-boot does not need TEXT_BASE as it will execute from
Flash only (it is basically made of the beginning of the current low
level init code of u-boot plus whatever is needed to read the data
necessary to decide which u-boot to jump to;
2) each of your uboot1/uboot2 can relocate to the current TEXT_BASE in
RAM (basically the only change would be removing the beginning of the
low-level init code which is already done by the "golden" bootloader).
Even if your "golden", uboot1 and uboot2 bootloaders are all full-blown
u-boots, you still don't need to change their TEXT_BASE: just make sur
uboot{1,2} have CONFIG_SKIP_LOWLEVEL_INIT defined, and that "golden"
either go'es to their Flash entry point or copies them from Flash to
somewhere free in RAM then go'es there: in any case, they will relocate
themselves over "golden" -- this overloading works, I use it routinely
on my ED Mini V2.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-07-14 19:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 18:38 [U-Boot] (imp) uboot image size Sagar Heroorkar
2010-07-13 18:46 ` Albert ARIBAUD
2010-07-14 6:10 ` Wolfgang Denk
2010-07-14 19:10 ` Sagar Heroorkar
[not found] ` <4C3E0E3D.7060305@free.fr>
2010-07-14 19:25 ` Sagar Heroorkar
2010-07-14 19:43 ` Albert ARIBAUD [this message]
2010-07-14 20:53 ` Wolfgang Denk
[not found] ` <4C3E2808.5040509@free.fr>
[not found] ` <20100714214943.4BFB6160691@gemini.denx.de>
2010-07-14 22:35 ` Albert ARIBAUD
2010-07-14 22:37 ` Albert ARIBAUD
2010-07-15 14:38 ` Sagar Heroorkar
2010-07-14 20:37 ` Wolfgang Denk
2010-07-14 20:29 ` Wolfgang Denk
2010-07-14 20:40 ` Albert ARIBAUD
2010-07-14 20:59 ` Wolfgang Denk
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=4C3E135B.7040403@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