DebXO: Difference between revisions

From OLPC
Jump to navigation Jump to search
(added link to latest images)
(upgrading firmware is only necessary if running from nand)
Line 57: Line 57:
: Question - do you really need a devkey to run it from SD/SB? --SJ
: Question - do you really need a devkey to run it from SD/SB? --SJ


To install the DebXO release, you also need to be running [[Open Firmware]] release Q2E20 or later (see [[How to check the OS and firmware versions]]).
To install the DebXO release onto NAND flash, you also need to be running [[Open Firmware]] release Q2E20 or later (see [[How to check the OS and firmware versions]]). If running DebXO from an SD card or USB stick, upgrading the firmware should not be necessary.
The q2d* series do not support <tt>update-nand</tt>, and versions q2e18 and q2e19 are known to be buggy
The q2d* series do not support <tt>update-nand</tt>, and versions q2e18 and q2e19 are known to be buggy
with partitions. Firmware and instructions for upgrading are at [[Firmware]]. You'll need a developer key, or to disable security as above, merely to reflash your firmware, too.
with partitions. Firmware and instructions for upgrading are at [[Firmware]]. You'll need a developer key, or to disable security as above, merely to reflash your firmware, too.

Revision as of 03:52, 19 November 2008

From Andres Solomon's "debxo.2 release" post to devel at laptop.org

DebXO is a set of OS images of the Debian Linux distribution that you can run on your XO.

Latest images

The latest release (described below) can be found at http://lunge.mit.edu/~dilinger/debxo-latest . See the Installation section below for instructions on using these images.

New features in DebXO 0.3

This is a (mostly) bugfix release of DebXO. There was a nasty bug related to JFFS2 and kernel upgrades in 0.2; this release fixes it.

Note that there's a known bug on first boot with the gnome install on JFFS2. A warning will pop up due to dbus not starting quickly enough. This can safely be ignored, and shouldn't adversely affect anything.


