Changes

Jump to navigation Jump to search
m
Line 18: Line 18:  
*[[Compiling]] - Building PTTLink from source
 
*[[Compiling]] - Building PTTLink from source
   −
= Installing cross compiling toolchain =
+
= Cross compiling =
Lintaro has a recent version of the GCC 4.9 compiler that can be used to cross compile binaries for the Raspberry PI.
+
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>
   −
1. Install tools:<syntaxhighlight lang="text">
+
=== GCC 4.9 ===
apt install git make gcc device-tree-compiler bison flex libssl-dev libncurses-dev</syntaxhighlight>
+
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.
   −
2. Install latest GCC 4,9 cross compiler and associated toolset:
+
*Install latest GCC 4.9.x cross compiler and associated toolset:
== 32 bit ==
+
==== 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
 
<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>
 
sudo tar xf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz -C /opt</syntaxhighlight>
 
+
==== 64 bit ====
== 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
 
<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>
 
sudo tar xf gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz -C /opt</syntaxhighlight>
  −
= 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.
      
== Raspberry PI 3 ==
 
== Raspberry PI 3 ==

Navigation menu