Building X Client Programs for the iPAQ
Three possibilities
We suggest native development as the easiest path to
gratification. Cross compilation, while nominally faster,
usually involves much more hassle than it is worth. And since
you can develop on your usual desktop (using a small window
and a single button, or for the determined to be very
accurate, via Xnest configured to a small root window), you
will find it most convienient to first debug your programs on
your normal environment before recompiling for StrongARM.
For completeness, here are your options laid out below.
- cross compilation
- native compilation on one of the Skiff machines
- native compilation on an iPAQ
Cross Compilation
First, ask yourself if you really want to do this. Native
development is generally a better way to go: first on your
normal desktop using your normal tools in the usual fashion,
and only when debugged, again, native on the iPAQ in the
usual fashion. So have you stopped beating your head against
this wall yet? It feels so good when you stop, you
know....
For those determined to continue, here's some hints.
- Determine if the software you are building uses imake
or the GNU configuration tools. If it uses the GNU
configuration tools, you probably really want to native
compile, rather than cross compile, as hacking Makefiles
until the cows come home gets very boring. The GNU build
tools generally are not very happy about cross
compilation. See either native compilation on a Skiff or
on an iPAQ.
- Get and install a cross compilation tool chain. We recommend using ours: it
has all compilers, and has been pretty well shaken down.
The version we use
has few known problems. The following lines will give
you some hints as to where to find tools and libraries.
CC = /skiff/local/bin/arm-linux-gcc
PREPROCESSCMD = /skiff/local/bin/arm-linux-gcc
-E $(STD_CPP_DEFINES) RANLIB =
/skiff/local/bin/arm-linux-ranlib
MODCC = /skiff/local/bin/arm-linux-gcc
LDPOSTLIB =
-L/skiff/local/arm-linux/lib
LDPOSTLIBS =
-L/skiff/local/arm-linux/lib
- Get and install the current X distribution. Configure it for cross
compilation,
per instructions.
- You now have two choices:
- Build inside the X tree you just installed. In this
case, you move your client into xc/programs, copy a
makefile from another client on top of your makefile
(only if you have an Imakefile!), type 'make
makefile', 'make depend', and then make. Rebuilding
your makefile ensures you pick up the cross
compilation definitions.
- Build outside of the X tree you just installed. You
can use imake to rebuild the makefile for your
client, per 1.). You'll need to scratch your head
for a while to figure out the arguments to imake.
Note that xmkmf won't work for you, as you need to
use the development environoment to build your
executable, not your native machine.
Native Compilation on one of the Skiff/iPAQ Cluster
Machines
Ahh... I see that sanity has returned... Feel better now
that you've stopped beating your head against the wall?
Compaq CRL has made
available as a service a number of Skiff and iPAQ handheld
machines, running Linux. A Skiff is a small server
machine based on a StrongARM which is effectively identical
to an iPAQ for program development. The iPAQ's are iPAQ
handhelds with large IDE disks attached running the Intimate
Linux distribution.
It is Linux, with a normal set of development tools. The
skiff distribution is very strange, being a cross between a
Debian and a RedHat system, for historical (hysterical?)
reasons. (Debian development for ARM seemed to die for a
while, and Carleton University built a ton of RH RPM's). It
appears that a number of vendors may be "fixing" this problem
for us, but for now, what you see is what you get. We are
putting into service a number of iPAQ's to replace the skiffs
as well: these run Debian's ARM distribution.
Root access can be had if needed on request. Send mail to
Jamey.Hicks@hp.com
Native Compilation on an iPAQ
- Install
Intimate, a version of Debian for the iPAQ handheld.
The very adventursome can run Debian unstable, but our
experience is that Debian Testing is a better compromise
on ARM: testing is broken too often and for too long for
that to be a viable for most.
- Enjoy!
Modified May 28, 2002 by Jim.Gettys@hp.com
|