Personal tools
You are here: Home Embedded gumstix Getting started
Document Actions

Getting started

by cmadonna last modified 2007-10-08 15:05

Contents

Installation

Buildroot

Obtain a buildroot

  • To check out the current revision of the Buildroot, enter the following on your development host:
svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot
  • If you want to get a specific revision XXX, use
svn co -rXXX http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

Create filesystem image

  • initial Buildroot configuration
cd gumstix-buildroot
make defconfig
  • To configure buildroot
make menuconfig
  • To build it
make
  • If it succeeds, the build will end with a line describing new root filesystem - rootfs.arm_nofpu.jffs2.

Recompile the Linux kernel

  • To configure kernel
cd <gumstix-buildroot>/build_arm_nofpu/linux-<the version of linux you're using>
make ARCH=arm CROSS_COMPILE=`pwd`/../staging_dir/bin/arm-linux- menuconfig
  • To create modules
make ARCH=arm CROSS_COMPILE=`pwd`/../staging_dir/bin/arm-linux-
  • To recompile the Linux kernel
cd <gumstix-builtroot>
make

Replace the filesystem image

using image from the host

  • Connect to the gumstix using kermit
kermit
connect
  • Turn on or reboot the Gumstix and press any key to stop booting and access uboot
  • Tell it to receive a file:
loadb a2000000
  • Ctrl-backslash and then c and then
send rootfs.arm_nofpu.jffs2
  • To erase the old filesystem
protect on 1:0-1
erase all
  • Commit your new filesystem to flash
cp.b a2000000 40000 ${filesize}
  • Boot directly into the new filesystem
boot

using image from MMC

  • Download image to the MMC and name it root_fs_arm
  • Follow first two steps from above and then
mmcinit
fatload mmc 1 a2000000 root_fs_arm
era 1:2-31
cp.b a2000000 40000 ${filesize}
boot

(era 1:2-31 = protect on 1:0-1 and then erase all)

Cross-compilation

Omniorb

(4.0.7 - latest version compatible with Tango) - download here

omniORB compiling is unfortunately a bootstrapped process. First it builds omniidl and then uses it to build the rest of omniorb. Of course, in case of x86->ARM compiling, all binaries (e.g. _omniidlmodule.so.1.0) are for ARM platform and you can't directly execute them. How to solve that problem:

1. configure for ARM:

$ make clean
$ ./configure CC=arm-linux-gcc CXX=arm-linux-g++
--prefix=/home/lslezak/omniorb
--host=arm-linux
--build=i386-linux

2. build x86->ARM omnicpp:

$ make CC=gcc -C src/tool/omniidl/cxx/cccp

3. build x86->ARM omniidl:

$ make CXX=g++ -C src/tool/omniidl/cxx

4. build rest of omniorb:

$ make 
$ make install

Tango

Latest release (5.5.2) can be downloaded here

1. configure

$ ./configure --prefix=/home/lslezak/tango 
-host=arm-linux -build=i386-linux
--with-omni=/home/lslezak/omniorb
CC=arm-linux-gcc CXX=arm-linux-g++
LDFLAGS="-L/home/lslezak/omniorb/lib"
--without-zlib

All we need to cross-compile any Tango device server are just liblog4tango and libtango cross-compiled libraries

2. build lib/

$ cd lib/
$ make
$ make install

Simple device server

1. add cross-compiled libraries to the Makefile
2. undefined reference to 'round' - arm libraries don't have round function implemented. The simplest solution is to add such a function to a device server class, i.e:

double round (double x) {
int x_int = (int)(x+0.5);
return(x_int);
}

3. undefined reference to i.e. CORBA::Fixed::~Fixed(). Some libraries have to be linked before others, so to be sure all dependencies are resolved it's enough to add $(LFLAGS) twice in the Makefile

References

  1. http://docwiki.gumstix.org/Buildroot
  2. http://docwiki.gumstix.org/Replacing_the_filesystem_image
  3. http://www.cs.gmu.edu/~eclab/projects/robots/flockbots/pmwiki.php?n=Main.Gumstix


Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: