From coreboot
Revision as of 19:12, 27 June 2006 by Ward (talk | contribs) (→‎VGA bios)
Jump to navigation Jump to search

The wiki is being retired!

Documentation is now handled by the same processes we use for code: Add something to the Documentation/ directory in the coreboot repo, and it will be rendered to Contributions welcome!

Before you begin

Do yourself a favor, and get a BiosSavior before you begin. We bought ours from There are different models, make sure you order the one you need. It depends on the size and type of the ROM chip on your board. Our S2881 board has a 4Mbit PLCC chip:

While LinuxBIOS replaces the functions of the proprietary bios, it does NOT replace the VGA bios. If you want VGA on your linuxBIOS'd machine (not strictly necessary for servers), you will need to extract the VGA bios and concatenate it with the LinuxBIOS image, before burning it to your ROM. See below for details.


LinuxBIOS requires a Payload to boot an operating system.

If you want to boot from the network, you will need to use Etherboot.

If you want to boot from an IDE drive, SATA drive, USB stick or CDROM, you can use FILO.

Building the payload

In order to boot from a SATA disk, we use FILO.

Once you've downloaded FILO, you will need to put a file 'Config' in its root tree. An example can be found in the distribution, called 'defconfig'.

You can configure FILO to load Grub. Here's my Config, which does that:

 # Use grub instead of autoboot?
 # Grub menu.lst path
 MENULST_FILE = "hda1:/grub/menu.lst"
 # Driver for hard disk, CompactFlash, and CD-ROM on IDE bus
 # Add a short delay when polling status registers
 # (required on some broken SATA controllers)
 # Driver for USB Storage
 # VGA text console
 # Enable the serial console
 # Serial console; real external serial port
 SERIAL_SPEED = 115200
 # Filesystems
 FSYS_ISO9660 = 1
 # Support for boot disk image in bootable CD-ROM (El Torito)
 # PCI support
 # Enable this to scan PCI busses above bus 0
 # AMD64 based boards do need this.
 # Loader for standard Linux kernel image, a.k.a. /vmlinuz

In order to get serial output from Grub, you will also need to add something like this to your menu.list:

 # serial port 0
 serial --unit=0 --speed=115200
 terminal --timeout=15 serial console

Now execute 'make', which will generate a filo.elf file that will be your payload. You will need to refer to this file to build LinuxBIOS as explained below, because it gets included in the LinuxBIOS ROM image.

Building LinuxBIOS

Download LinuxBIOS ( You need subversion revision 2251 or higher. Note that revisions 2288 through 2295 are known bad, do not use those.

If you want VGA support, a few changes are required in the linuxbios source tree. Edit this file:


You'll need to enable the following two lines:

 #VGA Console

Whether you want VGA or not, build a tyan/s2881 tree.

 cd targets
 ./buildtarget tyan/s2881

Modify tyan/s2881/; change payload setting to point to your filo.elf file

If you don't need VGA, you will need to modify tyan/s2881/ Comment out the line:

 option ROM_SIZE = 475136

If you do need VGA, modify the ROM_SIZE line to the following, because our VGA bios is only 32KB:

 option ROM_SIZE = 491520

Make you are using GCC 3.4 (not GCC 4.0), or your image will be too large, and then:

 cd tyan/s2881/s2881

VGA bios

Skip this section if you don't need VGA support in your LinuxBIOS.

The s2881 VGA bios is 36K long. The last 4KB are not available in RAM after boot (with the proprietary BIOS), however, so we can NOT use this method to extract the VGA BIOS:

 While booted with your proprietary BIOS, you can see where your vga bios starts and how much space it takes by issuing
   cat /proc/iomem | grep "Video ROM"
 Then get a copy of your vga bios.
   dd if=/dev/mem of=vgabios.bin bs=1k count=32 skip=768
 Our vga bios is 32K. Verify that the image is correct - it should start with 55 AA, and contain strings that indicate it's your VGA bios. In my case, I could clearly make out 'ATI RAGE' etc.

So this does not work. Thankfully, Anton Borisov has some tools to extract the VGA BIOS - and other option ROMs, in fact - from the BIOS images that Tyan offers on its website. He's going to release these tools under the GPL by the end of June 2006. Keep an eye on this page, I'll update it when the tools are available.

Once you have the proper VGA bios image (36K long), you need to concatenate the VGA bios with the linuxbios image

 cat vgabios.bin linuxbios.rom > final_linuxbios.rom

Burning the bios

Make sure your Biossavior is set to the 'RD1' position (not to 'ORG'!), so that you can always revert to the original bios.

On the target machine:

  cd LinuxBIOSv2/util/flashrom
  ./flashrom -v -w path/to/your/linuxbios.rom

If you want VGA support, make sure you burn the final_linuxbios.rom image!

Booting LinuxBIOS

You now need to 'halt' the machine. A soft reset won't work the first time you boot from the proprietary BIOS into LinuxBIOS.

Since we set up serial output in the LinuxBIOS configuration files above, you will want to hook up a serial console (or a copy of minicom or the like) to see what the box is doing while starting up. Keep your eyes on the screen after hitting the power button - LinuxBIOS will be up and running way before you expect it!

If you have problems, don't despair. Power down the box, switch the biossavior to 'ORG' and boot in the proprietary BIOS. Just don't forget to switch the biossavior back to the 'RD1' position before flashing the BIOS!

See what went wrong, and subscribe and post to the friendly and helpful mailing list if you can't figure it out by yourself.