Gumstix Verdex Buildroot Instructions

This build method is no longer current as the Gumstix now builds using OpenEmbedded. This now remains as a reference for legacy systems.

These instructions are meant for compiling the buildroot for the intel PXA270 microprocessor found on the Gumstix Verdex line of motherboards. I am compiling on a CentOS 5 but any linux operating system would do. For more information visit theGumstix site.

WARNING: These instructions have not been fully tested and are not yet complete. Use at your own risk. There is a high possibility you will brick your Gumstix motherboard if you do not know what you are doing.

First you’ll want to check out the source files for Gumstix OE. You should have at least 12GB of free space on your hard drive. With a typical DSL connection this step should take about 20 minutes:

mkdir ~/gumstix
cd ~/gumstix; 
svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe

Gumstix OE requires some environment setup in order to function properly. It is most convenient to set this up via your bash profile:

cat gumstix-oe/extras/profile >> ~/.bashrc

As part of the build process Gumstix OE downloads source code tarballs for the linux kernel and other software packages. This next step sets up a global system cache for these tarballs so that they only need to be downloaded once. Setting up a global cache may seem like a lot of trouble for a single user system, but it is often quite useful to set up an autobuilder that runs as a cron job under a separate user account. Occasionally you may even want to do experimental work under a separate user account. Setting this up now will save you disk space and download time later.

On most systems you will need to have root privileges for this step. The process below uses sudo, if your current user is not in the sudoers file you will get an error message. If this happens, use su and enter the root password before issuing the commands below (minus the leading sudo of course).

sudo groupadd oe 
sudo usermod -a -G oe your_username 
sudo mkdir /usr/share/sources 
sudo chgrp oe /usr/share/sources 
sudo chmod 0775 /usr/share/sources
sudo chmod ug+s /usr/share/sources

If you would like a quick and dirty automated install you may use the following script. This is not a production or official install script. It could be very likely that everything goes wrong and blows up some server mainframe if you use this. As with the rest of this page, I have released this information with the best of intentions, please use caution when executing scripts from the internet.

It can be downloaded here or viewed below:

# OPENEMBEDDED INSTALLATION SCRIPT
# Created by: Patrick Glass
# Date Modified: March 17, 2008
#
#
#
echo "Updating your Linux system..."
export PATH=$PATH:/usr/sbin
echo "This should take about 15 minutes and will download ~500MB"
# Download some extra repo info
sudo wget --tries=1 --output-document=/etc/yum.repos.d/kbsingh-CentOS-Extras.repo swisstech.ca/gumstix/kbsingh-CentOS-Extras.repo
sudo rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
#
cd ~/
wget --tries=1 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
sudo rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
#
#
sudo yum install subversion python-sqlite2 sqlite3 gcc diffstat texihtml makeinfo cvs help2man devel-core diffstat texi2html cvs subversion git texinfo psyco monotone python-devel python-encodings python-sqlite gettext-devel gettext-tools perl-Locale-gettext gcc-c++
sudo yum update
#
#
echo "Downloading the latest OpenEmbedded Gumstix Version..."
echo "This may take up to 20 minutes!"
svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk ~/gumstix/gumstix-oe/
#
#
echo "What is your username?"
read USER_NAME
sudo groupadd oe
sudo usermod -a -G oe $USER_NAME
sudo mkdir /usr/share/sources
sudo chgrp oe /usr/share/sources
sudo chmod 0775 /usr/share/sources
sudo chmod ug+s /usr/share/sources
#
#
cat ~/gumstix/gumstix-oe/extras/profile >> ~/.bashrc
#
#
wget http://ftp.gnu.org/gnu/help2man/help2man-1.36.4.tar.gz
tar -xzvf help2man*
cd help2man*
./configure
make
sudo make install
#
#
echo "OpenEmbedded Install Complete!"
echo "Type 'bitbake gumstix-basic-image' to compile image"
echo "Press any key to exit."
read END_VAR
#
# END OF SHELL SCRIPT

