From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] utilize flash small block sizes to reduce flash footprint
Date: Mon, 27 Sep 2010 19:02:43 +0200 [thread overview]
Message-ID: <4CA0CE33.5000202@free.fr> (raw)
In-Reply-To: <1285604185.25002.71.camel@ws-apr.office.loc>
Le 27/09/2010 18:16, Andreas Pretzsch a ?crit :
> Dear Albert,
>
> first, thanks for reading through my RFC. I agree that there are a
> couple of simplifications in there, e.g. reset vectors. Written after
> about 12 hours of hacking...
:)
> I see you're struggling with a comparable, yet a bit more complicated
> issue. I have to admit that I only skimmed over the threads, but it
> looks to me that most of it could be done also with linkers help.
As I said, linker file tweaking can provide a non-perfectly-optimal
solution (as you can hardly perfectly fill the sector which contains
_start), for one specific system, i.e. one SoC model with one FLASH
model, and a given configuration (i.e. set of object files to link
together), but if you change either, or you change the configuration,
there is a risk, however small, that the manual mapping become even more
non-optimal by creating more unused space (one can live with that) or
infeasible by overfilling the sector (and that is more problematic).
OTOH, the patch I'm envisioning would have the advantage of optimally
filling all sectors used for code and data (except one obviously),
working out-of-the-box over a large set of (ARM[926]) systems and
configurations -- the location and size of the two .bin parts would be
the only thing to adapt for each board, once and for all as long as the
type of FLASH remains unchanged.
(I realize there is also a marginal advantage to the patch: as I said,
it requires separating the code and data that is needed when running
from FLASH from the one that is needed only when running from RAM. This
could be further improved to copy from FLASH to RAM only what is needed
for running from RAM. When u-boot is used to launch OSes, it won't make
a difference ; when it launches standalone apps, that's a bit more RAM
available to the apps. Not much, mind.)
> Personally, I'm fine with a tuned linker file. Preparations are already
> there in U-Boot and the real life block allocation is pretty static,
> too. So following the KISS principle, I'd go with that approach.
I understand perfectly -- I'm all for everyone choosing the solution
they see fit. :)
> For the specific case of mixed-sector-size flashes with linear
> allocation (which is all the RFC was about in the first place), Wolfgang
> pointed to embedded environment resp. linker adaption. Which solves the
> issue perfectly. Therefore I see "my" case as closed and the RFC as
> redundant.
>
> As time permits, I'll have a look at your points again later. But
> honestly, the stack on my desk piles up a bit too much right now...
> Sorry.
No problems. I'll post a patch anyway; reading your RFC simply made me
aware that the patch should be more generic than it is right now, so as
to cover your needs as I understand them. :)
> Best regards,
> Andreas
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-09-27 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 5:15 [U-Boot] [RFC] utilize flash small block sizes to reduce flash footprint Andreas Pretzsch
2010-09-27 6:37 ` Albert ARIBAUD
2010-09-27 6:49 ` Albert ARIBAUD
2010-09-27 16:16 ` Andreas Pretzsch
2010-09-27 17:02 ` Albert ARIBAUD [this message]
2010-09-27 8:59 ` Wolfgang Denk
2010-09-27 14:29 ` Andreas Pretzsch
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=4CA0CE33.5000202@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