Skip to main content

Raspi

About

This page is dedicated to using FreeSWITCH with the Raspberry Pi. Please feel free to add your content here, including tips on getting things working, compiling tricks, how-to guides, etc.

Click here to expand Table of Contents

Error rendering macro 'toc'

null

Slave

The following script should set up everything you need on the slave machine.

#!/bin/bash

if [ $UID -gt 0 ]; then
SUDO=sudo
else
SUDO=''
fi

PACKAGES="bison
build-essential
ccache
distcc
flex
g++
gettext
git
install
intltool
libglib2.0-dev
liblzo2-dev
liborbit2-dev
libncurses5-dev
libx11-dev
libxml2-dev
m4
patch
rpm
tcl
uuid-dev
zlib1g-dev
"

if [ $(uname -m) = "x86_64" ]; then
PACKAGES="${PACKAGES}:gcc-multilib ia32-libs lib32g++"
fi
echo $PACKAGES
$SUDO aptitude -y install $PACKAGES

cd /opt
$SUDO git clone git://github.com/raspberrypi/tools.git cross

echo '
STARTDISTCC="true"
ALLOWEDNETS="0.0.0.0/0"
LISTENER="0.0.0.0"
NICE="0"
JOBS="50"
ZEROCONF="false"
PATH=/opt/cross/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/bin/:/opt/cross/arm-bcm2708/gcc-linaro-arm-linuxgnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.7.2:${PATH}' | $SUDO tee /etc/default/distcc

$SUDO /etc/init.d/distcc restart

Raspi

installing prerequisites

On the Raspi, you need to install ccache and distcc

sudo aptitude install ccache distcc

using ccache

In order to use the new packages you just installed, you'll need to set some variables in your environment

export CC="ccache arm-linux-gnueabihf-gcc"

using distcc

export CCACHE_PREFIX="distcc"

open ~/.distcc/hosts in your favorite editor and add the slave host(s) one per line

then run the bootstrap, configure, make as normal and distcc should be used

More Information

See Ken Rice's cool SwitchPi project.