LinuxBIOS Brings Clones One Step Closer to Freedom

By Carla Schroder | Oct 23, 2007 | Print this Page
http://www.enterprisenetworkingplanet.com/netsysm/article.php/3706881/LinuxBIOS--Brings-Clones-One-Step-Closer-to-Freedom.htm

No matter how hard you try to build a 100 percent Free/Open Source (FOSS) computer, there are a few bits you can't reach that contain non-FOSS code: ROM chips. These power the BIOS (Basic Input/Output System), Ethernet interfaces, SCSI controllers, and SATA/PATA drive controllers. Today we're taking a look at the LinuxBIOS project, which gives us a modern GPL alternative to the two remaining proprietary BIOS vendors, AMI and Phoenix.

Even if you don't care about the openness of your system BIOS, you might be concerned about its inflexibility and legacy baggage. The x86 BIOS still thinks it's supporting MS-DOS and performs a number of tasks, such as probing hardware and loading drivers, that modern operating systems (including Linux and Windows) now handle better, faster and with a lot more flexibility and user control. This can take 30-50 seconds. The operating system ignores what the BIOS does and then re-runs the same tasks. Newer PCs shortcut this with the "fast boot" setting, which skips most of the usual steps and gets to a boot prompt in about ten seconds.

LinuxBIOS takes a completely different approach. Rather than merely skipping over the useless bits, LinuxBIOS is new from the ground up. It's designed to perform just enough hardware initialization to start the system, and then it hands off to the next step in the boot process. LinuxBIOS calls this executing a payload, which is any executable capable of starting a kernel. It's not limited to booting Linux, but can boot a number of operating systems including Windows 2000. It can also start memtest, enable netbooting, Open Firmware, or anything you care to code it to boot.

What is the BIOS?

"BIOS" is a shortcut name for a complex of programs and chips, including three programs stored on a Flash ROM chip. BIOS, Setup and Power-on Self-test (POST), plus Setup variables are stored on a CMOS (Complementary metal-oxide-semiconductor) chip. This is volatile memory; it loses its contents when the power goes off. So it needs a battery to maintain settings when the power is off, usually a soldered barrel battery, a lithium battery, or a coin cell battery. Batteries last several years; you can tell when one is getting weak because your settings, such as the time and date, are not retained between power cycles. Motherboards with barrel batteries usually have connectors for a replacement battery, so you don't have to solder in a new battery.

The code in these programs is called firmware or microcode (the term favored by IBM). They mean the same thing. The common phrase for updating or replacing this code is flashing the firmware. LinuxBIOS adds an excellent twist to this, which we'll get to in a moment.

LinuxBIOS Advantages

LinuxBIOS is written in C rather than assembly language, which makes it easier to write and debug. There are no licensing fees, and it occupies a smaller footprint than proprietary BIOSes.

A very large advantage, at least to me, is it foils Trusted Computing. Whoever controls the BIOS controls your computer, and you can call me a crazy hairy old anarchist paranoid hippie all you want—I still won't cede control of my computer to a consortium of ethics-free globalcorps who view me as a fleecy animal.

Bugs in LinuxBIOS get fixed.

The development toolchain is relatively inexpensive and accessible.

Open code means it's auditable and has nowhere for home-phoning nasties to hide. It's also completely customizable, so you don't have to depend on non-responsive vendors for extra features.

Very fast booting—the project page claims 3 seconds from power-on to console.

You get real-live useful debugging output to the serial console.

It is maintained by a community of developers and users who are more interested in making something inventive, flexible and excellent than locking-in users and vendors.

You can update LinuxBIOS over the network. (This is the cool thing I referred to earlier.) Imagine the traditional way of changing settings in the PC BIOS: one system at a time, monitor and keyboard required. Now imagine logging in remotely to any machine&mashworkstation, server, cluster node—and making changes with a few keystrokes from the comfort of your personal lair.

You don't need a Windows PC or floppy disk to flash the LinuxBIOS.

Nobody was stopping the proprietary vendors from implementing new and excellent features, but that's the way it always seems to be.

Who Uses It?

LinuxBIOS booting an embedded Linux kernel was the original BIOS for the One Laptop Per Child (OLPC) project. In 2006 the Linux kernel was replaced with Open Firmware.

A number of commercial products are already using LinuxBIOS— visit the Vendors & Products section for a partial list.

In the beginning phases of the LinuxBIOS project it was a straight uphill job with no support from hardware vendors, and with the legal hassles perhaps outweighing the technical challenges; because even though reverse-engineering is legal, it only takes one small herd of corporate lawyers to ruin your life. You'd think that hardware vendors would be interested in expanding their customer base painlessly, but no, they weren't, as is so often the case in high tech. But finally, after seven years of hard work and persistence, a number of high-profile names have come aboard: Google, AMD, Acer, VIA, Newisys, and several others.

Trying It Yourself

This is very much a work in progress, and a chance to exercise some serious geekery. There don't appear to be any desktop motherboards that ship with LinuxBIOS as an option. The Vendors & Products section lists a number of embedded boards that use it.

So testing it out yourself safely on a PC will require a few pieces of specialty hardware and a lot of reading before you start. Don't use a motherboard you can't afford to write off. Use a supported motherboard with a socketed, or removable, BIOS chip; this is always recoverable if you mess it up. Boards with soldered BIOS ROMs will be unusable with no cost-effective way to fix them if you make a mistake. Be absolutely paranoid about static electricity and follow all the precautions. If your motherboard is not listed then check the list of supported chipsets, because the same few chipsets appear on all motherboards. (Portland, Oregon residents, visit FreeGeek for all the inexpensive second-hand hardware you could ever use.)

Linux on embedded devices is a fast-growing field, so this could be your introduction to an new and fascinating profession, and I think it is the next frontier of open source. Consider documenting your adventures and sharing them on the LinuxBIOS Wiki or mailing list. And maybe let your favorite motherboard vendor know that you want them to offer LinuxBIOS as an option.

Resources