Random comments on LinuxBIOS

McMechan, James W CIV james.mcmechan at navy.mil
Wed Apr 16 17:10:01 CEST 2003

Here is what I wrote while trying to catch up to list, though there is a FAQ I produced this while working my way through the emails perhaps some of it could be added to the FAQ

LinuxBIOS is a project to replace the original BIOS on motherboards with open source.
It appears that the two most common uses for LinuxBIOS are for Supercomputer clusters and embedded systems.

LinuxBIOS no longer always uses a real OS to load the OS.

LinuxBIOS currently can boot several payloads including:
1 Linux which is what started all this, hence the name.
2 Plan9 Ron Minnich seems to like this one.
3 VxWorks Felix Radensky said he had success with a older boot method
4 EtherBoot which despite its name can also boot from IDE hard disks with a patch or the dev branch
5 ADLO is a shim to allow the Boch emulator's BIOS to be used on top of LinuxBIOS to boot some versions of that other OS or to run VGA controller ROMs which seem to assume that a BIOS is present.

The Supercomputer people appear to want remote control, remote booting and fast boot times without user interaction. For example "Press F2" is a very inconvenient task on a system with 100 computers

The embedded people appear to want full control of the boot process and very fast boot times. For example who wants to watch a memory test go by on their VCR/MP3 player or see "Press F2" without a keyboard.

LinuxBIOS is installed into the flash ROM in place of the original BIOS.

Most flash ROMs are currently 2 Megabits in size, i.e. a 29SF020 which is only 256 Kilobytes of storage, or some might be 4 Mbit ROM which provides 512 Kbytes and so could allow for very squeezed down Linux kernel to also be included in the ROM, though I don't know of a useful kernel that small.
It would be nice to add a larger flash ROM but many motherboards do not connect enough address lines to the Flash ROM socket, for even the 4 Mbit part or they solder the chip down.

Another popular if grumbled about option is the disk on a chip the DoC Millennium which is a paged flash part that can have LinuxBIOS in the first part and up to 8 Mbytes of other data on other pages of the chip. Very short ~3-10 seconds boot times should be possible with this method.

The BIOS Flash can usually be programmed in place by either just reflashing the original BIOS or by the hotswap method also known as the dental floss method, referring to putting dental floss under a PLCC chip to make it easy to remove without requiring metal tools in a powered on system. The hotswap method is not for the faint of heart but not all that difficult either, the system is booted with a working ROM which is then pulled out and the ROM to be programmed inserted in its place, then the ROM flashing program is run, and when done a reboot can be tried, this does not require a programmer as it uses the motherboards ability to update its BIOS as the programmer, if the reboot fails the original ROM is reinserted and the system rebooted again, all this requires, is some spare flash ROMs it is a good idea to make and label a couple backups incase something goes wrong, I have put ROMs in DIP sockets backwards destroying the ROMs, and ESD is a worry even if it is not a common problem.

Some people also use a very nice device called the BIOS savior which allows for two BIOS ROMS to be switched by the user with a switch.

Compact Flash IDE adaptors appear to be popular as the CF does not need the spin up time of a real hard disk. Very short boot times of ~3-10 seconds are claimed for this configuration also.

Each model of motherboard currently needs its own build information due to a lack of standards in how the circuitboards are laid out between models and manufactures.

If you have a motherboard that is not listed, a "lspci" will show what chipsets are in use and you can then check to see if they are in the LinuxBIOS tree, if not some research may be needed to get the documentation for that chipset.

The kexec patches date back to the original LinuxBIOS with the Linux kernel in the BIOS ROM and allowed for new kernels to be loaded and executed without rebooting back to the BIOS this would allow for a minimal kernel in the BIOS and a full featured kernel to be loaded by the first kernel. Also the BIOS ROMs have a limited programming life and limited space so a small unchanging kernel that then loads the final kernel from something else prolongs the useful life of the ROMs.

Ron Minnich at LANL uses similar feature called "two kernel monte" http://sourceforge.net/projects/monte/

LinuxBIOS now has the ability to make use of the CMOS space for fallback/normal boot image selection, serial port baud rates, and boot order for Etherboot, Ron Minnich also used it  authentication information for a Plan9 cluster. See the cmos.layout files for information.

Steven James had nice comments on Normal/Fallback images:
LinuxBIOS for that board (and many others) supports two copies of
LinuxBIOS, fallback and primary. The fallback image is intended to be old
and stable and it's purpose is to act as a sort of rescue image. The
primary image is the one that gets updated to the latest and greatest, and
is meant to be more versatile and complete.

The fallback image is loaded at the top of the flash, and always receives
control at power on or reset. It does very minimal setup (switch to 32bit
flat memory protected mode), checks and clears the CMOS boot bit, and if
it was set, jumps to the primary image. This way, if the primary fails,
hitting reset will boot from the fallback image alone.

More information about the coreboot mailing list