This is an old revision of
Crosscompiler from 2004-01-28 13:37:41.
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-''version''
fakeroot debian/rules binary
su -c 'dpkg -i ../binutils-sparc-linux*.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
# dpkg -i libc6-dev-sparc-cross_2.2.5-11.5_all.deb libc6-sparc-cross_2.2.5-11.5_all.deb
and you're done
make GCC
cd gcc-sparc-linux-''version''
fakeroot debian/rules binary
su -c 'dpkg -i ../gcc-sparc-linux*.deb'