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.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Nice article, thanks for the
6 hours 56 min ago
- I once had a better way I
12 hours 42 min ago
- Not only you I too assumed
12 hours 59 min ago
- another very interesting
14 hours 52 min ago
- Reply to comment | Linux Journal
16 hours 46 min ago
- Reply to comment | Linux Journal
23 hours 40 min ago
- Reply to comment | Linux Journal
23 hours 56 min ago
- Favorite (and easily brute-forced) pw's
1 day 1 hour ago
- Have you tried Boxen? It's a
1 day 7 hours ago
- seo services in india
1 day 12 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?