Difference between revisions of "Distribute compilation"

From Flav's Wiki
Jump to: navigation, search
(Created page with "=Resources= https://code.google.com/p/distcc/ http://www.openframeworks.cc/setup/raspberrypi/Raspberry-Pi-DISTCC-guide.html https://midnightyell.wordpress.com/2012/10/14/a-g...")
 
 
Line 11: Line 11:
 
===setup the cross compiler===
 
===setup the cross compiler===
  
Go in the crosscompiler location
+
Go in the crosscompiler and clone https://github.com/raspberrypi/tools
 
<pre>
 
<pre>
 
$ cd /media/rpi_make/raspberrypi/rpi_kernel
 
$ cd /media/rpi_make/raspberrypi/rpi_kernel
Line 37: Line 37:
 
/media/rpi_make/raspberrypi/rpi_kernel/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.8.3:\
 
/media/rpi_make/raspberrypi/rpi_kernel/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.8.3:\
 
${PATH}
 
${PATH}
 +
</pre>
 +
 +
==On the Raspberry Pi==
 +
Update the version (optionnal)
 +
<pre>
 +
sudo apt-get update
 +
sudo apt-get upgrade
 +
</pre>
 +
 +
Install distcc
 +
sudo apt-get install distcc
 +
 +
 +
Make sure that when “gcc” is called, it actually calls distcc:
 +
 +
export PATH=/usr/lib/distcc:${PATH}
 +
 +
Edit ~/.distcc/hosts to resemble the following:
 +
<pre>
 +
192.168.1.100
 +
--localslots=1
 +
--randomize
 
</pre>
 
</pre>

Latest revision as of 10:44, 12 February 2015

Resources

https://code.google.com/p/distcc/

http://www.openframeworks.cc/setup/raspberrypi/Raspberry-Pi-DISTCC-guide.html

https://midnightyell.wordpress.com/2012/10/14/a-good-compromise-cross-compiling-with-distcc/


What I did

On the i386/debian

setup the cross compiler

Go in the crosscompiler and clone https://github.com/raspberrypi/tools

$ cd /media/rpi_make/raspberrypi/rpi_kernel
$ git clone https://github.com/raspberrypi/tools
$ ls -l tools/arm-bcm2708/
total 16
drwxr-xr-x 7 flav flav 4096 Feb 10 14:14 arm-bcm2708hardfp-linux-gnueabi
drwxr-xr-x 7 flav flav 4096 Feb 10 14:14 arm-bcm2708-linux-gnueabi
drwxr-xr-x 7 flav flav 4096 Feb 10 14:15 gcc-linaro-arm-linux-gnueabihf-raspbian
drwxr-xr-x 7 flav flav 4096 Feb 10 14:15 gcc-linaro-arm-linux-gnueabihf-raspbian-x64

install and config distcc

# apt-get install distcc

configure /etc/default/distcc:

STARTDISTCC="true"
ALLOWEDNETS="192.168.0.0/24"
LISTENER=""
NICE="0"
JOBS=""
ZEROCONF="true"
PATH=/media/rpi_make/raspberrypi/rpi_kernel/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/bin/:\
/media/rpi_make/raspberrypi/rpi_kernel/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.8.3:\
${PATH}

On the Raspberry Pi

Update the version (optionnal)

sudo apt-get update
sudo apt-get upgrade

Install distcc

sudo apt-get install distcc


Make sure that when “gcc” is called, it actually calls distcc:

export PATH=/usr/lib/distcc:${PATH}

Edit ~/.distcc/hosts to resemble the following:

192.168.1.100
--localslots=1
--randomize