Table of Contents

Cross-compiling for the Raspberry Pi

Compiling DUNE directly on the Raspberry Pi is possible, but soon becomes tedious, as it takes a while. Luckily there is an alternative, cross-compiling. The Raspberry Pi has an available toolchain at GitHub, but it uses a too old version of the gcc compiler, and therefore it will not compile DUNE. The solution to this, is to use the cross-compiler environment that is made for LSTS Glued.

Setting up Glued cross-compiler for DUNE

sudo apt-get install docker.io
git clone https://github.com/LSTS/glued.git
cd glued/docker && sudo make && sudo make shell
​ ./mkconfig.bash mariner-01
​./mksystem.bash lctr-rpi/mariner-01.bash
./pktoolchain.bash lctr-rpi/mariner-01.bash
exit

Cross compiling with the Glued toolchain

mkdir dunebuildrpi && cd dunebuildrpi
cmake -DCROSS=[wherisit]/glued/lctr-rpi/toolchain/bin/armv7-lsts-linux-gnueabihf-gcc [dune_source]
make -j4