JDP : Crosscompiler

Home :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are a guest
This is an old revision of Crosscompiler from 2004-01-28 16:41:36.

Building a crosscompiler for sparc32 using a Debian/Linux box


This is how I did it, the result can be found in the files section.
CrosscompilingKernel

warning: I assume the host box is a Debian/Woody box

get the needed packages
apt-get install fakeroot automake1.4 dpkg-cross binutils-multiarch


edit /etc/dpkg/cross-compile:
crossbase = /usr


get the toolchain source
Since the woody toolchain source is broken, we install the testing version:
# cd /tmp && wget http://ftp.nl.debian.org/debian/pool/main/t/toolchain-source/toolchain-source_3.2-8_all.deb # dpkg -i toolchain-source_3.2-8_all.deb


configure the toolchain
cd /usr/src EMAIL="someone@somedomain.com" tpkg-make sparc-linux


create binutils
cd binutils-sparc-linux_2.14.90.0.4 fakeroot debian/rules binary su -c 'dpkg -i ../binutils-sparc-linux_2.14.90.0.4-1_i386.deb'


libc
We use a little trick with dpkg-cross:
# cd /tmp # wget http://ftp.nl.debian.org/debian/pool/main/g/glibc/libc6_2.2.5-11.5_sparc.deb # wget http://ftp.nl.debian.org/debian/pool/main/g/glibc/libc6-dev_2.2.5-11.5_sparc.deb # dpkg-cross -a sparc -b libc6_2.2.5-11.5_sparc.deb # dpkg-cross -a sparc -b libc6-dev_2.2.5-11.5_sparc.deb # su -c "dpkg -i libc6-dev-sparc-cross_2.2.5-11.5_all.deb libc6-sparc-cross_2.2.5-11.5_all.deb"


make GCC
cd gcc-sparc-linux-3.2.3.cvs20030221 fakeroot debian/rules binary su -c 'dpkg -i ../gcc-sparc-linux-3.2.3.cvs20030221-1_i386.deb'


and you're done
There is no comment on this page. [Display comments/form]