-
Notifications
You must be signed in to change notification settings - Fork 137
MIPS binutils
Igor Smirnov edited this page Sep 30, 2015
·
26 revisions
This cheat-sheet is based on this following instruction: http://www.linux-mips.org/wiki/Toolchains#Roll-your-own. See it if you have any problem or need more information.
Note: this instruction will works only for Linux machines. It was verified on Ubuntu 12.04.1 LTS (GNU/Linux 2.6.32-042stab084.26 x86_64). |
|---|
- The following command will download the required sources (
binutils-2.24.tar.bz2) from the FTP server into/tmp/directory:
cd /tmp
wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2- Then, unpacked the sources:
tar xjf binutils-2.24.tar.bz2- Create a folder where the binutils will be installed (can be any):
mkdir /opt/cross- Create a folder for a build process (can be any):
cd /tmp
mkdir build-binutils && cd build-binutils- Configure build (can dump a lot of info):
../binutils-2.24/configure --target=mipsel-unknown-linux-gnu --prefix=/opt/cross- Make sources (can dump a lot of info):
make- Install (can dump a lot of info):
make installAfter that you should now have the cross-binutils installed under /opt/cross/bin/ with names prefixed by mipsel-unknown-linux-gnu-.
It is convenient to give a short name to MIPS Binutils binaries. We suggest to put a short symlink into /usr/bin/, which also make the tools visible without modification of the $PATH.
For example:
cd /usr/bin
ln -s /opt/cross/bin/mipsel-unknown-linux-gnu-as mips-as
ln -s /opt/cross/bin/mipsel-unknown-linux-gnu-ld mips-ld
ln -s /opt/cross/bin/mipsel-unknown-linux-gnu-objdump mips-objdumpMIPT-V / MIPT-MIPS — Cycle-accurate pre-silicon simulation.