Skip to content

Instantly share code, notes, and snippets.

@colin-guyon
Last active November 28, 2018 21:55
Show Gist options
  • Save colin-guyon/b0a38971680bf7407c69cd226f990d60 to your computer and use it in GitHub Desktop.
Save colin-guyon/b0a38971680bf7407c69cd226f990d60 to your computer and use it in GitHub Desktop.
RPi cross/shared compilation with distcc
Useful links:
https://midnightyell.wordpress.com/2012/10/14/a-good-compromise-cross-compiling-with-distcc/
https://archlinuxarm.org/wiki/Distcc_Cross-Compiling
https://archlinuxarm.org/wiki/Distributed_Compiling
On the powerful machine
-----------------------
Retrieve a prebuilt crosstool-ng toolchain such as https://archlinuxarm.org/builder/xtools/x-tools6h.tar.xz
so that the toolchain is available in /home/your_user/x-tools[6h|7h|8]/
Install distcc (yaourt -S distcc)
Then run:
> DISTCCD_PATH=/home/your_user/x-tools[6h|7h|8]/arm-unknown-linux-gnueabi[hf]/bin distccd --verbose --no-detach --allow <master-ip> --log-stderr --nice 0
On Raspberry pi
---------------
> sudo apt-get install distcc
> export PATH=/usr/lib/distcc:${PATH}
Edit ~/.distcc/hosts to resemble the following:
192.168.1.100 <-- ip of the powerful machine
--localslots=1
--randomize
Then 'configure' and 'make' the needed component ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment