From: Rob Landley <rob@landley.net>
To: Matt Hsu <matt@0xlab.org>
Cc: celinux-dev@tree.celinuxforum.org,
linux-embedded@vger.kernel.org, Andy Green <andy@warmcat.com>
Subject: Re: [Celinux-dev] CELF Project Proposal- Refactoring Qi, lightweight bootloader
Date: Mon, 21 Dec 2009 02:00:09 -0600 [thread overview]
Message-ID: <200912210200.10047.rob@landley.net> (raw)
In-Reply-To: <4B2F0CDB.3050305@0xlab.org>
On Sunday 20 December 2009 23:51:23 Matt Hsu wrote:
> Rob Landley wrote:
> > However, if that's your minimum then you can't use the bootloader to
> > re-flash the device, which is kind of handy. (It gives you an
> > un-bricking fallback short of pulling out a jtag.)
>
> Hi Rob,
>
> Well, Boot from SD is your good friend.
Ok, not aiming to be a generic bootloader then. You're only trying to support
hardware that has the flash equivalent of a floppy drive. Got it.
> If you look at the platform that Qi which is supported, most of them
> all have this feature.
Because if they didn't you wouldn't support them? Bit of a selection bias
there...
Life is a bit easier if you can stick a USB port on your device and boot from
a USB stick or cdrom. Most of the SoCs coming down the pipe support USB too,
but your wiki doesn't seem to consider this an interesting case...
> If you notice the trend of SoC, booting from peripherals becomes a
> must.
Depends how cheap you want your hardware to be, and whether you can afford
separate development and deployment boards.
Software development is a bit easier when you can spec adding a extra few
dollars worth of hardware to your device rather than redoing its software. I
tend to deal with people who repurpose existing cheap plastic crap already
being knocked out in huge quantities somewhere in china. (Their hardware
contribution _might_ be a different plastic case for the thing.) I've also
dealt with highly integrated little suckers that haven't got _space_ for an sd
card. Since I one day dream of following Moore's Law down to "disposable
computing", I'm reluctant to discard these cases as uninteresting.
> Once you step into kernel via Qi, kernel provides you everything
> such as mtd utils to re-flash device.
> We don't need to support programming the device in the bootloader
> anymore.
Depending on the kernel to reflash the device means that if you reflash the
device with a kernel that doesn't work, what you have is a brick. There's
lots and lots of reasons for a kernel not to work, and a 2.6 kernel kernel
takes up around a megabyte on a device that may only have 2 or 4 megs of ram
so keeping an old one around at all times isn't feasible. So without some
kind of fallback (such as a little ~32k bootloader at the start of flash that
you never overwrite, in its own little erase block), every time you install a
new kernel you risk bricking the device. (If you only care about devices that
have 2 gigs of flash, life is much easier.)
> Don't reinvent the wheel.
There are how many existing bootloaders out there already?
> > Looking at the screen shot there, you've got code to parse ext2
> > filesystems. What is your definition of "minimal"?
>
> Enough to boot into Linux.
You need to parse an ext2 filesystem to boot into linux? (I'm not saying it's
a _bad_ thing, I'm just not seeing how it's "minimal".)
> > Rationale for not providing a boot menu is you don't want to mess with
> > video init.
>
> Nope, the centric idea of Qi, is let kernel deal with everything it
> could handle.
So the fact the kernel can provide a serial console means you shouldn't?
> The video init should be handled by kernel stead of bootloader.
Oh agreed. What that has to do with a command line interpreter on the serial
console was my question.
Personally, i'm used to embedded devices being headless. (I tend to consider
the iPhone the next stage in the mainframe->micro->mini evolution and it'll
soon be "just another PC" target when they get the ergonomics worked out.
Heck, give those suckers a USB port and you could give 'em a big keyboard and
display today, and they could even charge themselves through the thing. Way
more powerful than my first 386 PC. Actually about as powerful as the laptop I
had circa 2002 or 2003.)
> The following clip demonstrate the advantage of Qi bootloader:
>
> http://www.youtube.com/watch?v=ol9LWBKXXwQ&feature=related
>
> - Faster booting time
I.E. you enable the cpu cache during kernel decompression.
I believe the u-boot guy just posted that as a todo item, and that falls on
the coreboot side of bootloading, which really should be broken out into its
own little project someday...
The other delay in something like u-boot is it pausing to see if it gets an
"esc" or similar from the serial console, so it can be interrupted and provide
a prompt. That's a configurable delay which can be removed if it really bugs
you.
> - Get rid of flash on display device when stepping into kernel
>
> Hope these could clear your doubt.
Your proposal confused me when it said things like "improve portability" and
"make people spend less time on bootloader development", so I thought you were
aiming at something more generic. But this bootloader is not intended to ever
apply to something like a hammer board, or any existing linksys-class router,
most current cell phones, devices like handheld game consoles where the sd
card stores data but not the operating system (due to the thing still needing
to work when you swap sd cards)...
My mistake. You're creating a bootloader specifically tailored to booting from
sd cards. Might want to make that clear on the web page.
> Cheers,
> Matt
Rob
--
Latency is more important than throughput. It's that simple. - Linus Torvalds
next prev parent reply other threads:[~2009-12-21 8:00 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
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 [this message]
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=200912210200.10047.rob@landley.net \
--to=rob@landley.net \
--cc=andy@warmcat.com \
--cc=celinux-dev@tree.celinuxforum.org \
--cc=linux-embedded@vger.kernel.org \
--cc=matt@0xlab.org \
/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).