Changes

Jump to navigation Jump to search
m
Line 20: Line 20:  
= Cross compiling =
 
= Cross compiling =
 
Compiling on the Raspberry PI is both extremely slow and an exercise in pain.  Thankfully there are ways to cross compile the software using a standard desktop computer with the Raspberry PI as the target.
 
Compiling on the Raspberry PI is both extremely slow and an exercise in pain.  Thankfully there are ways to cross compile the software using a standard desktop computer with the Raspberry PI as the target.
 +
 +
== Installing cross compiling toolchain ==
 +
Run the following to install a newer cross compiling toolchain from your distro's package tree along with other necessary utilities:
 +
<syntaxhighlight lang="text">apt-get install -y git bc bison flex rsync libssl-dev make device-tree-compiler libc6-dev libncurses5-dev crossbuild-essential-armhf crossbuild-essential-arm64</syntaxhighlight>
 +
 +
=== GCC 4.9 ===
 +
If you intend to cross compile pieces of the Asterisk 1.4 distribution then you will need the GCC 4.9.x compiler.  Linaro has a recent version of the GCC 4.9 compiler that we can use for this.
 +
 +
*Install latest GCC 4.9.x cross compiler and associated toolset:
 +
==== 32 bit ====
 +
<syntaxhighlight lang="text">wget http://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
 +
sudo tar xf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz -C /opt</syntaxhighlight>
 +
==== 64 bit ====
 +
<syntaxhighlight lang="text">wget http://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-linux-gnu/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz
 +
sudo tar xf gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz -C /opt</syntaxhighlight>
    
== Raspberry PI 3 ==
 
== Raspberry PI 3 ==

Navigation menu