Reducing OS Boot Times for In-Car Computer Applications, Part III

The final installment in this series--did they meet their goal of a five-second boot?
Next--Build a Kernel

The Epia patches include one called epia-fbdev, which leads to this encouragement from the LinuxBIOS mailing list:

El Jueves, 13 de Mayo de 2004 18:46, John Laur escribi?:
> If you have VGA correctly working with LinuxBIOS (Ie you see the
> linuxbios logo on startup), then you have VGA working as best it does
> with LinuxBIOS.
> Then you can worry about the kernel. VESA Framebuffer does not work with
> EPIA-M as the VGA bios doesn't initialize the video card up to where
> vesafb can take over. You have to use viafb (part of the -epia patchset)
> to get video on the console. Make sure you have it compiled into the
> kernel and not as a module. Make sure vesafb is NOT compiled in either,
> otherwise you'll need some commandline trickery to make it work. Also,
> viafb doesn't work with bootsplash in silent mode on kernel 2.4 if you
> are using that. I have not tested with kernel 2.6.
> John

However, all the flavors of epia-fbdev I tried hung the machine or produced scrambled text.

Anyway, one should build a kernel in the normal way. I unpacked the kernel, configured it and issue

make dep && make bzImage
&& make modules

Then, to install the modules somewhere so I could copy them to the Flash, I entered:

INSTALL_MOD_PATH=/home2/jamesh/linux-fast/ make modules_install

That command created /home2/jamesh/linux-fast/lib/modules/2.4.26-fast/. Next, make an elf image out of the kernel. This lets you put the command-line arguments in the kernel file itself and allows the bootloader to determine how big the kernel is:

/usr/local/sbin/mkelfImage --kernel=linux-2.4.26-fast/arch/i386/boot/bzImage 
    --output=bzImage-2.4.26-fast.elf --command-line="root=/dev/hda4 console=tty0 console=ttyS0,115200n8 rw"

Note that I set root=/dev/hda4. I also set the FILO like so:

AUTOBOOT_FILE = "hda4:/bzImage"

Now, I only needed to put the kernel in /dev/hda4 in the root directory--easy. Next, copy the romimage and flash_and_burn files to your Epia box and run flash_and_burn by itself to see if it recognizes your Flash chip. Typing flash_and_burn romimage burns it.

Now, hook a terminal up to the serial port, set to 115200-n-8-1, and boot. In 20 seconds you should hear Dexter, assuming you are using my ZipSlack image. As you can see, X works but the mouse does not--I don't know why. Type startx to start X.

I've created two disk images. One is UMSDOS, which I unzip into a MS-DOS filesystem on partition 4 of a disk. The other is a tar file that should work on an ext2 or ext3 filesystem.

Boot Time Results

The full log of our successful boot with fine-grained timings is here, and the following guided tour takes you through the highlights.

I wrote a program to dump the console out from the serial port with a timestamp. Here are some interesting things to note:

  • It takes .334 seconds to get from power-on to the BIOS.

    > 3.492 Copying LinuxBIOS to ram.
  • Three and a half seconds, and now it's copying the BIOS to shadow. I assume that time was spent finding shadow itself.

    > 6.292 Jumping to LinuxBIOS.
  • Here's a major timewaster: reading from the Flash BIOS chip is slow.

    > 6.616 POST: 0x75
    > ...
    > 7.076 POST: 0x95
  • I have no idea what this really means.

    > 7.153 found VGA: vid=1106, did=3122
    > ...
    > 9.533 biosint: Unsupport int #0xcd
  • This attempts to run the video BIOS I installed. 2.38 seconds can be saved by removing the dir src/bioscall line in epia-config in the FreeBIOS build directory. The only build I have at the moment that skips this step also doesn't send anything to the serial port, so I don't have a log of it.

    > 9.574 Welcome to elfboot, the open sourced starter.
  • We're not out of LinuxBIOS yet.

    > 9.722 FILO version 0.4.2 
  • We've finally moved out of LinuxBIOS and into the FILO bootloader.

    > 9.792 No sound device found
  • Yes, that message is in FILO. If you have a sound device that FILO recognizes, it would play a sound at this point. However, I couldn't get it to find the the VIA sound device, not that I tried very hard. But if you were using a mobo with a standalone video card and SB-compatible sound, we would have picture and sound at just under ten seconds.

    > 10.013 Loading Linux version ...
    > 12.242 Jumping to entry point...
  • Hmm, over two seconds to get the kernel off the Flash and into RAM.

    > 13.252 Linux version 2.4.26-fast
  • This is the actual start of the Linux boot.

    > 19.811 Playing Sound

