GnuArmToolchain » History » Version 12
ahuemer, 02/19/2016 10:48 PM
gnu-arm-build.2.sh -> gnu-arm-build.3.sh
1 | 1 | steve-m | == GNU ARM toolchain == |
---|---|---|---|
2 | |||
3 | This page will describe the procedure for compiling a GNU ARM toolchain. |
||
4 | We will build a toolchain consisting of: |
||
5 | |||
6 | 12 | ahuemer | * GCC 4.8.2 |
7 | 6 | steve-m | * Binutils 2.21.1 |
8 | 1 | steve-m | * Newlib 1.19 |
9 | |||
10 | === Getting the buildscript === |
||
11 | |||
12 | 12 | ahuemer | First of all, create a directory you want to use for building the toolchain, and download the buildscript [raw-attachment:gnu-arm-build.3.sh] there. |
13 | 4 | steve-m | You will need to make it executable: |
14 | |||
15 | {{{ |
||
16 | 12 | ahuemer | $ chmod +x gnu-arm-build.3.sh |
17 | 4 | steve-m | }}} |
18 | 1 | steve-m | |
19 | === Dependencies === |
||
20 | |||
21 | In order to build the toolchain, you will need to install the following packages (assuming you're using a Debian-based distribution): |
||
22 | |||
23 | {{{ |
||
24 | $ sudo apt-get install build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev texinfo flex bison libncurses5 \ |
||
25 | 10 | vogelchr | libncurses5-dbg libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev |
26 | 1 | steve-m | }}} |
27 | |||
28 | === Preparation === |
||
29 | |||
30 | Open a shell in the directory of gnu-arm-build.sh and create the following directories: |
||
31 | |||
32 | {{{ |
||
33 | $ mkdir build install src |
||
34 | }}} |
||
35 | |||
36 | Download the needed sources to src/: |
||
37 | |||
38 | {{{ |
||
39 | $ cd src/ |
||
40 | 12 | ahuemer | $ wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 |
41 | 6 | steve-m | $ wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2 |
42 | 1 | steve-m | $ wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz |
43 | }}} |
||
44 | |||
45 | === Building the toolchain === |
||
46 | |||
47 | {{{ |
||
48 | $ cd .. |
||
49 | 12 | ahuemer | $ ./gnu-arm-build.3.sh |
50 | I will build an arm-none-eabi cross-compiler: |
||
51 | 1 | steve-m | |
52 | Prefix: <YOURPATH>/install |
||
53 | Sources: <YOURPATH>/src |
||
54 | Build files: <YOURPATH>/build |
||
55 | |||
56 | Press ^C now if you do NOT want to do this. |
||
57 | }}} |
||
58 | |||
59 | Hit enter and after some time hopefully end up with: |
||
60 | |||
61 | {{{ |
||
62 | 12 | ahuemer | Build complete! Add <YOURPATH>/bin to your PATH to make arm-none-eabi-gcc and friends |
63 | 1 | steve-m | accessible directly. |
64 | 11 | tsaitgaist | }}} |
65 | |||
66 | 1 | steve-m | === Making it accessible === |
67 | |||
68 | If you're using bash, you can add the following in your ~/.bashrc file: |
||
69 | |||
70 | {{{ |
||
71 | export PATH=$PATH:<YOURPATH>/install/bin |
||
72 | }}} |
||
73 | |||
74 | That's it. You can [GettingStarted#Gettingandupdatingthesource build] OsmocomBB now. |
||
75 | |||
76 | '''Credits:''' |
||
77 | |||
78 | 2 | steve-m | This script is a slightly updated/modified version of the script found [http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer/ here]. [[BR]] |
79 | 1 | steve-m | 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. |