Verdex Pro SVN repository

This technique relies on OpenEmbedded and Bitbake so all pages related to these tools apply here. As this Verdex Pro repository is a bit older, some terminalogy has changes (e.g. ''packages'' has become ''recipes'').

Note: If you are using an Ubuntu distribution, it is likely that /bin/sh is linked to /bin/dash. If this is the case, then you will need to change /bin/sh to link to /bin/bash. Neglecting to do this will cause file corruption and your build image will not boot! Run "sudo dpkg-reconfigure dash" and answer no when asked whether you want to install dash as /bin/sh.

First you'll want to check out the source files for Gumstix OE. You should have at least 10GB 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. Occassionaly you may even want to do experimental work under a seperate 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

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 sytem 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:

C-Kermit> take ~/gumstix/gumstix-oe/extras/kermit-setup
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://cumulus.gumstix.org/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