Now log out/log in or close your terminal window and open a new one so that the environment changes you enabled above will take effect. Alternatively, you could source extras/profile from the command line.

The build system is set up to build for verdex by default. If you want to build for connex or basix you will need to edit ~/gumstix/gumstix-oe/build/conf/auto.conf. Comment out the line that selects verdex and uncomment the line that selects connex.

To build a basic root file system image that includes Linux 2.6.21, boa, cron, and ntp:

bitbake gumstix-basic-image

If your build machine is missing any essential packages, bitbake will notify you about them at this point. Install the recommended packages and try the bitbake command again.

You will also get a message from bitbake suggesting that you install the psyco JIT compiler for better perfomance. It isn’t necessary to install psyco right now, though it is a good idea to install it at some point.

You may also notice another message complaining about not finding user.collection/packages/*/*.bb. Don’t concern yourself with this — you will create this directory later when you create your first package for your own code.

This initial build will take a bit of time since it will need to download all the source code. When it completes, you will find the root file system image and the kernel image in ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex(or connex if that is the machine type you selected):

ls -1 ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/ Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20071101-gumstix-custom-verdex.rootfs.jffs2 gumstix-basic-image-gumstix-custom-verdex.jffs2 modules-2.6.22-r1-gumstix-custom-verdex.tgz uImage-2.6.22-r1-gumstix-custom-verdex.bin

You’ll notice that there appear to be 2 jffs2 images above. However, in reality there is just one: gumstix-basic-image-gumstix-custom-verdex.jffs2 is a link to the actual image, Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20071101-gumstix-customverdex.rootfs.jffs2

The “shorter” link name saves typing 🙂 Your file names may differ slightly from the above since some of them are time-stamped or versioned.

At this point we are ready to update our gumstix with the root file system and kernel that we just built.

First establish a serial connection to your gumstix by launching kermit (the below assumes you are using a USB – serial converter, adjust as necessary)

kermit -l /dev/ttyUSB0

Now set up the serial connection parameters and connect to the gumstix using the setup file:

C-Kermit> take ~/gumstix/gumstix-oe/extras/kermit-setup C-Kermit> connect

OR Setting up kermit connection parameters manually:

C-Kermit> kermit -l /dev/ttyS0 C-Kermit> set speed 115200 C-Kermit> set reliable C-Kermit> fast C-Kermit> set carrier-watch off C-Kermit> set flow-control none C-Kermit> set prefixing all C-Kermit> set file type bin C-Kermit> set rec pack 4096 C-Kermit> set send pack 4096 C-Kermit> set widow 5 C-Kermit> connect

Tip: Kermit’s tab command completion is your friend. Use it to help take the sting out of long path names.

Reboot your gumstix, hit any key to stop the autoboot process and drop into U-Boot. At this point you should verify that your U-Boot version is 1.2.0. If it is not, then you will need to read the section on Updating U-Boot.

NOTE: At the moment gumstix-oe does not yet build U-Boot. If you need to update U-Boot you can find pre-built uboot binaries at:

http://www.gumstix.net/feeds/u-boot

Now we are ready to transfer our new root file system to gumstix RAM, protect the 2 boot sectors, erase the rest of flash, and then finally program the flash.

GUM> loadb a2000000 C-Kermit> cd ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/ C-Kermit> send gumstix-basic-image-gumstix-custom-verdex.jffs2 C-Kermit> connect GUM> protect on 1:0-1 GUM> erase all GUM> cp.b a2000000 40000 ${filesize}

Since the Linux kernel resides in its own partition, our final step is to transfer the kernel uImage to gumstix RAM and then finally to flash (don’t forget to adjust the filename if needed):

GUM> loadb a2000000 C-Kermit> send uImage-2.6.21-r1-gumstix-custom-verdex.bin C-Kermit> connect GUM> katinstall 100000 GUM> katload 100000 GUM> bootm