There are plenty of good things to say about the Raspberry Pi, but there’s one thing I could do without: Waiting for compilation! The venerable Pi’s ARM11 is showing its age …
This project is meant to help: Using VirtualBox, Vagrant, crosstool-NG, and Ansible,
rpi-cross will automatically set up an Ubuntu VM with a cross compilation toolchain optimized for Raspberry Pi and a distcc daemon, ready to cross compile both locally and over the network.
Sound good? Let’s make it happen. Contributions very welcome.
rpi-cross is a work-in-progress. Right now, testers are needed to confirm the following features:
- setup of a prebuilt toolchain
- unattended toolchain compilation using crosstool-NG
- distcc setup and configuration
All of these work for me, but I’m sure there are plenty of kinks to work out. Whatever your experience, please do provide feedback! :)
Note that Ubuntu may ship with outdated versions, so
apt-get install will not suffice — instead, follow the instructions on developers’ homepage to get the most recent stable release.
Earlier version may work, but no guarantees; Vagrant
< v1.5 and Ansible
v1.5.4 are known not to work.
Development is done against Vagrant stable and Ansible HEAD.
If you know what you want, this will probably be enough get you going. If not, please follow the Guide below.
- install the dependencies (note the version requirements)
- choose between building your own toolchain with crosstool-NG, or using a prebuilt one:
playbook.ymlaccording to your choices of the previous step
vagrant upto set up and start the VM
(Note: The custom build takes quite a long time (~40 min on my machine) and unfortunately offers little feedback: Ansible doesn’t show the client’s
stdout. You could monitor the CPU usage, but that’s not very satisfying. You’ll just have to wait it out.)
vagrant ssh into the machine and inspect the results: If all went well, you’ll find the toolchain in
~/x-tools6h, and the distcc daemon is running and open for connections from
My intention is to provide a beginner-friendly tool, useable without deep knowledge of the involved tools. Using a provisioning tool like Ansible has several advantages:
- fully automated setup and configuration,
- maintainability and adaptability,
- transparent, precise documentation of all steps involved.
You can simply treat the resulting setup as a black box, but if curiosity (or necessity) strikes, you can look at its blueprints — and change them.