-
-
Save tru2dagame/1cc6fbd44c034228eece2a7f74aa5fde to your computer and use it in GitHub Desktop.
Debian wheezy mips toolchain
This file contains hidden or 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 MIPS 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 | |
# Update | |
mkdir /usr/src/mips-toolchain && cd /usr/src/mips-toolchain | |
apt-get update | |
apt-get upgrade | |
# Binutils | |
apt-get -y build-dep --no-install-recommends binutils | |
apt-get source binutils | |
pushd binutils-2.*/ | |
DEB_TARGET_ARCH=mips TARGET=mips dpkg-buildpackage -b | |
popd | |
dpkg -i binutils-mips*.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=mips 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 mips -m libc6-dev | |
DEB_TARGET_ARCH=mips DEB_CROSS_NO_BIARCH=yes with_deps_on_target_arch_pkgs=yes dpkg-buildpackage -b | |
popd | |
dpkg -i *.deb | |
ln -s /usr/bin/mips-linux-gnu-cpp-4.7 /usr/bin/mips-linux-gnu-cpp | |
ln -s /usr/bin/mips-linux-gnu-gcc-ar-4.7 /usr/bin/mips-linux-gnu-gcc-ar | |
ln -s /usr/bin/mips-linux-gnu-gcc-ranlib-4.7 /usr/bin/mips-linux-gnu-gcc-ranlib | |
ln -s /usr/bin/mips-linux-gnu-g++-4.7 /usr/bin/mips-linux-gnu-g++ | |
ln -s /usr/bin/mips-linux-gnu-gccgo-4.7 /usr/bin/mips-linux-gnu-gccgo | |
ln -s /usr/bin/mips-linux-gnu-gcov-4.7 /usr/bin/mips-linux-gnu-gcov | |
ln -s /usr/bin/mips-linux-gnu-gcc-4.7 /usr/bin/mips-linux-gnu-gcc | |
ln -s /usr/bin/mips-linux-gnu-gcc-nm-4.7 /usr/bin/mips-linux-gnu-gcc-nm | |
ln -s /usr/bin/mips-linux-gnu-gfortran-4.7 /usr/bin/mips-linux-gnu-gfortran | |
# Compile accel-ppp for mips | |
apt-get -y install --no-install-recommends git cmake | |
xapt -a mips -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 -amips -b -d | |
popd | |
ls -l accel-ppp_1.9-beta_mips.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment