Reducing OS Boot Times for In-Car Computer Applications, Part III
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.
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.
|PostgreSQL, the NoSQL Database||Jan 29, 2015|
|HPC Cluster Grant Accepting Applications!||Jan 28, 2015|
|Sharing Admin Privileges for Many Hosts Securely||Jan 28, 2015|
|Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform||Jan 23, 2015|
|Designing with Linux||Jan 22, 2015|
|Wondershaper—QOS in a Pinch||Jan 21, 2015|
- PostgreSQL, the NoSQL Database
- Sharing Admin Privileges for Many Hosts Securely
- HPC Cluster Grant Accepting Applications!
- Designing with Linux
- Wondershaper—QOS in a Pinch
- January 2015 Issue of Linux Journal: Security
- Internet of Things Blows Away CES, and it May Be Hunting for YOU Next
- Ideal Backups with zbackup
- Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform
- Slow System? iotop Is Your Friend
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane