Installation FPC Cross Compiler for ARM ( Kubuntu 9.04 Jaunty Jackalope)

+ install package fpc     ( currently 2.2.2 )            
apt-get install fpc

+ download the toolchain from
and uncompress it as root in /.
Then, add the cross-compiler directory to the PATH
export PATH=/usr/local/xtools/arm­unknown­linux­-uclibcgnueabi/bin:$PATH

+ install subversion
apt-get install subversion

+ download a recent version of fpc
svn checkout ./fpc240

+ compile the compiler
patch sdl mixer to avoid error, so no sdl lib is included
cd ./fpc240
vi packages/sdl/src/sdl_mixer.pas
 change lines starting at 450
       5 : ( mp3 : PSMPEG );
 with these lines, the sdl lib is removed !

       {$IFNDEF no_smpeg}
       5 : ( mp3 : PSMPEG );

make clean

make crosszipinstall CPU_TARGET=arm CROSSOPT='-CfFPA -dUSB92 -darm -dno_smpeg -dFPC_ARMEL -O- -gl' CROSSBINDIR=/usr/local/xtools/arm-unknown-linux-uclibc/bin/ BINUTILSPREFIX=arm-unknown-linux-uclibc- OPT="-XLAdl=c"

+ Installation of the binaries
cd /usr/local/
tar -xzvf /home/ubuntu/fpc240/fpc-2.4.0rc1.arm-linux.tar.gz
cd /usr/local/bin
ln -s /usr/local/lib/fpc/2.4.0/ppcrossarm ppcrossarm

+ go to
and softlink all libraries to have a link like instead of

Compiling programs:

 /usr/local/bin/ppcrossarm -CfFPA  -dUSB92 -CaARMEB -CpARMV5 -darm -dFPC_ARMEL  -gl -Fu../webserver -Fu../PhysMach -Fu../divLibs/pwu- -XP/usr/local/xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/bin/ -XR/usr/local/xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/ -Fl/usr/local/xtools/arm-unknown-linux-uclibc/arm-unknown-linux-uclibc/sys-root/usr/lib/  DeviceServer.pas


Thanks to all people who work hard on free software and therefor made
this possible.
I used the knowledge compiled on the websites I mention under [REFERENCES].
All I did was using this knowledge and compile this readme to allow others
to do the same.
A special thank go to the freepascal mailing list and Jonas and Dariusz for
their support.
(c) 2009 by Hartmut Eilers