Upgrading to LinuxBIOS: Difference between revisions
(use Template:Obsolete and Template:Deprecated, explain why, remove most categories) |
|||
(23 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{obsolete|link=[[Open Firmware]]}} |
|||
Around 2007, OLPC prototype boards switched to the awesome [[Open Firmware]], and the latter is what ships on all XO-1 machines. |
|||
{{deprecated}} |
|||
{{Translations}} <!-- to add translations edit [[Upgrading to LinuxBIOS/translations]] --> |
|||
== Introduction == |
== Introduction == |
||
''This page is mostly for ATest developers. BTest-1 developers should not update the firmware or they will lose valuable manufacturing data in the flash. New tools will be released soon.'' |
|||
This procedure installs LinuxBIOS in the SPI flash of an OLPC development board, replacing the factory-installed Insyde BIOS if it's there. Insyde BIOS expired on Aug. 23, 2006. |
This procedure installs LinuxBIOS in the SPI flash of an OLPC development board, replacing the factory-installed Insyde BIOS if it's there. Insyde BIOS expired on Aug. 23, 2006. |
||
This process works by booting one of the OLPC [[Build images|build images]], which include the |
This process works by booting one of the OLPC [[Build images|build images]], which include the |
||
utilities required for loading LinuxBIOS into the board's SPI flash. The build image can boot either under Insyde BIOS or under LinuxBIOS. Once the flash has been updated, you may optionally continue to install the build image to internal NAND flash, or install a full Fedora installation on a USB hard disk. |
utilities required for loading LinuxBIOS into the board's SPI flash. The build image can boot either under Insyde BIOS or under LinuxBIOS. Once the flash has been updated, you may optionally continue to install the build image to internal NAND flash, or install a full [[Fedora]] installation on a USB hard disk. |
||
==Warnings== |
==Warnings== |
||
---- |
|||
* '''Do NOT install LinuxBIOS if your board's memory parts are labeled "Infineon"; doing so may result in an unusable or unstable board due to an mistake with the selection of the speed rating of that manufacturer's DRAM's.''' The DRAM chips are the 4 relatively large, identical chips in a row next to the processor chip. If you have an Infineon based board, please continue to use the Insyde BIOS for the time being, we may have a LinuxBIOS for you sometime soon. |
|||
* '''BTest-1''' users please stop here. Do not update your firmware from the Q2A42 version that is factory installed. The current tools will '''not''' preserve your manufacturing data. We will release new tools shortly. |
|||
---- |
|||
* This is a one-way procedure. Once you have installed LinuxBIOS and rebooted, going back to Insyde BIOS requires other tools and procedures. |
* This is a one-way procedure. Once you have installed LinuxBIOS and rebooted, going back to Insyde BIOS requires other tools and procedures. |
||
* If you install a CL 2.0 BIOS version onto a board with Infineon RAMS, you may have trouble (re)booting. Please be careful to choose the correct version of the BIOS. |
|||
* We '''strongly recommend''' that you install a new OS (build) image at the same time that you upgrade to LinuxBIOS. However, you can also use a new OS image solely to update your BIOS from Insyde to LinuxBIOS. |
* We '''strongly recommend''' that you install a new OS (build) image at the same time that you upgrade to LinuxBIOS. However, you can also use a new OS image solely to update your BIOS from Insyde to LinuxBIOS. |
||
* LinuxBIOS is not compatible with Insyde BIOS. After LinuxBIOS is installed, old software installations that used to work under Insyde BIOS may no longer boot. If you wish to continue using your existing installation, you will need to update both your kernel and your X driver, as described below. |
* LinuxBIOS is not compatible with Insyde BIOS. After LinuxBIOS is installed, old software installations that used to work under Insyde BIOS may no longer boot. If you wish to continue using your existing installation, you will need to update both your kernel and your X driver, as described below. |
||
* The Geode processor on the OLPC boards does not have VESA console graphics hardware built in: instead, the Insyde BIOS has code that emulates VESA hardware. This emulator is not owned by AMD, and we prefer to use the BIOS space for other capability. We could also not maintain this binary blob should it require maintenance. This means that DOS or Windows will '''not''' boot under LinuxBIOS directly, as they expect to find VESA graphics present. |
* The Geode processor on the OLPC boards does not have VESA console graphics hardware built in: instead, the Insyde BIOS has code that emulates VESA hardware. This emulator is not owned by AMD, and we prefer to use the BIOS space for other capability. We could also not maintain this binary blob should it require maintenance. This means that DOS or Windows will '''not''' boot under LinuxBIOS directly, as they expect to find VESA graphics present. |
||
* If for some reason you are not using the Fedora builds, you should first update your kernel to our latest kernel, and use the gxfb driver as your console. You will also need the amd X driver. To boot a Linux kernel on OLPC on the graphics console, you must use the gxfb driver. Note that the VESA X driver will also no longer function: you should be using the new "amd" X Window System driver as well, which has much higher performance. |
* If for some reason you are not using the [[Fedora]] builds, you should first update your kernel to our latest kernel, and use the gxfb driver as your console. You will also need the amd X driver. To boot a Linux kernel on OLPC on the graphics console, you must use the gxfb driver. Note that the VESA X driver will also no longer function: you should be using the new "amd" X Window System driver as well, which has much higher performance. |
||
==The OLPC LinuxBIOS Installation Procedure== |
==The OLPC LinuxBIOS Installation Procedure== |
||
Line 43: | Line 52: | ||
Your RAM can be identified by looking at the following picture: |
Your RAM can be identified by looking at the following picture: |
||
[[Image: |
[[Image:Reva infineon highlight small.jpg]] |
||
The 4 highlighted chips are the DRAM. |
The 4 highlighted chips are the DRAM. |
||
Line 49: | Line 58: | ||
The labeling on the Infineon chips looks like this: |
The labeling on the Infineon chips looks like this: |
||
[[Image: |
[[Image:Infineon closeup.png]] |
||
If your RAM matches the above then you need to use the '''CL2.5''' version of the LinuxBIOS upgrade. |
If your RAM matches the above then you need to use the '''CL2.5''' version of the LinuxBIOS upgrade. |
||
Line 55: | Line 64: | ||
===Installing LinuxBIOS=== |
===Installing LinuxBIOS=== |
||
==== Newer builds : 175+ ==== |
|||
Download build image 86 from [http://olpc.download.redhat.com/olpc/streams/development/build86/ext3/olpc-redhat-stream-development-ext3.img.bz2 here]. This OS image has the following checksums: |
|||
http://olpc.download.redhat.com/olpc/streams/development/latest/ |
|||
Find a source with which to confirm the checksum before flashing. For example: |
|||
$ md5sum olpc-redhat-stream-development-ext3.img.bz2 |
$ md5sum olpc-redhat-stream-development-ext3.img.bz2 |
||
c37b4fc8b9af3ec119b7f522fd66933c olpc-redhat-stream-development-ext3.img.bz2 |
|||
⚫ | |||
$ sha1sum olpc-redhat-stream-development-ext3.img.bz2 |
|||
2fa998f2f6049505c5dd8b7661aac376ed1928c7 olpc-redhat-stream-development-ext3.img.bz2 |
|||
⚫ | |||
Plug your USB key or disk into the host system, and verify that /dev/sda is its correct name ([[#Linux USB drive device names|Alternative names for /dev/sda...]]). Make '''sure''' you do the verification, since SATA hard drives are becoming more common, so using the wrong device name here might overwrite your own hard drive! Now type the following, replacing /dev/sda with the appropriate device if needed: |
Plug your USB key or disk into the host system, and verify that /dev/sda is its correct name ([[#Linux USB drive device names|Alternative names for /dev/sda...]]). Make '''sure''' you do the verification, since SATA hard drives are becoming more common, so using the wrong device name here might overwrite your own hard drive! Now type the following, replacing /dev/sda with the appropriate device if needed: |
||
Line 78: | Line 87: | ||
ddrescue has progress indication. |
ddrescue has progress indication. |
||
If you are still using Insyde BIOS, you will likely have it complain that it |
|||
has expired. Set the date back to sometime in the summer, for example, August 1, 2006. |
|||
Boot the OLPC board ([[#Boot sequence details|Boot sequence details...]]), and be sure to choose the '''second option''' in the green grub boot menu (don't accidentally boot the OLPC qemu target!). |
Boot the OLPC board ([[#Boot sequence details|Boot sequence details...]]), and be sure to choose the '''second option''' in the green grub boot menu (don't accidentally boot the OLPC qemu target!). |
||
Line 83: | Line 95: | ||
When it finishes booting, you should see the sugar login prompt. Press ctrl+alt+F1 to get to a console, and login as 'root' with no password. |
When it finishes booting, you should see the sugar login prompt. Press ctrl+alt+F1 to get to a console, and login as 'root' with no password. |
||
Now depending on what DRAM type you have you should flash in one of 2 different images. See [[#Checking your DRAM type|Checking your DRAM type]] for help on figureing out what DRAM |
Now depending on what DRAM type you have you should flash in one of 2 different images. See [[#Checking your DRAM type|Checking your DRAM type]] for help on figureing out what DRAM mfg you have. |
||
For Hynix and PSC DRAM use: |
For Hynix and PSC DRAM use: |
||
$ olpcflash -r insyde.rom |
$ olpcflash -r insyde.rom |
||
$ olpcflash -w /var/lib/olpc/ |
$ olpcflash --brick -w /var/lib/olpc/Olpc-Q2A53.rom (at the time of writing) |
||
$ olpcflash -v /var/lib/olpc/linuxbios.rom |
|||
For Infineon DRAM use: |
For Infineon DRAM use: |
||
$ olpcflash -r insyde.rom |
$ olpcflash -r insyde.rom |
||
$ olpcflash -w /var/lib/olpc/ |
$ olpcflash --brick -w /var/lib/olpc/Olpc-Q2A53_CL2.5.rom |
||
$ olpcflash -v /var/lib/olpc/linuxbios.rom.cas25 |
|||
These take of order a minute each to execute. ([[#olpcflash details|Details of what olpcflash does...]]) |
These take of order a minute each to execute. ([[#olpcflash details|Details of what olpcflash does...]]) |
||
Line 114: | Line 124: | ||
== Troubleshooting and additional information for the curious == |
== Troubleshooting and additional information for the curious == |
||
===Continuing by upgrading to Open Firmware and the latest build image=== |
|||
If you are trying to use the [[Autoreinstallation image]], at this point you are ready to boot from the updater image. You should create an EXT2 filesystem on your USB disk and unzip the updater image onto it (again, assuming your disk is sda): |
|||
$ mkfs.ext2 /dev/sda1 |
|||
$ mount /dev/sda1 /mnt |
|||
$ cd /mnt |
|||
$ unzip ~/olpc193_A62.zip |
|||
$ cd / |
|||
$ umount /mnt |
|||
You can now insert the USB disk into your A-Test board, and it will boot Open Firmware, update the BIOS, update the NAND flash (anything you have stored on there will be destroyed), and reboot. If you now power off the machine and power it back on, it will boot from NAND. |
|||
(This is slow, so you may want to write the latest stable image to a USB disk and boot from that instead.) |
|||
The Linux-as-Bootloader BIOS found in linuxbios.rom can not boot from USB disks formatted with a Windows partition, which is why we used mkfs.ext2 in the last step. To have Open Firmware boot the ext2 partition, the filesystem label on the partition must also be ext2, which it won't be if the above was run on a Windows-formatted partition. We can fix this with fdisk: |
|||
$ fdisk /dev/sda |
|||
Command (m for help): <b>p</b> |
|||
... |
|||
/dev/sda1 1 993 492497 83 Linux |
|||
Command (m for help): <b>t</b> |
|||
Partition number (1-4): <b>1</b> |
|||
Hex code (Type L to list codes: <b>b</b> |
|||
Changed system type of partition 1 to b (W95 FAT32) |
|||
Command (m for help): <b>w</b> |
|||
The partition table has been altered! |
|||
(You can now boot the modified disk on the A-Test machine.) |
|||
===Continuing with an Installation=== |
===Continuing with an Installation=== |
||
If you installed the image onto a flash key or disk, and are happy to run |
|||
Read the release notes below as well. |
|||
off of that, guess what? You are running the OLPC Fedora distribution with |
|||
Sugar, and have nothing more to do. |
|||
If you want to install some other system, a full [[Fedora]] installation, |
|||
or install the image onto the internal |
|||
flash (which is quite slow, by the way; this is why we are building the CAFE chip), then you can follow the directions below. |
|||
===Continuing with a Full Fedora Core Installation=== |
===Continuing with a Full [[Fedora Core]] Installation=== |
||
The [[ |
The [[Installing Fedora Core]] page describes how to continue with a full [[Fedora]] installation, once you have installed LinuxBIOS, if the minimal OLPC installation is insufficient. |
||
===Continuing with a NAND flash installation=== |
===Continuing with a NAND flash installation=== |
||
The [[ |
The [[Installing to NAND]] page describes how to install a build image to the internal NAND flash on the board and boot from it. |
||
===Release Notes=== |
===Release Notes=== |
||
Line 210: | Line 256: | ||
* Installation directions: Mitch Bradley, Ivan Krstić, Jim Gettys, Chris Ball, Carl-Daniel Hailfinger |
* Installation directions: Mitch Bradley, Ivan Krstić, Jim Gettys, Chris Ball, Carl-Daniel Hailfinger |
||
* Official OLPC virgin (tester): Léandra King |
* Official OLPC virgin (tester): Léandra King |
||
[[Category:Hardware]] |
Latest revision as of 22:15, 4 October 2008
Around 2007, OLPC prototype boards switched to the awesome Open Firmware, and the latter is what ships on all XO-1 machines.
IntroductionThis page is mostly for ATest developers. BTest-1 developers should not update the firmware or they will lose valuable manufacturing data in the flash. New tools will be released soon. This procedure installs LinuxBIOS in the SPI flash of an OLPC development board, replacing the factory-installed Insyde BIOS if it's there. Insyde BIOS expired on Aug. 23, 2006. This process works by booting one of the OLPC build images, which include the utilities required for loading LinuxBIOS into the board's SPI flash. The build image can boot either under Insyde BIOS or under LinuxBIOS. Once the flash has been updated, you may optionally continue to install the build image to internal NAND flash, or install a full Fedora installation on a USB hard disk. Warnings
The OLPC LinuxBIOS Installation ProcedureBefore You BeginIf you have a UPS (uninterruptible power supply) handy, you should plug in your OLPC system to use it; you do not want to lose power part way through this operation. During the process of erasing and rewriting the SPI flash (which takes about a minute) you are vulnerable to power failures that could cause your hardware to become "bricked" (jargon for unusable). You need a USB key (or USB disk), an OLPC devel board with a powered USB 2.0 hub and a USB keyboard (important), and a Linux-based host system. Hardware Requirements - Details
Checking your DRAM typeOLPC ATest boards were shiped with DRAM from 3 different manufacturers. Hynix, PSC, and Infineon. The infineon RAMs are the wrong part. They are CL3 parts and the OLPC runs at CL2. Running the Infineon parts at CL2 can cause your board to fail to boot. The Geode does not have a setting for CL3 so there is no "safe" speed for the Infineon. However, after a reasonable ammount of analysis and testing we have found that the Infineon parts will operate at CL2.5 without problems. Therefore we provide 2 different LinuxBIOS images for upgrade. One that operates at CL2 and another at CL2.5. Your RAM can be identified by looking at the following picture: The 4 highlighted chips are the DRAM. The labeling on the Infineon chips looks like this: If your RAM matches the above then you need to use the CL2.5 version of the LinuxBIOS upgrade. Installing LinuxBIOSNewer builds : 175+http://olpc.download.redhat.com/olpc/streams/development/latest/ Find a source with which to confirm the checksum before flashing. For example: $ md5sum olpc-redhat-stream-development-ext3.img.bz2 c37b4fc8b9af3ec119b7f522fd66933c olpc-redhat-stream-development-ext3.img.bz2 Check that the checksums match the corresponding .md5 file! You don't want to flash garbage into your flash. You can use the md5sum utility on your Linux host system to do the check. Plug your USB key or disk into the host system, and verify that /dev/sda is its correct name (Alternative names for /dev/sda...). Make sure you do the verification, since SATA hard drives are becoming more common, so using the wrong device name here might overwrite your own hard drive! Now type the following, replacing /dev/sda with the appropriate device if needed: $ bunzip2 olpc-redhat-stream-development-ext3.img.bz2 $ dd bs=1M if=olpc-redhat-stream-development-ext3.img of=/dev/sda $ sync When the dd command finishes (it gives no progress indication, so wait until you return to the prompt!), run 'sync' as above, then move the USB key to the OLPC board (connect it via the powered USB 2.0 hub). If you have ddrescue installed you can use: ddrescue olpc-redhat-stream-development-ext3.img /dev/sda ddrescue has progress indication. If you are still using Insyde BIOS, you will likely have it complain that it has expired. Set the date back to sometime in the summer, for example, August 1, 2006. Boot the OLPC board (Boot sequence details...), and be sure to choose the second option in the green grub boot menu (don't accidentally boot the OLPC qemu target!). When it finishes booting, you should see the sugar login prompt. Press ctrl+alt+F1 to get to a console, and login as 'root' with no password. Now depending on what DRAM type you have you should flash in one of 2 different images. See Checking your DRAM type for help on figureing out what DRAM mfg you have. For Hynix and PSC DRAM use: $ olpcflash -r insyde.rom $ olpcflash --brick -w /var/lib/olpc/Olpc-Q2A53.rom (at the time of writing) For Infineon DRAM use: $ olpcflash -r insyde.rom $ olpcflash --brick -w /var/lib/olpc/Olpc-Q2A53_CL2.5.rom These take of order a minute each to execute. (Details of what olpcflash does...) If the flashing is successful, the last line of the output from the last command you executed above will be "- VERIFIED". If something went wrong, or verification failed, see #Disaster Recovery, and do not power cycle or reset the board. It is important to shutdown the system cleanly as LinuxBIOS is currently picky about finding a clean file system for boot. $ shutdown -h now At this point you MUST power cycle the board to make sure it is fully reset. If you do not then your PS/2 keyboard and mice will not work. Please unplug the board from the wall power wait 10 seconds and then reapply power. If all goes well and the machine eventually loads the Sugar login prompt after you've power cycled it, you can upgrade some more OLPC boards by repeating this procedure. This is the end of the procedure. The sections below contain additional information that may be useful if you have problems or are just curious. Troubleshooting and additional information for the curiousContinuing by upgrading to Open Firmware and the latest build imageIf you are trying to use the Autoreinstallation image, at this point you are ready to boot from the updater image. You should create an EXT2 filesystem on your USB disk and unzip the updater image onto it (again, assuming your disk is sda): $ mkfs.ext2 /dev/sda1 $ mount /dev/sda1 /mnt $ cd /mnt $ unzip ~/olpc193_A62.zip $ cd / $ umount /mnt You can now insert the USB disk into your A-Test board, and it will boot Open Firmware, update the BIOS, update the NAND flash (anything you have stored on there will be destroyed), and reboot. If you now power off the machine and power it back on, it will boot from NAND. (This is slow, so you may want to write the latest stable image to a USB disk and boot from that instead.) The Linux-as-Bootloader BIOS found in linuxbios.rom can not boot from USB disks formatted with a Windows partition, which is why we used mkfs.ext2 in the last step. To have Open Firmware boot the ext2 partition, the filesystem label on the partition must also be ext2, which it won't be if the above was run on a Windows-formatted partition. We can fix this with fdisk: $ fdisk /dev/sda Command (m for help): p ... /dev/sda1 1 993 492497 83 Linux Command (m for help): t Partition number (1-4): 1 Hex code (Type L to list codes: b Changed system type of partition 1 to b (W95 FAT32) Command (m for help): w The partition table has been altered! (You can now boot the modified disk on the A-Test machine.) Continuing with an InstallationIf you installed the image onto a flash key or disk, and are happy to run off of that, guess what? You are running the OLPC Fedora distribution with Sugar, and have nothing more to do. If you want to install some other system, a full Fedora installation, or install the image onto the internal flash (which is quite slow, by the way; this is why we are building the CAFE chip), then you can follow the directions below. Continuing with a Full Fedora Core InstallationThe Installing Fedora Core page describes how to continue with a full Fedora installation, once you have installed LinuxBIOS, if the minimal OLPC installation is insufficient. Continuing with a NAND flash installationThe Installing to NAND page describes how to install a build image to the internal NAND flash on the board and boot from it. Release Notes
Linux USB drive device namesOn many Linux systems, USB mass storage devices (e.g. USB key drives) have device names like /dev/sda, /dev/sdb, etc. Those are the same names that are used for SCSI disks, because USB mass storage devices use SCSI-like commands at one level of their software protocol. In the common case where there is only one USB key drive and no "real" SCSI hard disks, the device name will be /dev/sda. If there are multiple USB mass storage devices or some SCSI hard disks, the USB key might be /dev/sda, /dev/sdb, /dev/sdc, etc. Make sure that you find the right one, because you don't want to overwrite the wrong drive. On some Linux systems, USB mass storage devices have names like /dev/uba, /dev/ubb, etc. ("ub" instead of "sd"). Boot sequence detailsThis section describes what you should see while the OS image is booting under Insyde BIOS. A few seconds after power on, the white Insyde BIOS banner screen will appear. A little later, the top of that screen will show the results of USB probing. Those results should include your USB key. Then the screen will switch to white text on a black background. Eventually it will boot GRUB (the intermediate bootloader). After a brief timeout, GRUB will then start Linux. When Linux takes control of the screen, the font size will decrease and you'll see a lot of Linux startup messages. X should start, showing a login prompt in a window titled 'Sugar'. At this point, you can press ctrl+alt+F1 to see a login shell. olpcflash detailsThe steps that occurs during the execution of the instructions above are as follows.
Disaster RecoveryIf the reflashing process fails, Don't power off or reset the OLPC board. Here are some things you can try that might be helpful. These are just suggestions, because I've never seen any failures - recovery procedures for hypothetical failures are inherently speculative. Retrying the write commandYou can retry the command that writes the SPI FLASH, i.e. $ olpcflash -w /var/lib/olpc/linuxbios.rom Retrying might conceivably be of some use if the failure was transient. Restoring Insyde BIOSYou might be able to restore the Insyde BIOS with $ olpcflash -w insyde.rom This only works if you haven't powered off or otherwise reset the OLPC board since you loaded LinuxBIOS into FLASH. The reason is because LinuxBIOS cannot boot the software that we use in this procedure, which is set up to be booted by Insyde BIOS. If something went wrong with the olpcflash process, it's possible - perhaps even likely that the same problem might also affect writing the insyde.rom back. So don't expect miracles; this is suggested "just in case it helps". It might help, for example, if the flash has a single bit error that Insyde BIOS's code has happened to hide. ("olpcflash -w insyde.rom" was helpful in the testing of this procedure, allowing me to test the procedure several times before committing to the "one way" nature of the upgrade.) If you are still having troubleDon't power off or reset the OLPC board and please get in contact with us, on IRC or via email, so that we have a chance to see what has gone wrong. If you power off or reset the board, we will have no way to diagnose the problem short of returning the board to OLPC and time consuming hardware diagnosis, and even then, may not be able to figure out what went wrong. Using Windows as a Host Systemhttp://www.chrysocome.net/dd has a version of the "dd" command that runs under Windows. The command line arguments are compatible with the Linux version, but you have to use the Windows form of the USB device name (not /dev/sda). The Windows "dd" has a "--list" command to help you discover the right device name. Credits
|