DebXO

From OLPC
Revision as of 18:51, 19 November 2008 by Dilinger (talk | contribs) (→‎Hacking: mention the #debxo channel)
Jump to navigation Jump to search

DebXO is a set of OS images of the Debian Linux distribution that you can run on your XO. It is maintained by Andres Salomon; bug reports should be sent to dilinger@queued.net

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/changes in DebXO 0.4

  • Gnome improvements: the battery applet shows up properly, GUI apps that require root access (ie, the stuff in System->Administration) should launch properly despite lack of a password, auto-mounting of SD and USB keys is now enabled.
  • A new geode Xorg driver (2.11) is included. This fixes font issues with a number of applications, and things simply look better. With 0.3, the default fonts in LXDE looked terrible; in 0.4, this is no longer the case. Applications like NetSurf (where font size cannot be overridden) are now usable.
  • Better hardware support; the MIC LED no longer is on by default, the ALSA driver saw a bunch of updates, and the gamekeys now work. I've mapped the gamekeys to scroll on the right, and support pageup/pagedown on the left. This could change later on, depending upon feedback and what HAL ends up accepting upstream. The brightness and sound adjustment keys on the keyboard now work.

New features/changes in DebXO 0.3

  • 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.

New features/changes 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!

Known bugs

  • When running DebXO off the NAND, every once in a while the machine will fail to boot (display CRC Node errors). It's not a critical error, and a reboot should fix it. It's been there all along, as some people have seen. It's still unclear whether it's a jffs2 bug or a cafe_nand bug.
  • Power management has not really been worked on. It's in the roadmap for 0.5.

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 NAND images can be found at http://lunge.mit.edu/~dilinger/debxo-latest/images/jffs2/

To install onto the XO's flash, download the $DESKTOP.dat and $DESKTOP.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:\$DESKTOP.img

or

 update-nand sd:\$DESKTOP.img

(depending upon whether you downloaded to an SD or USB 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

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

To install onto an SD or USB device, download the debxo-$DESKTOP.ext3.img.gz file (where $DESKTOP is one of the various desktops - gnome, kde, lxde, sugar, or awesome), 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

Help is always appreciated. The roadmap for future releases can be found here:

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

Development discussions happen on IRC as well, on irc.oftc.net in #DebXO.

Updating

The apt package manager command should Just Work for the majority of the distribution, but there are three custom packages that are put on hold by default:

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

They will never be automatically upgraded. Later DebXO releases may have their custom packages simply backported, but for right now these are put on hold. Taking them off hold is not recommended unless you know what you are doing.

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

There are a number of contributors; see http://lunge.mit.edu/cgi-bin/gitweb.cgi?p=xodist;a=summary for the list of committers. Thanks to all of them, as well as the people who've tested and provided feedback.

See also