Changes

  • Disable LZO compression in the JFFS2 driver. This was causing machines to fail to boot after upgrading the kernel. If you're still running DebXO 0.2 on the nand, do not upgrade the kernel. Instead, reflashing is recommended.
  • A new 'base' desktop has been added. This is a minimal install, with no graphics or X at all. It's good for rescue situations, or where you have a local package mirror and don't want to waste bandwidth downloading a graphical desktop image.
  • Some programs (including kde and gnome's logout/reboot functions) had problems in previous releases due to lack of loopback interface (oops). Thanks to James Cameron for spotting this. 0.3 sets up 'lo' properly.
  • Custom DebXO packages are put on hold; this means you can safely entery apt-get dist-upgrade without having to fear things like initramfs-tools being upgraded.
  • JFFS2 images uses DOS 8.3 filenames. This is primarily to ensure that when running update-nand disk:\gnome.img using a USB flash drive that's been formatted using vfat, OFW won't complain about not being able to find the gnome.dat file. As such, the JFFS2 images are named with their desktop names — awesome.img</tt, kde.img, etc. EXT3 images still retain the old naming scheme.
  • James Cameron added a script that is capable of creating an auto-install USB key (onto nand).
  • A debxo-latest symlink now points to the latest release. Please use that in wiki/doc pages for download links.

Other changes can be seen at: http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=summary

New features in DebXO 0.2

  • The JFFS2 images now have partition support. While this shaves a number of seconds off of the boot time, we can take better advantage of it in the future (doing things like using UBIFS). JFFS2 is well past its prime; moving away from it will help performance a lot.
  • EXT3 images are available. This allows for booting off of USB and/or SD. Note that the image size I chose is 2GB, so you'll need a USB flash drive or SD card of at least that size.
  • The kernel is now almost completely modular, and includes every module under the sun. For those of you with random USB hardware that wanted to use it with DebXO.. if it's in 2.6.25, it should work with DebXO.
  • New desktops! DebXO 0.1 only had a Gnome desktop; this release includes options for KDE, LXDE, Sugar, Awesome and Gnome desktops. I personally run (and work on) the Gnome desktop. Holger Levsen is to thank for the Sugar and Awesome desktops. James Cameron did the work for the KDE and LXDE desktops. A huge thanks to both of them!

As far as bootup times, nand is still pretty absymal (due to jffs2); however, SD booting takes 75 seconds from OFW to fully usable X.

Installation

Prerequisites

You need a developer key to run this release! Not only that, but the DRM system in the XO was designed only for Sugar; it will make your life miserable unless you totally turn it off. Jailbreaking the XO involves not just getting a developer key, but also using the developer key to interrupt the Open Firmware boot process (with the ESC key in the upper left corner of the keyboard), then typing "disable-security". When the quote-unquote "security" (i.e. DRM) is disabled, you won't NEED a developer key, which means when you reflash your machine and unplug your USB memory stick, the system will actually boot Debian rather than giving you a "Sad Face" that tells you that you can only run OLPC-Inc-approved-and-signed software in your (YOUR!) computer. More details are at the Activation and developer keys page.

Question - do you really need a devkey to run it from SD/SB? --SJ

To install the DebXO release onto NAND flash, you also need to be running Open Firmware release Q2E20 or later (see How to check the OS and firmware versions). If running DebXO from an SD card or USB stick, upgrading the firmware should not be necessary. The q2d* series do not support update-nand, and versions q2e18 and q2e19 are known to be buggy with partitions. Firmware and instructions for upgrading are at Firmware. You'll need a developer key, or to disable security as above, merely to reflash your firmware, too.

Installation onto the XO's build-in NAND flash memory

The release can be found at http://lunge.mit.edu/~dilinger/debxo-0.2/images/

To install onto the XO's flash, download the debxo-$DESKTOP.jffs2.dat and debxo-$DESKTOP.jffs2.img files to a USB or SD stick (where $DESKTOP is one of the various desktops - gnome, kde, lxde, sugar, or awesome). Boot into Open Firmware (make sure your XO is unlocked!), and run

 update-nand disk:\debxo-$DESKTOP.jffs2.img

or

 update-nand sd:\debxo-$DESKTOP.jffs2.img

(depending upon whether you downloaded to an SD or USB disk). If your SD or USB device is using a windows filesystem, you can figure out the name of the image by running

 dir disk:\

If update-nand spits out any errors, make sure you're running an appropriately up-to-date version of OFW.

Installation onto SD/USB

To install onto an SD or USB device, download the debxo-$DESKTOP.ext3.img.gz file, and run

 zcat debxo-$DESKTOP.ext3.img.gz > /dev/mmcblk0

or

 zcat debxo-$DESKTOP.ext3.img.gz > /dev/sdX

(depending upon whether you're writing to an SD or USB disk). Note that this will overwrite any data that is on the SD or USB disk.


Usage

By default, a user 'olpc' is created (with no password, and sudo access). Some desktops automatically start a display manager and log you in; some do not. The root password is disabled by default. This is a stock Debian Lenny system with only a few modifications, so it can obviously be tailored.


Hacking

xodist is the name of the collection of scripts that are used to produce DebXO. The git repository can be downloaded via:

 git clone git://lunge.mit.edu/git/xodist

There's also a web interface to that:

 http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=summary

There's a TODO file in the repository, but really... just scratch whatever itch you happen to have. Patches are much appreciated. Additional desktops (XFCE, for example?), better handling of the default user/password, boot/runtime optimizations, suggestions for missing packages, etc.

Updating

The apt package manager command should Just Work for the majority of the distribution, but there are three custom packages:

  • ofw-config (which manages /boot/olpc.fth)
  • linux-2.6.25.15 (which manages the kernel)
  • initramfs-tools (which manages the initramfs/initrd)

ofw-config and linux-2.6.25.15 should never be automatically upgraded (since ofw-config isn't in debian and debian's kernel package is called linux-image-2.6.25-X), but initramfs-tools might be. The customizations to initramfs-tools basically ensure certain modules get added to the initrd and loaded; redboot, jffs2, lxfb, and so on. Those patches should make it into the next debian release (after "lenny").

In short, be very careful with the initramfs-tools package; don't upgrade it. The next DebXO release may have its custom packages simply backported, rather than completely outside of debian.

If you want to put these three package on hold, so that they won't be upgraded, enter the following commands in a terminal:

 for pkg in ofw-config linux-2.6.25.15 initramfs-tools ; do 
   echo $pkg hold | dpkg --set-selections
 done

To remove the hold:

 for pkg in ofw-config linux-2.6.25.15 initramfs-tools ; do 
   echo $pkg install | dpkg --set-selections
 done

Upgrading the kernel

As far as upgrading the kernel, it depends on how it's built. Note that /boot/olpc.fth uses /vmlinuz and /vmlinuz.old symlinks, so make sure that they're pointed to the correct image after you've upgraded. If you're building a custom kernel and everything's modular, you need to make sure the initramfs-tools hasn't been upgraded. If you're building the modules needed to boot (cafe_nand, redboot, jffs2) statically into the kernel, the initramfs-tools package can mostly be ignored.

Credits

Thanks to James Cameron and Holger Levsen for various patches/tweaks/fixes, and to the various people who tested and provided feedback.

See also