At this point sound is playing out the soundcard--19.811 seconds, or 17.431 if you skip the video BIOS call. Of this, only 6.559 seconds actually is booting Linux.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

LinuxBIOS on EPIA V8000

Bryan Rittmeyer's picture

Here are some aditional notes for LinuxBIOS on the older EPIA V8000:

- Use LinuxBIOSv1. LinuxBIOSv2 is still pre-alpha.

- You can in theory use many different PLCC32 flash ICs. I am using
an AT49F040A-55JI (512kB) from DigiKey ($1.68 qty 1) in place of the
SST39F020A (256kB) VIA installed. The AT49F040A required some minor
hacking inside flash_and_burn/

- If you do use a 512kB flash device, set PAYLOAD_SIZE to 458752,
VGABIOS_START to 0xfff80000, and ZKERNEL_START to 0xfff90000.

- You MUST edit src/northbridge/via/vt8601/ to configure
the DRAM (specifically "DIMM_PC133" and "DIMM_CL2"). If these
options are incorrect, LinuxBIOS will freeze immediately after the
initial banner.

- hints that you must set the FSB jumpers to 133 MHz.
Fortunately that is not the case. The V8000 runs LinuxBIOS fine at
66MHz (which reduces heat output enough to safely disconnect the CPU

- See HOWTO/EPIA for VGA BIOS support on the V8000. The extraction
procedure differs from the newer EPIA-M.

- You will probably need "ideN=noprobe" on the Linux kernel command
line to prevent IDE probe delays.

- If you need the parallel port, add "parport_init_mode=spp" on the
kernel command line to enable it.

- CONFIG_COMPRESS is responsible for the huge 3+ second delay after
"Copying LinuxBIOS to ram" and before "Jumping to LinuxBIOS". The
decompression is extremely slow, and is unnecessary, as LinuxBIOS
easily fits in the 64KB area without it.

Add "option CONFIG_COMPRESS=0" to the LinuxBIOS config file and
it will disable compression in favor of a fast, plain memory copy.
With this option, LinuxBIOS transfers control to Linux 2-3 seconds
after power on (even at 66MHz FSB with VGA enabled)!


Anonymous's picture

Don't you mean LILO? :P

I'm a computer engineer, and

Anonymous's picture

I'm a computer engineer, and I would strongly advise against hot-swapping BIOS flash chips. It might work, but you risk frying your motherboard sooner or later.

bios flashing device

Anonymous's picture

There's a device called an
"IOSS RD1" that will simplify the flashing of a bios
that allows you to switch bioses without having to pull
chips on a live system.

Might be easier than the process you describe.

I've never tried it so I don't know if it works or not.

search google on "ioss rd1" or look at

linux oracle

joe's picture

if we have Linux, which database between oracle and mysql will work better

Re: Reducing OS Boot Times for In-Car Computer Applications, Par

Anonymous's picture

Something is wrong with your linuxBIOS setup. I'm the maintainer of the Intel 440bx port for LinuxBIOS V1. I've got 2 different 440BX boards with 400Mhz Celerons that get to your 9 second mark in under a second.

Oh and FYI. The proper name of LinuxBIOS is indeed LinuxBIOS. Not FreeBIOS. FreeBIOS is the project that LinuxBIOS came from. The reason its still in CVS as freebios is historcial and that its a real PITA to change the CVS setup.

0.334 LinuxBIOS-1.0.0 Sat Aug 21 14:48:58 PDT 2004 starting...

Here's the first clue something is wrong. The only thing that LB does between reset and this message is enable the RAM. Taking 300mS to turn on your RAM is _WAY_ slow.

3.492 Copying LinuxBIOS to ram.
6.292 Jumping to LinuxBIOS.

2.8 seconds to copy the code into RAM?! Thats crazy. You need to subscribe up to the LinuxBIOS mailing list and post your time stamped serial log there and ask for help to get your settings correct. Something is very hosed.

Richard Smith

CE Linux Forum work in bootup time reduction

tbird20d's picture

You may want to check out the work that has been done by the
CE Linux Forum on bootup time reduction. I presented a paper
at the 2004 Ottawa Linux Symposium, listing some techniques
for bootup time reduction.

These resources are available at: