LinuxBIOS: Difference between revisions
m (→Overview) |
JordanCrouse (talk | contribs) (Add {{deprecated}} tag) |
||
(25 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Translations}}</noinclude> |
|||
{{deprecated|OLPC now uses [[Open Firmware]] for the bootloader}} |
|||
==Overview== |
==Overview== |
||
We are 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: |
We are using [http://linuxbios.org/index.php/Main_Page 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: |
||
# 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. |
# 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, and this reason, by itself, makes a commercial BIOS questionable. |
||
# 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. |
# 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. |
||
# Robustness and speed. By leveraging Linux drivers rather than hand-crafted drivers in BIOS's we get well tested drivers for a wider variety of devices than any other system. And these drivers have been tuned for speed, as they are identical to that used in production Linux systems. |
# Robustness and speed. By leveraging Linux drivers rather than hand-crafted drivers in BIOS's we get well tested drivers for a wider variety of devices than any other system. And these drivers have been tuned for speed, as they are identical to that used in production Linux systems. |
||
# |
# 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. In our case, the cost to use LinuxBIOS and Linux as Bootloader is approximately equal to what the cost would have been using a commercial BIOS. Regardless, LinuxBIOS remains an attractive solution for the other reasons given. |
||
# Freedom. Free Software allows us to do what we need, independent of any proprietary software vendor. |
|||
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 decided we want Linux as bootloader to also fit into the the ROM with LinuxBIOS (and the embedded controller code). The actual cost turned out to be almost identical to using a commercial BIOS. |
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 decided we want Linux as bootloader to also fit into the the ROM with LinuxBIOS (and the embedded controller code). The actual cost turned out to be almost identical to using a commercial BIOS. |
||
Line 34: | Line 38: | ||
==Design Goals== |
==Design Goals== |
||
We have some pretty specific design goals with LinuxBIOS |
We have some pretty specific design goals with LinuxBIOS 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=== |
===Boot from NAND Flash=== |
||
Line 51: | Line 55: | ||
Additionally, the factory floor will want to load individual images onto particular machines, at least the 64kb of the serial flash including a serial number, date of manufacture, manufacturer, etc. Generating these images on the fly is simple on a server system, which can also record the MAC address for each machine built. |
Additionally, the factory floor will want to load individual images onto particular machines, at least the 64kb of the serial flash including a serial number, date of manufacture, manufacturer, etc. Generating these images on the fly is simple on a server system, which can also record the MAC address for each machine built. |
||
== Care and feeding of a LinuxBIOS Image == |
|||
* [[Building LinuxBIOS]] |
|||
===Boot from Wireless=== |
|||
* [[Flashing LinuxBIOS]] |
|||
* [[ROM Emulators for OLPC]] |
|||
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. |
|||
* [[Building an SPI image for olpcflash]] |
|||
==Included Modules== |
|||
* LinuxBIOS itself |
|||
* Decompression code |
|||
* Embedded controller code |
|||
* VSA code for Geode |
|||
* Linux Kernel, configured using TinyLinux |
|||
* (MSRs?) |
|||
* Networking stack |
|||
* Basic HID USB drivers |
|||
* Marvell Driver |
|||
* Marvell Firmware |
|||
* Installer stub |
|||
* fbdev driver |
|||
* NAND Flash driver |
|||
* initialization file system, with basic utilities for device and network |
|||
bringup and scripts for installation. |
|||
==HOWTO and Directions== |
|||
Go to [[LinuxBIOSHowto]] for instructions on building LinuxBIOS and the ROM image. |
|||
==People== |
==People== |
||
Line 91: | Line 73: | ||
* Jordan Crouse |
* Jordan Crouse |
||
* Michael Lin |
* Michael Lin |
||
* Richard Smith |
|||
==External Links== |
|||
[http://www.fsf.org/campaigns/free-bios.html FSF Campaign for a Free BIOS] |
|||
[[Category:Hardware]] |
Latest revision as of 21:23, 18 April 2007
OverviewWe are 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:
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 decided we want Linux as bootloader to also fit into the the ROM with LinuxBIOS (and the embedded controller code). The actual cost turned out to be almost identical to using a commercial BIOS. Video of a LinuxBIOS boot on OLPCHere's a video of LinuxBIOS booting Linux on a rev a board. The movie Hardware LimitationsWe are limited to the 1MB of serial flash that's available in the OLPC board. Into this space (mostly compressed) must fit:
Since recovery of a board that has been mis-flashed can be extremely difficult if the 64kb of code the EC uses is damaged, and we need some place to store a serial number, keyboard type, and similar information, we are going to write the serial flash in two independent pieces:
Since the EC code has control of the line for write-enable of the serial flash, we will enforce that a key be held down before write-enable can be asserted, so that any virus or worm cannot easily destroy the serial flash, which would render the machine unusuable. Design GoalsWe have some pretty specific design goals with LinuxBIOS 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 FlashThis 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 DevicesAnother 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 EthernetBy far the easiest way to load the flash in the factory will be via ethernet. While installing from USB storage devices is possible, factory production flow will be easiest and most flexible if USB storage devices do not have to be used on the line, but we can simply plug in a USB wireless dongle connected to a network. Wireless is not feasible at these production rates (potentially .5 gigabytes by 20,000 or more machines/day). Additionally, the factory floor will want to load individual images onto particular machines, at least the 64kb of the serial flash including a serial number, date of manufacture, manufacturer, etc. Generating these images on the fly is simple on a server system, which can also record the MAC address for each machine built. Care and feeding of a LinuxBIOS ImagePeopleThe following people are heavily involved with the LinuxBIOS project. Please contact them on the devel@laptop.org mailing list.
External Links |