These are step-by-step instructions on how to set up a chroot environment for the OM toolchain to live in. They work by setting up Debian Sid chroot and installing the toolchain there. The reason you might want to use the toolchain this way is to avoid various distro-specific issues. For example, I couldn't make the toolchain work on either Ubuntu or Gentoo, on each system the autotools choke in a different, undecypherable way. In Debian I saw no such issues. Also, installing into chroot keeps the toolchain in a separate environment. You system configuration doesn't interfere with the toolchain and vice versa. For the basic install "debootstrap" is used here. The tool can be easily installed in Debian or Ubuntu (apt-get install debootstrap, or sudo apt-get install debootstrap). For non-debian systems... Use google. There are .rpm packages of debootstrap. If you don't manage to get deboostrap working on your system or just don't want to bother, use a debian system to make the initial chroot environment, then any distro (provided the architecure is compatible) should be able to use it. What follows is a script-like guide, but it's *not* a real script, just follow the steps. This was tested on an Ubuntu 8.10 box. ======================== # You must do this as root, so su or sudo -i first. # Of course, watch out for your "steps", when you're root. # Pick a target directory for the chroot. CHROOT=/share/debian-chroot # Install basic debian sid chroot. mkdir -p $CHROOT debootstrap sid $CHROOT http://ftp.cz.debian.org/debian # Install hosts file cp /etc/hosts $CHROOT/etc/ # Create a script to enter the chroot Create a text file debian-chroot.sh with the following content: =========== #!/bin/bash CHROOT=/share/debian-chroot # The path you have chosen. mount | grep -q "$CHROOT" || mount proc -t proc "$CHROOT/proc" chroot "$CHROOT" /bin/bash =========== # Make it executable chmod +x debian-chroot.sh # Test it and enter the chroot ./debian-chroot.sh # You should be now logged in as root inside the newly installed debian system. # Verify for example by ls /home. You should see no user home dirs. # Make apt happy. :) apt-get update # Install needed packages. apt-get install build-essential ccache autoconf automake autotools-dev \ libtool gettext intltool curl uboot-mkimage mtools fakeroot alien check \ libglib2.0-dev libxrender-dev libgconf2-dev # Install optional (and suggested:) packages. apt-get install less mc update-alternatives --set editor /usr/bin/mcedit-debian # If you so choose... :) # Download and install the toolchain # Use openmoko-i686-arm-linux-gnueabi-toolchain.tar.bz2 if that's your arch. wget http://downloads.openmoko.org/toolchains/openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2 cd /; tar xjvf ~/openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2 rm ~/openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2 # Create a non-root account adduser user # Switch to user su - user # Set profile so that the toolchain is always used echo ". /usr/local/openmoko/arm/setup-env" >> ~/.profile # Test & load new profile exit su - user # Prepare and build the example mkdir source cd source cp -r /usr/local/openmoko/source/openmoko-sample2 . om-conf openmoko-sample2 cd openmoko-sample2 make # Ideally no errors would be spat on the screen. # You should be (basically) ready to go. # Use the debian-chroot.sh script to enter the chroot again, then if you want # to compile stuff, do a su - user first. If you want to update the toolchain, # stay as root (inside the chroot) and follow the wiki. # Good luck! :)