GnuArmToolchain » History » Revision 2
Revision 1 (steve-m, 02/19/2016 10:48 PM) → Revision 2/19 (steve-m, 02/19/2016 10:48 PM)
== GNU ARM toolchain == This page will describe the procedure for compiling a GNU ARM toolchain. We will build a toolchain consisting of: * GCC 4.5.2 * Binutils 2.21 * Newlib 1.19 === Getting the buildscript === First of all, create a directory you want to use for building the toolchain, and download the buildscript (gnu-arm-build.sh) attached to this page there. === Dependencies === In order to build the toolchain, you will need to install the following packages (assuming you're using a Debian-based distribution): {{{ $ sudo apt-get install build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev texinfo flex bison libncurses5 \ libncurses5-dbg libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc libmpfr4 libmpfr-dev libmpc-dev }}} === Preparation === Open a shell in the directory of gnu-arm-build.sh and create the following directories: {{{ $ mkdir build install src }}} Download the needed sources to src/: {{{ $ cd src/ $ wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2 $ wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2 $ wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz }}} === Building the toolchain === {{{ $ cd .. $ ./gnu-arm-build.sh I will build an arm-elf cross-compiler: Prefix: <YOURPATH>/install Sources: <YOURPATH>/src Build files: <YOURPATH>/build Press ^C now if you do NOT want to do this. }}} Hit enter and after some time hopefully end up with: {{{ Build complete! Add <YOURPATH>/bin to your PATH to make arm-elf-gcc and friends accessible directly. }}} === Making it accessible === If you're using bash, you can add the following in your ~/.bashrc file: {{{ export PATH=$PATH:<YOURPATH>/install/bin }}} That's it. You can [GettingStarted#Gettingandupdatingthesource build] OsmocomBB now. '''Credits:''' This script is a slightly updated/modified version of the script found [http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer/ here]. [[BR]] http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer/[[BR]] The original version also builds Insight, but since we don't need that, we won't build it. If you want to, just remove the comments in the shellscript.