From: Andy Green <andy@warmcat.com>
To: Wolfgang Denk <wd@denx.de>
Cc: Matt Hsu <matt@0xlab.org>,
linux-embedded@vger.kernel.org,
celinux-dev@tree.celinuxforum.org
Subject: Re: [Celinux-dev] CELF Project Proposal- Refactoring Qi, lightweight bootloader
Date: Mon, 21 Dec 2009 22:38:31 +0000 [thread overview]
Message-ID: <4B2FF8E7.505@warmcat.com> (raw)
In-Reply-To: <20091221213829.1A8B93F6EF@gemini.denx.de>
On 12/21/09 21:38, Somebody in the thread at some point said:
Hi -
>> I was talking about GTA02 specifically here, it was (and still is AFAIK)
>> only updateable by DFU for the bootloader. We had kernels with soft ECC
>> that differed from the ECC / bad block marking generated and used by the
>> s3c2442 NAND hardware unit. If U-Boot wrote it, it could at least read
>> it again. So DFU was / is the only official way to update GTA02 bootloader.
>
> This only means that the ports of U-Boot and Linux to that hardware
> were inconsistent, which means that at least one of them can be
Actually the problem of synchronizing the ECC and BBT rules between
bootloader and Linux is a generic one where raw NAND is involved. Soft
ECC and Hard ECC on a particular chip may differ and the kernel decides
what policy it has there. It's a "raw NAND" issue not a U-Boot one but
if anyone shipped a kernel one way and wanted to change it, they have to
take care about matching the bootloader's view of the NAND in great
detail if they want interoperation between Linux and the bootloader.
> considered broken. [And I'm tempted to add that this might eventually
> be a consequence of the fact that all this work was done without ever
> getting in touch with the U-Boot community. Likewise, no code or
> fixes have been contributed back into mainline.]
Well, this is getting a bit off-topic for considering the merits of Qi.
Openmoko started to use U-Boot on GTA01 long before my time, likewise
the soft ECC was "like that when I got there".
About tapping into the wisdom of the U-Boot community, most of their
changes were GTAxx-specific. For example I don't know any other Linux
device than GTA02 with a Glamo in it, there is a lot of code I ported
from Linux for that bloating their tree. With closed docs, that would
be completely useless for upstream.
Bearing in mind they could only update by DFU and with GTA01, there was
no bootloader recovery mechanism if it failed, keeping their bootloader
tree inhouse was an established tradition by the time I got there.
For all those reasons the best way we found was deprecate their U-Boot
tree and learn from what we had found there. (A fair amount of Qi is
cut out of U-Boot so I see the great work it has done as well as the
problems: respect for your work.)
> I think it's unfair to blame U-Boot for a poor on incorrect
> implementation of the NAND driver on this specific hardware.
Yeah it would be unfair to solely blame U-Boot for the sins of GTA02.
But it's fair to blame U-Boot with the sins of U-Boot.
The main lessons I took from that was the dollar and time value of
removing the "unnecessary features" in U-Boot and especially the
Openmoko tree of it:
- video drivers
- shells
- environments
- special update mechanisms
- raw NAND at all
- duplicating the OS in there
- private nonvolatile state
- PMU management when we are already able to run
- per board variant bootloader image (ie, GTA02 v3 can only run a
special GTA02 v3 binary of U-Boot that can't run on anything else; Qi
has a per CPU binary that supports all variants)
After understanding that all those are needless and actively wasteful in
developer resource, support, and device time the reasoning led to the
development of Qi in its current form.
-Andy
next prev parent reply other threads:[~2009-12-21 22:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 8:31 CELF Project Proposal- Refactoring Qi, lightweight bootloader Matt Hsu
2009-12-17 9:21 ` Andy Green
2009-12-21 19:30 ` [Celinux-dev] " Wolfgang Denk
2009-12-21 19:32 ` Mike Frysinger
2009-12-21 20:17 ` Andy Green
2009-12-21 21:38 ` Wolfgang Denk
2009-12-21 22:38 ` Andy Green [this message]
2009-12-21 23:17 ` Wookey
2009-12-21 23:19 ` Robert Schwebel
2009-12-22 8:22 ` Andy Green
2009-12-22 11:12 ` Robert Schwebel
2009-12-22 22:23 ` Andy Green
2009-12-22 23:28 ` Robert Schwebel
2009-12-23 8:38 ` Andy Green
2009-12-23 8:56 ` Robert Schwebel
2009-12-23 9:29 ` Andy Green
2009-12-23 9:43 ` Robert Schwebel
2009-12-27 7:27 ` Rob Landley
2009-12-27 10:09 ` Andy Green
2009-12-28 0:21 ` Rob Landley
2009-12-28 11:33 ` Andy Green
2009-12-27 7:17 ` Rob Landley
2009-12-27 9:54 ` Andy Green
2009-12-27 23:15 ` Rob Landley
2009-12-28 10:27 ` Andy Green
2009-12-28 19:57 ` Peter Korsgaard
2009-12-28 20:20 ` Andy Green
2009-12-29 4:25 ` Rob Landley
2009-12-29 11:11 ` Andy Green
2009-12-17 23:13 ` Tim Bird
2009-12-21 2:45 ` [Celinux-dev] " Rob Landley
2009-12-21 5:51 ` Matt Hsu
2009-12-21 8:00 ` Rob Landley
2009-12-21 9:54 ` Andy Green
2009-12-21 20:49 ` Wookey
2009-12-23 2:28 ` Jamie Lokier
2009-12-23 8:48 ` Andy Green
2009-12-29 13:13 ` Jamie Lokier
2009-12-29 13:36 ` Andy Green
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=4B2FF8E7.505@warmcat.com \
--to=andy@warmcat.com \
--cc=celinux-dev@tree.celinuxforum.org \
--cc=linux-embedded@vger.kernel.org \
--cc=matt@0xlab.org \
--cc=wd@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;
as well as URLs for NNTP newsgroup(s).