I've been using Ubuntu (because of ease of install / familiarity with Debian) as my test platform for rapid booting. Ubuntu is remarkably slow at booting -- It's made to work with just about any hardware. Can anyone recommend any distributions that are more geared towards the embedded rapid-boot? Essentially, I'd like to have a user-space program that's doing I/O via serial / usb to do data logging as quickly as possible, and everything else (display, mounting a mechanical hard drive) can wait. Essentially, steps 1-3 have to be as fast as possible.
1) LB + Filo -- Load Kernel from CF 2) Kernel init (I have this down to 0.9 seconds) 3) User space program that loads USB drivers and begins data logging 4) Everything else: network, display (X.org), hard drive mount etc
I need a distro that lets you do most of the usual startup stuff later.
---
Here's a list of kernel options that I'm using -- anybody have any other "tricks" to speed this up?
root=/dev/hda1 console=ttyS0,115200 [I know this slows it down] console=tty0 [This might be a major time waster, also -- I suspect the kernel VGA init is slow] lpj=2136847 dhash_entries=16000 [I'm not sure if making the Dentry hash is slow, or if the VGA init routine just before it is the culprit] ide0=0x1f0,0x3f6,14 ide0=noprobe ide1=noprobe ide2=noprobe ide3=noprobe ide4=noprobe ide5=noprobe hda=65535,16,63 hdb=none hdc=noprobe [This is the CF -- don't need it after boot] hdd=none no_hlt
Also, If I do hda=noprobe, I guess the kernel won't mount it, so it fails. Seems like the kernel *must* probe the hd? I thought as long as it has the CHS, it didn't need to probe.
that's doing I/O via serial / usb to do data logging as quickly as possible, and everything else (display, mounting a mechanical hard drive) can wait. Essentially, steps 1-3 have to be as fast as possible.
What about building everything as modules and boot with an initrd that just has your user app static linked on it and the ide + fs modules?
You can boot get your app up and going first and then go do the probe/mount ide and then pivot_root once you get it all setup.
Also, If I do hda=noprobe, I guess the kernel won't mount it, so it fails. Seems like the kernel *must* probe the hd? I thought as long as it has the CHS, it didn't need to probe.
It needs to know lots of other stuff, ATA mode, etc.
-- Richard A. Smith
On Fri, May 05, 2006 at 09:33:36AM -0700, Eric Poulsen wrote:
Can anyone recommend any distributions that are more geared towards the embedded rapid-boot?
Besides rolling your own bare-minimum distribution perhaps GNAP would fit:
http://www.gentoo.org/proj/en/base/embedded/gnap.xml
(Gentoo Network Appliance)
The system footprint seems to be around 15MB, don't know about boot times.
For my soekris boxes (which btw are Geode SC1100s just begging for LinuxBIOS, they have serial, ethernet(s!), various expansion possibilities, no VGA, no sound and a proprietary BIOS :) I used the Gentoo catalyst tool to make a stage4 glibc-based system in about 38MB (including quite a lot of tools) but beware that it's a bit messy since you have to list all files from packages that you don't want in the end result (man pages, other docs, development stuff etc) - on the other hand you can create local packages in the portage overlay directory to customize the system and boot process completely. I haven't optimized for speed at all so boot takes about 80 seconds. Maybe ten seconds from power on until init exec, so there's a lot of room for improvement.
Some Gentooers frown upon making a stage4 for an embedded system but I found that doing so simply allows me more choice than GNAP would.
//Peter