From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking
Date: Fri, 19 Nov 2010 12:40:05 +0100 [thread overview]
Message-ID: <4CE66215.2030103@free.fr> (raw)
In-Reply-To: <20101119111112.A53E214EA7E@gemini.denx.de>
Le 19/11/2010 12:11, Wolfgang Denk a ?crit :
> Dear Sebastien Carlier,
>
> In message<sebastien.carlier@f67ce90ecc8846695b88fb9ac74f99d56979b90a> you wrote:
>>
>> I am still not getting why the code needs to be split this way, rather
>> than being a continuous segment followed by an environment sector.
>> Whether the environment sector is in the middle of the binary or
>> immediately after the binary does not make a difference (does it?), so
>> the motivation must be something else...
>
> The used flash chips are so-called bootom boot sector types; using two
> chips in 16 bit config in parallel (to get a 32 bit bus) we see this
> flash layout:
>
> Sector Start Addresses:
> 40000000 RO 40008000 RO 4000C000 RO 40010000 RO 40020000 RO
> 40040000 RO 40060000 E 40080000 E 400A0000 E 400C0000 E
> 400E0000 E 40100000 E 40120000 E 40140000 E 40160000 E
> 40180000 E 401A0000 E 401C0000 E 401E0000 E 40200000 E
> 40220000 E 40240000 E 40260000 E 40280000 E 402A0000 E
> 402C0000 E 402E0000 E 40300000 E 40320000 E 40340000 E
> 40360000 E 40380000 E 403A0000 E 403C0000 E 403E0000 E
>
> So erase block sizes are 32 k, 16 k, 16 k, 64 k, 128 k, 128 k, 128 k, ...
>
> With a normal configuration, U-Boot code wouild occupy all the small
> sectors, and we would have to waste two of the 128 kB blocks for
> environment plus redundant copy.
>
> It makes a lot sense to me to reserve a "gap" in the U-Boot image and
> put the environment instead into the two 16 kB sectors starting at
> 40008000 and 4000C000.
>
> The linker script squeezes as many as possible objects into the first
> 32 kB ssector, then creates a gap for the environment, and ten
> continues to place the remaining objects starting at offset 40010000.
>
> That's what we call "embedded environment", because it sits right in
> the middle of the U-Boot image.
There is a variant of this problem with many ARM boards, those based on
Marvell SoCs for instance, which have a start address at 0xFFFF0000 --
that's a 64K block the usage of which we want to maximize.
I had a general solution to this by, in summary, building a linear
u-boot, then splitting the binary when flashing, and have the copy loop
in the startup stitch back the parts. However, this solution did not
work well with relocation, and may not necessarily be applicable to
non-ARM archs. However, now that we have a (mostly) stabilized
relocation mechanism, I'll dig again into this solution.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-11-19 11:40 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 22:04 [U-Boot] [PATCH] Switch from archive libraries to partial linking Sebastien Carlier
2010-11-08 22:10 ` Graeme Russ
2010-11-08 22:34 ` Sebastien Carlier
2010-11-09 6:17 ` Andreas Bießmann
2010-11-09 9:15 ` Andre Schwarz
2010-11-09 17:44 ` [U-Boot] [PATCH v2] " Sebastien Carlier
2010-11-10 8:35 ` Andre Schwarz
2010-11-09 9:48 ` [U-Boot] [PATCH] " Graeme Russ
2010-11-09 11:29 ` Stefano Babic
2010-11-10 6:57 ` Mike Frysinger
2010-11-10 8:01 ` Andreas Bießmann
2010-11-10 8:07 ` [U-Boot] [PATCH v3] " Sebastien Carlier
2010-11-10 8:55 ` Mike Frysinger
2010-11-10 12:24 ` Sebastien Carlier
2010-11-10 21:07 ` Mike Frysinger
2010-11-15 7:51 ` Wolfgang Denk
2010-11-15 8:09 ` Sebastien Carlier
2010-11-15 10:54 ` Wolfgang Denk
2010-11-15 11:33 ` Mike Frysinger
2010-11-15 12:38 ` Mike Frysinger
2010-11-15 12:42 ` Mike Frysinger
2010-11-15 12:52 ` Mike Frysinger
2010-11-15 11:35 ` [U-Boot] [PATCH v4] " Sebastien Carlier
2010-11-15 12:13 ` Sebastien Carlier
2010-11-15 12:39 ` Mike Frysinger
2010-11-16 14:58 ` Detlev Zundel
2010-11-16 16:33 ` Mike Frysinger
2010-11-17 12:30 ` Detlev Zundel
2010-11-17 13:30 ` [U-Boot] [PATCH v3] " Sebastien Carlier
2010-11-17 13:50 ` Wolfgang Denk
2010-11-17 18:06 ` Mike Frysinger
2010-11-17 19:53 ` Sebastien Carlier
2010-11-17 22:19 ` Mike Frysinger
2010-11-18 21:44 ` Wolfgang Denk
2010-11-18 22:08 ` Albert ARIBAUD
2010-11-18 22:33 ` Wolfgang Denk
2010-11-19 6:36 ` Albert ARIBAUD
2010-11-19 8:03 ` Wolfgang Denk
2010-11-20 0:07 ` Mike Frysinger
2010-11-20 8:38 ` Wolfgang Denk
2010-11-20 8:48 ` Albert ARIBAUD
2010-11-20 9:19 ` Mike Frysinger
2010-11-19 8:04 ` Sebastien Carlier
2010-11-19 7:50 ` Sebastien Carlier
2010-11-19 8:08 ` Wolfgang Denk
2010-11-19 8:34 ` Sebastien Carlier
2010-11-19 11:11 ` Wolfgang Denk
2010-11-19 11:40 ` Albert ARIBAUD [this message]
2010-11-19 11:48 ` Wolfgang Denk
2010-11-19 12:11 ` Albert ARIBAUD
2010-11-19 12:33 ` Sebastien Carlier
2010-11-19 12:38 ` Albert ARIBAUD
2010-11-19 13:02 ` Sebastien Carlier
2010-11-19 13:07 ` Reinhard Meyer
2010-11-19 13:33 ` Albert ARIBAUD
2010-11-19 13:40 ` Wolfgang Denk
2010-11-19 12:55 ` Wolfgang Denk
2010-11-19 8:10 ` Mike Frysinger
2010-11-15 19:44 ` Mike Frysinger
2010-11-15 11:44 ` [U-Boot] [PATCH] " Mike Frysinger
2011-01-24 20:54 ` Timur Tabi
2011-01-25 0:03 ` Kumar Gala
2011-01-25 6:36 ` Wolfgang Denk
2011-01-25 8:55 ` Kumar Gala
2011-01-25 16:40 ` Timur Tabi
2011-01-25 17:49 ` Kumar Gala
2011-01-25 18:30 ` Timur Tabi
2011-01-25 19:02 ` Wolfgang Denk
2011-01-25 20:05 ` Scott Wood
2011-01-25 20:19 ` Wolfgang Denk
2011-01-25 20:37 ` Scott Wood
2011-01-25 21:13 ` Wolfgang Denk
2011-01-26 5:22 ` Kumar Gala
2011-01-26 17:26 ` Scott Wood
2011-01-25 18:27 ` Wolfgang Denk
2011-01-25 18:29 ` Timur Tabi
2011-01-25 18:54 ` Wolfgang Denk
2011-01-25 18:57 ` Timur Tabi
2011-01-25 19:05 ` 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=4CE66215.2030103@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