Reducing OS Boot Times for In-Car Computer Applications, Part III
Power down. With a Sharpie marker, mark your good BIOS with a G and the experimental BIOS chip with an X so you can tell them apart. Grab the chip tweezers tool. If there is enough clearance, put the hooks through the slots provided at the corners of the socket, press the tool against the socket and squeeze. If there isn't enough clearance to get both hooks in, unfold the tool, place one hook under one corner, press the tool against the socket and squeeze gently until the chip starts to come up. Then, move on to the other corner, then back to the first and so on. You want the chip to come out straight or it bends up the contacts.
Press the good BIOS in--make sure it is oriented correctly. It is possible to stick it in upside-down, which fries the chip. You don't have to push the chip all the way into the bottom of the socket.
Boot. You want to make sure your distro or Flash or what-not boots before you flash the BIOS.
As soon as it starts booting, you can pull the good BIOS, as it's been copied into shadow RAM. Pull it out as described above, being careful not to short out the board or break anything.
Push in the experimental BIOS.
Grab your fixed BIOS, however you choose to do that, and burn it with flash_rom from the FreeBIOS flash_and_burn directory. I found I often had to burn twice or, at least, had to wake the chip up by running flash_rom with no arguments to make it do the chip-ID stuff; I don't know why.
Reboot and see if it works.
The steps go in this order: power-up loads FreeBIOS, FreeBIOS loads a bootloader (FILO), the bootloader loads the kernel and so on. First, then, you have to build the bootloader. The FreeBIOS people like to use Etherboot, but Etherboot currently is broken as far as booting from disk goes. So, FILO is the thing to use. FILO is like GRUB, but it has no need for the BIOS.
Unpack FILO, switch to the FILO directory and run make. This creates a default config file. Edit config, then run make again to create filo.elf, which is what we use for the LinuxBIOS payload. Here's my FILO config.
Next, we need to add a video BIOS. Actually, the video BIOS on the Epia-M is pretty useless (more on this later), but it serves to let X know that we have built-in video, so in it goes.
Because the video BIOS is copyrighted by VIA and cannot be distributed independently, you have to grab it from your original BIOS. Do so in one of two ways. Either boot Linux and enter:
dd if=/dev/mem of=vgabios.bin skip=1536 count=128
or extract it from the BIOS distribution image, if you can find the offset. Cat the two together, like so:
cat vgabios.bin filo.elf > vfilo.elf
Therefore, vfilo.elf is our payload--a bootloader plus a video BIOS.
The traditional LinuxBIOS now is called FreeBIOS, as it can load things other than Linux. A new rewrite, called FreeBIOS2, doesn't appear to be ready yet. I therefore used FreeBIOS, which is available only from CVS. To get it, type:
cvs -d:pserver:email@example.com:/cvsroot/freebios login cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/freebios co freebios
FreeBIOS builds and configures in a separate directory, so doing a CVS update doesn't hose your existing config files. So, in the same directory as where you have /linuxbios, make a build directory by issuing mkdir build. Then, create an epia-config file; here's our epia-config file.
Notice all the full paths in that file? LinuxBIOS likes full paths. To build the BIOS, do this:
python /home/jamesh/linuxbios/freebios/util/config/NLBConfig.py epia-config/home/jamesh/linuxbios/freebios/
where /home/jamesh/linuxbios/freebios is where I put FreeBIOS. Then run make, which should produce a file called romimage. This is what you burn to your BIOS chip.
You also are going to need some utilities from the FreeBIOS folks. cd into freebios/util/mkelfImage and issue
./configure && make && make install
to get mkelfImage, which should end up in /usr/local/sbin. Then, cd into ../flash_and_burn and do make to get flash_rom. This is what you will flash your ROM with.
On a side note, some other tools are available to produce ELF kernels--don't use them. Most of them are broken, including the one from the Etherboot project that is mentioned in the HOWTOs.
|Speed Up Your Web Site with Varnish||Jun 19, 2013|
|Non-Linux FOSS: libnotify, OS X Style||Jun 18, 2013|
|Containers—Not Virtual Machines—Are the Future Cloud||Jun 17, 2013|
|Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer||Jun 12, 2013|
|Weechat, Irssi's Little Brother||Jun 11, 2013|
|One Tail Just Isn't Enough||Jun 07, 2013|
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- RSS Feeds
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
11 min 21 sec ago
- Reply to comment | Linux Journal
33 min 40 sec ago
- Android has been dominating
38 min 12 sec ago
- It is quiet helping
3 hours 23 min ago
3 hours 41 min ago
- Reachli - Amplifying your
4 hours 57 min ago
5 hours 46 min ago
- good point!
5 hours 49 min ago
- Varnish works!
5 hours 58 min ago
- Reply to comment | Linux Journal
6 hours 27 min ago
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?