# Installing the build environment

The main instructions are on the gumstix.net wiki, but that page has several details that are now obsolete. Here are the steps I did:

mkdir ~/gumstix
cd ~/gumstix
svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe
cat gumstix-oe/extras/profile >> .bashrc
. .bashrc


gcc-4.3 gives a lot of errors, but gcc-4.1 works so far There is a problem documented here about duplicate getline functions.

Then to set up a cross-compilation environment:

bitbake gcc-cross

Note
It fails if there are any error messages so follow all the installation requests until it starts saying it is "Handling BitBake files"...
preferred version 2.5 of glibc not available (for item virtual/arm-angstrom-linux-gnueabi-libc-for-gcc)


You need to install Pysco

svn co http://codespeak.net/svn/psyco/dist/ psyco-dist

To make an image to burn onto the gumstix use:

bitbake gumstix-basic-image


where "gumstix-basic-image" is a recipe from the directory gumstix-oe/com.gumstix.collection/packages/images/

The cross-compiler binaries can be found in:

gumstix-oe/tmp/cross/bin/arm-angstrom-linux-gnueabi-*


# Compiling

## To set up build environment

source  ~/gumstix/gumstix-oe/extras/profile


Executables for cross-compiling are stored in:

/home/brian/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin


And the PATH can be set with:

PATH=$PATH:/home/brian/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin  ## To compile arm-angstrom-linux-gnueabi-g++ cgi.cpp vfatregister.cpp vfatedit.cpp vfati2c.cpp -o vfat$i.cgi -lcgicc


And if you need to link against cgicc (for web interfaces) add both of the arguments

-I/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3
-L/home/brian/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/libcgicc-3.2.3-r0/cgicc-3.2.3/cgicc/.libs


# Flashing the gumstix

## Serial Com using Macbook USB

I was able to use the USB port of my Macbook pro to communicate with the Gumstix using a USB to serial cable and a serial adapter plugged into the gumstix board.

Minicom and the Virtual comport driver were two pieces of software I needed to install on the Macbook.

The first software was a Virtual COM port driver available at

after installing I restarted the Macbook and found the following file had been installed