This is in fact a guide for Distributed Cross-Compiling on ARMv6.
For the sake of easiness, i will use Arch Linux which greatly simplifies the steps needed.
Requirements:
If you want to do this for Raspberry Pi 2 you need to download the cross-compiling tools for ARMv7.
Let's get to it
First you need to install distcc on both devices(or moar) with:
Also install the libraries needed:
On the Raspberry Pi
Edit following lines on file /etc/makepkg.conf
BUILDENV un-negate (remove !) distcc to enable distributed compiling
DISTCC_HOSTS add your slave(s) ip(s)
MAKEFLAGS this should enumerate your total cores (computers) plus 1. Example: Raspberry Pi + 1 Laptop slave = 2 plus 1 = 3; it means it should say -j3
If you have 2 slaves then it should say -j4; 4 slaves = -j6 and so on
Now on each your slaves
Edit /etc/conf.d/distccd
PATH is the directory where we will be downloading the cross-compiling tools, dont remove :$PATH at the end
Change 192.168.0.0 for your own local network address
Download the RPi B+ cross-compiling pre-compiled binaries
http://archlinuxarm.org/builder/xtools/x-tools6h.tar.xz
I extracted them on /home/hao/x-tools6h/, remember to change PATH for your own
Start the daemon on the slaves
You're ready to start compiling
On your Raspberry Pi download the package i created for TFS with:
Extract and navigate to it:
And start compiling with
Once makepkg finishes, you should have TFS compiled on /tmp/forgottenserver, move the folder to wherever you want
Congratulations, you just cross-compiled for your RPi
You can check on your slave that it is actually helping your Raspberry Pi
You can read this in spanish:
Part 1.
Part 2.
For the sake of easiness, i will use Arch Linux which greatly simplifies the steps needed.
Requirements:
- RPi Model B+ with Arch Linux
- Slave(s) PC(s) (another computer with Arch Linux x64)
If you want to do this for Raspberry Pi 2 you need to download the cross-compiling tools for ARMv7.
Let's get to it
First you need to install distcc on both devices(or moar) with:
PHP:
pacman -S distcc
PHP:
pacman -S git cmake lua gmp boost boost-libs libmariadbclient
On the Raspberry Pi
Edit following lines on file /etc/makepkg.conf
PHP:
BUILDENV=(fakeroot distcc color !ccache)
DISTCC_HOSTS="your.slave.pc.ip"
MAKEFLAGS="-j3"
DISTCC_HOSTS add your slave(s) ip(s)
MAKEFLAGS this should enumerate your total cores (computers) plus 1. Example: Raspberry Pi + 1 Laptop slave = 2 plus 1 = 3; it means it should say -j3
If you have 2 slaves then it should say -j4; 4 slaves = -j6 and so on
Now on each your slaves
Edit /etc/conf.d/distccd
PHP:
PATH=/home/hao/x-tools6h/arm-unknown-linux-gnueabihf/bin:$PATH
DISTCC_ARGS="--allow 192.168.0.0/24"
Change 192.168.0.0 for your own local network address
Download the RPi B+ cross-compiling pre-compiled binaries
http://archlinuxarm.org/builder/xtools/x-tools6h.tar.xz
I extracted them on /home/hao/x-tools6h/, remember to change PATH for your own
Start the daemon on the slaves
PHP:
systemctl enable distccd
systemctl start distccd
You're ready to start compiling
On your Raspberry Pi download the package i created for TFS with:
PHP:
wget https://aur.archlinux.org/cgit/aur.git/snapshot/forgottenserver-git.tar.gz
PHP:
tar xvzf forgottenserver-git.tar.gz
cd forgottenserver-git
PHP:
makepkg -Acs
Once makepkg finishes, you should have TFS compiled on /tmp/forgottenserver, move the folder to wherever you want
Congratulations, you just cross-compiled for your RPi
You can check on your slave that it is actually helping your Raspberry Pi
You can read this in spanish:
Part 1.
Part 2.
Last edited: