Der Inhalt dieser Seite ist Teil einer Dokumentation, die ich in Englisch angefertigt habe, sobald ich die Zeit finde, werde ich sie übersetzen.
Most important starting point is the Gumstix-Wiki.
Also quite helpful is the gumstix-user mailinglist archive.
Most of this description is based on/tested with buildroot Revision 1585.

Buildroot

Minimum required debian packages:
aptitude install build-essential libncurses5-dev bison flex texinfo gettext autoconf zlib1g-dev libssl-dev subversion
The buildroot can be obtained via:
svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot
Once you have downloaded the buildroot, 'cd' into the newly created gumstix-buildroot directory and run
make defconfig
You might be asked to choose the desired target platform during the process, so select the xscale CPU (#11) at 400MHz clock frequency for connex boards (verdex is iwmmxt (#12) with 400MHz or 600MHz). Now run
make
and wait for some time. Then wait for some more time. If the process finishes successfully, your buildroot is done and you are ready to go.
After successfully building the default image you can start modifying the buildroot and e.g. add additional packages:
make menuconfig
make

Kernel

Kernel Reconfiguration and Image Rebuilding:
cd <gumstix-buildroot>
cd build_arm_nofpu/linux-2.6.21gum
make ARCH=arm menuconfig              # now make your customization like e.g. adding the pwc module
rm arch/arm/boot/compressed/vmlinux
cd <gumstix-buildroot>
make

BusyBox

Busybox Reconfiguration and Image Rebuilding:
cd <gumstix-buildroot>
cd build_arm_nofpu/busybox-1.1.2
make ARCH=arm menuconfig
cd <gumstix-buildroot>
rm build_arm_nofpu/root/bin/busybox
make

Java

To use the latest version of GNU Classpath (0.96.1) and JamVM (1.5.0) edit package/jamvm/jamvm.mk and package/classpath/classpath.mk according to the new version (..._SOURCE and ..._DIR).
For GNU classpath 0.96.1 additionally edit package/classpath/classpath.mk: after --disable-gtk-peer add:
--disable-gconf-peer \
--disable-plugin \
Also disable the classpath-floats.patch e.g. by renaming it to classpath-floats.patch090.
Successfully compiled with sun-java-6u3.

add packages

To add additional packages to the buildroot you just need to provide a Makefile and a buildroot-config-file and add the package to package/Config.in.
cd <gumstix-buildroot>/package
mkdir <package-name>
vi <package-name>/Config.in          # this is for menuconfig 'content'
vi <package-name>/<package-name>.mk  # the actual Makefile with suited configure and compile and install
vi Config.in                         # this is for being visible in menuconfig

add streamer from xawtv

Configure requires ncurses and jpeg, so enable it in the buildroot's packages list and run 'make'.

package/xawtv/Config.in
config BR2_PACKAGE_XAWTV
        bool "xawtv"
        default n
        depends on BR2_PACKAGE_NCURSES && BR2_PACKAGE_JPEG
        help
          xawtv is a small suite of video4linux related software, 
          with video recording capabilities and several useful 
          command line tools.

          This package only compiles console/streamer and plugins.

          http://linux.bytesex.org/xawtv/

package/xawtv/xawtv.mk (Careful: make is very picky if you use spaces instead of a tab)
#############################################################
#
# xawtv - streamer 
#
#############################################################
XAWTV_VERSION:=3.95
XAWTV_SOURCE:=xawtv-$(XAWTV_VERSION).tar.gz
XAWTV_SITE:=http://dl.bytesex.org/releases/xawtv
XAWTV_DIR:=$(BUILD_DIR)/xawtv-$(XAWTV_VERSION)
STREAMER_SUBDIR:=console
STREAMER_BINARY:=streamer
STREAMER_TARGET_BINARY:=usr/bin/streamer
PLUGINS_SUBDIR:=libng/plugins
PLUGINS_TARGET:=usr/lib/xawtv

$(DL_DIR)/$(XAWTV_SOURCE):
	$(WGET) -P $(DL_DIR) $(XAWTV_SITE)/$(XAWTV_SOURCE)

$(XAWTV_DIR)/.source: $(DL_DIR)/$(XAWTV_SOURCE)
	zcat $(DL_DIR)/$(XAWTV_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	touch $@

$(XAWTV_DIR)/.configured: $(XAWTV_DIR)/.source
	(cd $(XAWTV_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--sysconfdir=/etc \
		--disable-xfree-ext \
		--disable-xvideo \
		--disable-lirc \
		--disable-quicktime \
		--disable-motif \
		--disable-aa \
		--disable-zvbi \
		--disable-gl \
		--disable-xft \
	; patch -i ../../package/xawtv/gumstix-buildroot.diff \
	)
	touch $@

$(XAWTV_DIR)/$(STREAMER_SUBDIR)/$(STREAMER_BINARY): $(XAWTV_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(STREAMER_SUBDIR)/$(STREAMER_BINARY)

$(XAWTV_DIR)/$(PLUGINS_SUBDIR): $(XAWTV_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/flt-gamma.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/flt-invert.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/flt-disor.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/conv-mjpeg.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/read-avi.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/write-avi.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/conv-audio.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/drv0-v4l2.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/drv0-v4l2-old.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/drv1-v4l.so
	$(MAKE) CC=$(TARGET_CC) -C $(XAWTV_DIR) $(PLUGINS_SUBDIR)/snd-oss.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-gamma.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-invert.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-disor.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/conv-mjpeg.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/read-avi.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/write-avi.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/conv-audio.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv0-v4l2.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv0-v4l2-old.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv1-v4l.so
	$(STAGING_DIR)/bin/arm-linux-strip $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/snd-oss.so

$(TARGET_DIR)/$(STREAMER_TARGET_BINARY): $(XAWTV_DIR)/$(STREAMER_SUBDIR)/$(STREAMER_BINARY)
	install $(XAWTV_DIR)/$(STREAMER_SUBDIR)/$(STREAMER_BINARY) $(TARGET_DIR)/$(STREAMER_TARGET_BINARY)

$(TARGET_DIR)/$(PLUGINS_TARGET): $(XAWTV_DIR)/$(PLUGINS_SUBDIR)
	install -d -m 755 $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-gamma.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-invert.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/flt-disor.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/conv-mjpeg.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/read-avi.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/write-avi.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/conv-audio.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv0-v4l2.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv0-v4l2-old.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/drv1-v4l.so $(TARGET_DIR)/$(PLUGINS_TARGET)
	install $(XAWTV_DIR)/$(PLUGINS_SUBDIR)/snd-oss.so $(TARGET_DIR)/$(PLUGINS_TARGET)

xawtv: uclibc ncurses jpeg $(TARGET_DIR)/$(STREAMER_TARGET_BINARY) $(TARGET_DIR)/$(PLUGINS_TARGET)

xawtv-source: $(DL_DIR)/$(XAWTV_SOURCE)

xawtv-clean:
	rm -f $(TARGET_DIR)/$(STREAMER_TARGET_BINARY)
	rm -rf $(TARGET_DIR)/$(PLUGINS_TARGET)
	-$(MAKE) -C $(XAWTV_DIR) clean

xawtv-dirclean:
	rm -rf $(XAWTV_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_XAWTV)),y)
TARGETS+=xawtv
endif

package/xawtv/gumstix-buildroot.diff
--- Makefile.old        2008-02-21 15:20:47.000000000 +0100
+++ Makefile    2008-02-21 15:32:45.000000000 +0100
@@ -29,7 +29,7 @@
 # for CFLAGS
 WARN_FLAGS     := -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
 LFS_FLAGS      := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-X11_FLAGS      :=   -I/usr/X11R6/include/X11/fonts
+X11_FLAGS      := -I$(STAGING_DIR)/include
 LIB_FLAGS      := -I. -I./vbistuff -I./x11 \
                   -I$(srcdir)/jwz -I$(srcdir)/common -I$(srcdir)/console \
                   -I$(srcdir)/x11 -I$(srcdir)/structs \
@@ -74,6 +74,7 @@
 CFLAGS   += -DLIBDIR='"$(libdir)"'
 CFLAGS   += -DDATADIR='"$(datadir)"'
 CFLAGS   += -DVERSION='"$(VERSION)"'
+CFLAGS   += -DX_DISPLAY_MISSING
 CXXFLAGS := $(CFLAGS)
 
 # for gcc3

After that you need to add your new package to package/Config.in
source "package/xawtv/Config.in"

Now you should be able to select your new package via menuconfig.

Software

To easily add additional software, plugin an usbstick, mount it via:
mount -t vfat /dev/sda1 /mnt/usb
and add a link symbolic link in /usr:
ln -s /mnt/usb/local /usr/local
Now you can install software on the usbstick in the local directory and use it on the gumstix, e.g. hcitool ...

compiling

Compiling third party software depends on the case, the usual three lines can look like the following:
CC=arm-linux-gcc ./configure --host=arm-linux --build=i686-linux --prefix=/usr <other options>
make
DESTDIR="/<path-to-buildroot-gumstix>/build_arm_nofpu/root" make install
It might be necessary to explicitly define: LDFLAGS="-L/<path-to-buildroot-gumstix>/build_arm_nofpu/staging_dir/lib"
If DESTDIR is not supported by the Makefile you can fall back to --prefix=/<path-to-buildroot-gumstix>/build_arm_nofpu/root/usr on the configure command line.

If you want to install the software only on the usbstick you could use:
CC=arm-linux-gcc ./configure --host=arm-linux --build=i686-linux --prefix=/ <other options>
make
DESTDIR="/<path-to-usbstick-mountpoint>/local" make install
It is recommended to look inside the Makefile after the configure to check the actual configuration.

To add the Cross-Toolchain to your PATH type (or modify /etc/profile - this is not necessary for compiling inside the buildroot):
export PATH=$PATH:/<gumstix-buildroot>/build_arm_nofpu/staging_dir/bin

libtoscomm.so for tmote

cd /<path-to-tinyos-install>/tinyos-2.x/tools/tinyos/java/serial
arm-linux-g++ -Os -shared -fPIC -I/<gumstix-buildroot>/build_arm_nofpu/classpath-0.96.1/include -o libtoscomm.so NativeSerial_linux.cpp
arm-linux-strip libtoscomm.so

Flashing

verdex boards have three partitions:
mtdblock0 uboot  # backup with # dd if=/dev/mtdblock0 of=/mnt/usb/images/v6-mtd0-uboot.img
mtdblock1 root   # backup with # dd if=/dev/mtdblock1 of=/mnt/usb/images/v6-mtd1-root.img
mtdblock2 kernel # backup with # dd if=/dev/mtdblock2 of=/mnt/usb/images/v6-mtd2-kernel.img

serial

Ckermit/Kermit is recommend for filetransfers, the recommended settings in ~/.kermrc
set line /dev/ttyS0
set carrier-watch off
set speed 115200
set file type bin
set reliable
fast
set flow-control none
set rec pack 4096
set send pack 4096
set window 5
set prefixing all

verdex with uboot 1.2.0

To switch from 'GUM>' to 'kermit>' type CTRL-\ and then C
root
GUM>loadb a2000000
kermit>send rootfs.arm_nofpu.jffs2
kermit>connect
GUM>pro on 1:0-1 && jera all && cp.b a2000000 40000 ${filesize}
kernel
GUM>loadb a2000000
kermit>send uImage
kermit>connect
GUM>katinstall 100000
GUM>katload 100000
GUM>bootm

tftp

GUM>setenv serverip 192.168.111.11
GUM>setenv ipaddr 192.168.111.66
GUM>saveenv
GUM>tftp a2000000 rootfs.arm_nofpu.jffs2
GUM>protect on 1:0-1
GUM>erase all
GUM>cp.b a2000000 40000 ${filesize}
GUM>boot

Hardware

The verdex boards can also be powered via an active usb hub. An additional power adapter for the power jack on an expansion board is not necessary. The verdex boards provide usb host functionality also with a HWUART, but the device need to be active.

Bluetooth

To make a long story short: Onboard Bluetooth (verdex xm4bt) works with buildroot revision 1585 out of the box.
Bluetooth-USB-Dongles work with the hci_usb module, but udev should take care of that without any manual interaction.

PAN

bnep interface
modprobe bnep
one master/server
pand --listen --role NAP --master --autozap
clients
pand --role PANU --search --persist
configure network interface e.g.:
ifconfig bnep0 192.168.11.11 netmask 255.255.255.0 up
To make permanent for reboot: add bnep to /etc/modules and edit /etc/network/interfaces:
iface bnep0 inet static
        address 192.168.111.66
        netmask 255.255.255.0
        broadcast 192.168.111.255
add a pand init-script /etc/init.d/S99pand:
#!/bin/sh
#
# Start/stop the bt pan daemon
#

set -e

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
NAME=pand
DESC="BT Personal Area Network"

DAEMON_NAME=pand
DAEMON_EXEC="`which $DAEMON_NAME || true`"
DAEMON_ENABLE=true
DAEMON_OPTIONS=" --role PANU --search -Q10 --persist"

case "$1" in
  start)
        echo -n "Starting $DESC:"
        if $DAEMON_ENABLE && [ -x "$DAEMON_EXEC" ] ; then
                $DAEMON_EXEC $DAEMON_OPTIONS
                echo -n " $DAEMON_NAME"
                sleep 5
                ifup bnep0 && echo -n " bnep0"
        fi
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC:"
        if $DAEMON_ENABLE ; then
                killall $DAEMON_NAME > /dev/null 2>&1 || true
                echo -n " $DAEMON_NAME"
        fi
        echo "."
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop}" >&2
        exit 1
        ;;
esac

exit 0

Webcam

Logitech Quickcam Zoom runs with the pwc modul. This modul is not part of the factory image so a kernel rebuild is necessary.
The following options need to be chosen:
Device Drivers -> Multimedia Devices
   <M> Video for Linux
Device Drivers -> Multimedia Devices -> Video Captue Adapters -> V4L USB devices
   <M> USB Philips Cameras
Linux-Kernel-Doc specifies the following cameras to work with the pwc-module:
Philips PCA645, PCA646
Philips PCVC675, PCVC680, PCVC690
Philips PCVC720/40, PCVC730, PCVC740, PCVC750
Philips SPC900NC
Askey VC010
Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro'
and 'Orbit'/'Sphere'
Samsung MPC-C10, MPC-C30
Creative Webcam 5, Pro Ex
SOTEC Afina Eye
Visionite VCS-UC300, VCS-UM100

audiostix 2

Load modules:
modprobe snd-pxa2xx-ac97 # Philips UCB1400
modprobe snd-pcm-oss
modprobe snd-mixer-oss
The volume can be adjusted with aumix.
aumix -v60 # main volume to 60%
aumix -q   # display all settings
aumix -h   # display help page
To play e.g. a mp3 file you can use madplay:
madplay -v --display-time=remaining file.mp3

gps

required Antennaspecifications:
  • Voltage: 3.3VDC @ < 50mA
  • Gain (active antennas only): < 50dB
  • active antenna recommended (FALCOM FAL-ANT-4 seems to work fine)
Connect gpsd to receiver:
gpsd -n /dev/ttyS2
Look at NMEA code with: (but be patient, it takes some time to get full data)
gpspipe -r
during warm-up:
$GPRMC,164133.00,V,,,,,,,050208,,,N*70
after warm-up:
$GPRMC,165117.00,A,4952.39170,N,00839.65240,E,1.040,218.27,050208,,,A*6E

If you have a working network connection you can use cgps/xgps to display the data on your workstation:
cgps <gumstix-ip>

zd1211rw for WLAN-USB-Stick

Patch the gumstix-kernel (linux-2.6.21gum) with patch-2.6.21.7 and enable zd1211rw (requires softmac).
cd <gumstix-buildroot>/build_arm_nofpu/linux-2.6.21gum
bzip2 -cd <path-to-patch>/patch-2.6.21.7.bz2 | patch -N -p1
cd <gumstix-buildroot>/build_arm_nofpu/root
rm -r lib/modules/2.6.21gum/
Networking
 <M> Software MAC add-on to the IEEE 802.11 networking stack
Device Drivers -> Network device support -> Wireless LAN
 <M> ZyDAS ZD1211/ZD1211B USB-wireless support
Put the firmware in /lib/firmware/zd1211.

tmote

USB2SerialConverter required, add kernel module ftdi_sio in the kernel configuration of gumstix.
Device Drivers -> USB support -> USB Serial Converter support
 <M> USB Serial Converter support 
  <M> USB FTDI Single Port Serial Driver

Samsung LCD

Works out of the box. Just connect it. During boot up a gumstix picture is displayed. Login prompt is printed after booting. To use it you can simply connect an usb keyboard.
To use the touchscreen functionality the tsc2003 module is required, unfortunately this is not included in the buildroot, but you can get the code e.g. from OpenEmbedded.
Some more details about OpenEmbedded can be found in the OpenEmbedded section.
cp <path-to-tsc2003.c>/tsc2003.c <gumstix-buildroot>/build_arm_nofpu/linux-2.6.21gum/drivers/i2c/chips/
Add the module to the corresponding Kconfig and Makefile or simply apply the patch from openembedded.
cd <gumstix-buildroot>/build_arm_nofpu/linux-2.6.21gum
patch -p1 -i <path-to-tsc2003-config.diff>/tsc2003-config.diff

Networking

Network Configuration is done in /etc/network/interfaces.

Manual configuration is done with 'ifconfig' or 'ip'. e.g.:
ifconfig eth0 <ipadress> netmask <netmask> up

For changing wireless settings 'iwconfig' is used. e.g.:
iwconfig mwlan0 essid <essid+one_character>

To setup wpa wpa_supplicant is required.
For "IP-over-Bluetooth" look at the PAN section.

Tips

alias

modify /etc/profile for the convenient 'll' command:
    ...
    else                                                                        
      if [ "`id -u`" -eq 0 ]; then                                              
        export PS1='# '                                                         
      else                                                                      
        export PS1='$ '                                                         
      fi
      alias ls='ls --color=auto' # 'COLORS'
      alias ll='ls -lAh'         # ll as shortcut
    fi
    ...

automount with udev

If udev is available on the gumstix, adding the usbstick (sda1) to the udev rules is much more convenient.
/etc/udev/rules.d/90-usb.rules
KERNEL=="sda1", ACTION=="remove", RUN+="/bin/umount /mnt/usb"                   
KERNEL=="sda1", ACTION=="add", RUN+="/bin/mount /mnt/usb"

services

If you don't need some of the services in /etc/init.d then just rename them like the following:
cd <gumstix-buildroot>/build_arm_nofpu/root/etc/init.d
mv S50bonjour K50bonjour
mv S50httpd K50httpd
mv S30bluetooth K30bluetooth # there is no onboard bluetooth on verdex-600

OpenEmbedded

Starting-points are: gumstix.org and user wiki.

To obtain OpenEmbedded for gumstix:
svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe

Pre-built OpenEmbedded-Images can be found at gumstix images.

© 2001 - 2024 Frank Remetter