Specifications

The new software building block that we’ll add to this sys-
tem is something called deferred IO. Deferred IO is a recently
added hack in the Linux kernel that allows nonmemory-
mappable devices to pretend to be memory-mappable. It also
allows us to hide the latency associated with the E-Ink display.
This hack is what makes it possible to run X with various
E-Ink controllers on Linux. We’ll also add the Metronome and
AM200 drivers that provide the Linux framebuffer interface for
the Metronome controller together with the Gumstix board.
Okay, now we can do some real work. The first thing to do
is establish a working environment on the Gumstix. Power on
your Gumstix board and connect the two USB ports to your
host machine. This lets you set up the USB-serial console and
also creates a USB-net connection with which to transfer files.
You can use minicom or cu to use the Gumstix serial con-
sole. If your board is in working condition, you should see this
when you connect:
Connected.
Welcome to the Gumstix Linux Distribution!
gumstix login:
The user name is root, and the password is gumstix. Log in
to check whether your SD card works. If all is well, you should
see the following:
gumstix login: root
Password:
Welcome to Gumstix!
# mount
/dev/root on / type jffs2 (rw)
proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
udev on /dev type ramfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mmcblk0p1 on /mnt/mmc type vfat
¯
(rw,sync,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
tmpfs on /tmp type tmpfs (rw)
The line with a mount entry called /mnt/mmc shows there
is working SD card support.
Now that we’ve established a working environment, we
can approach building the kernel. We want to use the 2.6.25
kernel, because it supports all the devices we are interested in
and has the features we’ve talked about so far. To build this
kernel, we need some things from our development environ-
ment—that is, the cross compiler that will allow us to compile
binaries for the XScale CPU using a standard x86 host. Don’t
be frightened by this. It’s not that hard. As mentioned before,
there are two choices of tools to set up everything for you.
The first is buildroot. I used the following incantation to set up
a buildroot environment:
# mkdir gumstix_build
# cd gumstix_build
# svn co -r1441 http://svn.gumstix.com/gumstix-buildroot/
¯
trunk gumstix-buildroot
# make defconfig
# make
This pulls down revision 1441 of the buildroot build. Select
the appropriate option for your Gumstix board. Mine was a
basix, so I selected the BR2_TARGET_GUMSTIX_BASIXCONNEX
and GUMSTIX_400MHZ entries. This build revision worked fine
on my Ubuntu Edgy build machine, but you may need to
experiment with the revision tag to find one that builds well
on your chosen system. This build stage takes a while, as
buildroot pulls down a wide set of sources and starts building
everything from scratch. It will take at least several hours even
on high-end machines. I typically leave this stage running
overnight. Once it completes, key utilities will be added to
your path. The ones that are necessary to our operation are:
./build_arm_nofpu/staging_dir/bin/arm-linux-gcc
./build_arm_nofpu/staging_dir/bin/mkimage
./build_arm_nofpu/staging_dir/bin/arm-linux-objcopy
That should settle things for buildroot users. If you are
using OE, your incantation is slightly different:
# mkdir gumstix_build
# cd gumstix_build
# svn co https://gumstix.svn.sourceforge.net/svnroot/
¯
gumstix/trunk gumstix-oe
# . ~/gumstix/gumstix-oe/extras/profile
# # edit your build config to select the
# # right machine (basix, connex, or verdex)
# bitbake gumstix-basic-image
Bitbake manages the dependencies and figures out what to
build and how to build the cross-compilation environment. Suffice
it to say that this stage is not the speediest to complete, so plan
on taking an extended break before your tools are ready. On my
build machine, the OE build takes about two days to complete.
Please refer to the Gumstix OE Build Details link (see Resources) in
order to set up your build config for your Gumstix board.
Now that you have a working environment, you need to
pull down the mainline kernel tree that has the driver for the
E-Ink Metronome controller and deferred IO support. I typically
just pull down Linus Torvalds’ latest tree. Once that is done,
select and build using the right config file for your kit. On
mine, the steps to do this are:
58 | august 2008 www.linuxjournal.com
Once you’ve gotten an X server on the system, you
pretty much can run anything that’s available from
the realm of the penguin and the wildebeest, including
your favorite Web browsers and PDF readers.
FEATURE Fun with E-Ink, X and Gumstix