-
-
Save kingster/28de0fc43d2c0243a418bdf489086047 to your computer and use it in GitHub Desktop.
Debian wheezy mipsel cross-compile toolchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian 7 MIPSel Toolchain | |
# http://cdimage.debian.org/cdimage/archive/7.8.0/amd64/iso-cd/debian-7.8.0-amd64-CD-1.iso | |
# Basic install + SSH Server + Standard system utilities | |
# Pre | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
# Update | |
mkdir /usr/src/mipsel-toolchain && cd /usr/src/mipsel-toolchain | |
# Binutils | |
apt-get -y build-dep --no-install-recommends binutils | |
apt-get source binutils | |
pushd binutils-2.*/ | |
DEB_TARGET_ARCH=mipsel TARGET=mipsel dpkg-buildpackage -b | |
popd | |
dpkg -i binutils-mipsel*.deb | |
# GCC | |
apt-get -y build-dep --no-install-recommends gcc-4.7 | |
apt-get source gcc-4.7 | |
pushd gcc-4.7-4.7.*/ | |
DEB_TARGET_ARCH=mipsel DEB_CROSS_NO_BIARCH=yes with_deps_on_target_arch_pkgs=yes dpkg-buildpackage -d -T control | |
apt-get -y install --no-install-recommends xapt binutils-multiarch | |
xapt -a mipsel -m libc6-dev | |
DEB_TARGET_ARCH=mipsel DEB_CROSS_NO_BIARCH=yes with_deps_on_target_arch_pkgs=yes dpkg-buildpackage -b | |
popd | |
dpkg -i *.deb | |
ln -s /usr/bin/mipsel-linux-gnu-cpp-4.7 /usr/bin/mipsel-linux-gnu-cpp | |
ln -s /usr/bin/mipsel-linux-gnu-gcc-ar-4.7 /usr/bin/mipsel-linux-gnu-gcc-ar | |
ln -s /usr/bin/mipsel-linux-gnu-gcc-ranlib-4.7 /usr/bin/mipsel-linux-gnu-gcc-ranlib | |
ln -s /usr/bin/mipsel-linux-gnu-g++-4.7 /usr/bin/mipsel-linux-gnu-g++ | |
ln -s /usr/bin/mipsel-linux-gnu-gccgo-4.7 /usr/bin/mipsel-linux-gnu-gccgo | |
ln -s /usr/bin/mipsel-linux-gnu-gcov-4.7 /usr/bin/mipsel-linux-gnu-gcov | |
ln -s /usr/bin/mipsel-linux-gnu-gcc-4.7 /usr/bin/mipsel-linux-gnu-gcc | |
ln -s /usr/bin/mipsel-linux-gnu-gcc-nm-4.7 /usr/bin/mipsel-linux-gnu-gcc-nm | |
ln -s /usr/bin/mipsel-linux-gnu-gfortran-4.7 /usr/bin/mipsel-linux-gnu-gfortran | |
# Compile accel-ppp for mipsel | |
# apt-get -y install --no-install-recommends git cmake | |
# xapt -a mipsel -m libssl-dev libpcre3-dev libnl-3-dev | |
# cd /usr/src | |
# git clone git://git.code.sf.net/p/accel-ppp/code accel-ppp | |
# git clone https://github.com/fgrep/accel-ppp-edgemax.git accel-ppp-debian | |
# mv accel-ppp-debian/debian accel-ppp/ | |
# rm -rf accel-ppp-debian | |
# pushd accel-ppp | |
# dpkg-buildpackage -amipsel -b -d | |
# popd | |
# ls -l accel-ppp_1.9-beta_mipsel.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment