How to set-up a cross-compiling environment for zaurus ------------------------------------------------------ Romain KUNTZ kuntz@sfc.wide.ad.jp Table Of Content : ------------------ 1. Install cross compiling environment [Debian Users] 2. Let's try it ! 3. Others Cross-compilers 1. Install cross compiling environment [Debian Users] : ------------------------------------------------------- This is an easy set up for Debian Users. For others distributions, see section 3. WARNING : This cross-compiling environment doesn't work for kernel compilation. Please see section 3. to set up another cross compiling environment. * Add this line to your /etc/apt/sources.list file : deb http://emdebian.sourceforge.net/emdebian unstable main See http://emdebian.sourceforge.net/ for more informations. * Then install cross compiling environment (as root) # apt-get update # apt-get install task-cross-arm * You may have problems with libstdc++2.10-arm post installation. Something like this may occur : Setting up libstdc++2.10-dev-arm (2.95.2-12e4) ... sh: line 1: /usr/share/info/iostream.info.gz: No such file or directory [...] In this case, watch the name of the iostream.info.gz file in /usr/share/info (iostream-2.95.info.gz on my computer) and modify the file /var/lib/dpkg/info/libstdc++2.10-dev-arm.postinst : replace /usr/share/info/iostream.info.gz with /usr/share/info/iostream-2.95.info.gz Then execute once again "apt-get install task-cross-arm" to finish installation. You can visit this page for more informations : http://sourceforge.net/mailarchive/forum.php?thread_id=1459142&forum_id=6433 * All you need is installed in /usr/arm-linux : /usr/arm-linux/bin : compilation tools /usr/arm-linux/include : include files /usr/arm-linux/lib : libraries gcc for arm is installed in /usr/bin (arm-linux-gcc), it can be useful to create symbolic links : # ln -s /usr/bin/arm-linux-gcc /usr/arm-linux/bin/gcc # ln -s /usr/bin/arm-linux-gcc /usr/arm-linux/bin/cc 2. Let's try it ! ----------------- * We are going to try cross compilation of zlib $ wget http://www.gzip.org/zlib/zlib-1.2.1.tar.gz $ tar zxvf zlib-1.2.1.tar.gz $ cd zlib-1.2.1 We had to add the /usr/arm-linux/bin to the PATH $ export PATH=/usr/arm-linux/bin:$PATH Let's go ! $ ./configure --prefix=/usr/arm-linux $ make # make install Note that make install will put the new files in /usr/arm-linux/include, /usr/arm-linux/lib etc.. * Others example and tips on this page : http://www.cartel-securite.fr/pbiondi/zaurus/crosscompile.html 3. Others Cross-compilers : --------------------------- * At the moment (2004-04-22), emdebian crosscompiler is not xscale compliant :( For Kernel compilation for example it can cause problems. * To avoid problems, remove the toolchain installed via emdebian (if you installed one) : # apt-get remove binutils-arm cpp-arm g++-arm gcc-arm libc6-dev-arm task-cross-arm --purge * Then download a new one, for example this one (works fine) : http://www.openzaurus.org/official/toolchain/cross-2.95.3.tar.bz2 * Unpack cross-2.95.3.tar.bz2 in /usr/local/arm/ * You need to export a new PATH : $ export PATH=/usr/local/arm/2.95.3/bin:$PATH That's all ! If you have any questions or comments, feel free to ask ! Romain KUNTZ kuntz@sfc.wide.ad.jp