Cross-compilation toolchains for ARM/iPAQ
Friday, 14. October 2005, 22:53:49
Because the hardware on ARM/iPAQ is different from most desktops, a cross-compiler capable of producing code for different platform is usually needed. Toolchains contain the neccessary tools to cross-compile code for that target machine. The easiest solution is to use GCC, which is open-source and can be obtained for free. If you're not using an ARM based machine to build the code, either grab one of the pre-compiled toolchains for your architecture, or if you're feeling adventurous, build your own toolchain.
ARM Cross Toolchain for Debian
1. apt-get install dpkg-cross
2. Edit /etc/dpkg-cross/cross-compile, setting crossbase = /usr.
3. Get the latest ARM libc6 and libc-dev packages from the pool and install them like so:
dpkg-cross --arch arm --install \ libc6_2.3.5-6_arm.deb libc6-dev_2.3.5-6_arm.deb
You may find that libc6-dev_2.3.5-6_arm.deb fail to build (system ask you to install linux-kernel-headers-arm-cross).After googling, I find a solution: add the following to your /etc/apt/sourcelist
deb http://zigzag.lvk.cs.msu.su/~nikita/debian sarge/
then run
apt-get update apt-get install linux-kernel-headers-arm-cross
4. Do the same with libdb1-compat.
dpkg-cross --arch arm --install libdb1-compact_2.1.3-8_arm.deb
5. Get the gcc-arm-linux and binutils-arm-linux packages, and install them as normal. If you are on i386 or PowerPC, you can use the binaries. If you are on another architecture, you will have to get the source and build them by hand.
dpkg -i binutils-arm-linux_2.13.90.0.10-1_i386.deb dpkg -i gcc-arm-linux_3.2-1_i386.deb
6. Job done!
Build Kernel for iPAQ
If you want to build the kernel for iPAQ, just follow this tutorial!
Compile Program for iPAQ on Debian Linux

How to use Quote function: