LinuxBIOS

From OLPC
Revision as of 11:01, 4 August 2006 by Jg (talk | contribs) (Overview)
Jump to: navigation, search

Overview

We're using LinuxBIOS and Linux as a bootloader in place of a proprietary BIOS on the Laptop board. We're doing this for a number of reasons:

1. Functionality. Some parts of the design scenarios listed below are unique to this laptop. We would only be able to do this with the community and LinuxBIOS. In particular, we need to be able to resume the hardware very quickly; many BIOS's impose long delays on power on.

2. Transparency. We want kids to be able to get all the way down to the bare metal on these machines. The transparency that LinuxBIOS gives us is matched by no others.

3. Cost. Per-machine royalties add to the cost of the laptop. Every cent we have to spend for each machine means some number of kids that don't get laptops. However, in our case, this turned out to be approximately equal: the savings of royalties were used by needed a larger ROM for using Linux as Bootloader. On other systems, for example ones on which one can write protect main flash pages, one might put the Linux image being used as a bootloader into such write protected pages. The NAND flash on our system lacks page level write protect bits, and therefore for robustness sake, we need Linux as bootloader to also fit into the the ROM with LinuxBIOS (and the embedded controller code).

Video of a LinuxBIOS boot on OLPC

Here's a video of LinuxBIOS booting Linux on a rev a board. The movie

Hardware Limitations

We are limited to the 1MB of serial flash that's available in the OLPC board.

Design Goals

We have some pretty specific design goals with LinuxBIOS on on the Laptop hardware. We need to support a few re-install scenarios via the BIOS to enable kids in remote areas to be able to reflash their machines. The scenarios are outlined below.

Boot from NAND Flash

This is the normal case for the laptop. Simply loading a kernel off the NAND flash and then using kexec() to load that new kernel into memory and jump to it. This requires having a driver for the NAND flash and being able to locate the kernel on the internal NAND flash.

Boot from USB Storage Devices

Another common system for booting the machine to recover it is to use a USB Flash Drive or use a USB Hard Drive to start an install process. This requires having decent USB drivers for flash drives and hard drives. One of the headaches is that many USB storage devices claim they are ready, but actually are not ready and require a delay before accessing the device.

Boot from Wireless

This is the most interesting scenario, and one that is unique to this laptop. This feature could allow a kid in a remote area to get a boot image via a wireless network. This requires no external hardware (flash drives are expensive!) and you can use another machine as the image from which you would like to install. This requires including a wireless driver, the wireless firmware, networking and a small program that accepts the kernel image, loads it into ram and executes it.

Included Modules

  • Kernel
  • (MSRs?)
  • Networking stack
  • Basic HID USB drivers
  • Marvell Driver
  • Marvell Firmware
  • Installer stub
  • DirectFB driver
  • NAND Flash driver

HOWTO and Directions

Go to LinuxBIOSHowto for instructions on building LinuxBIOS and the ROM image.

People

The following people are heavily involved with the LinuxBIOS project. Please contact them on the devel@laptop.org mailing list.

  • Ronald Minnich
  • Marcelo Tosatti
  • Ray Tseng
  • Roger Huang
  • Morse Chen
  • Jordan Crouse
  • Michael Lin