Skip to content

Raspberry Pi raspbian rebulid environment

20lives edited this page Aug 29, 2017 · 2 revisions

Using premade environment

These steps explains how to create the Raspberry Pi environment with rebuild, if you only want to use the environment you can skip the tutorial and use our pre-created environment on Docker Hub.

this is all you need to do: (you might want read how to compile code with it):

rbld search
rbld deploy rpi-raspbian:v001
rbld run rpi-raspbian:v001 -- make

Create environment for Raspberry Pi

git clone git://github.com/raspberrypi/tools.git rpi-tools

rbld create --base ubuntu:16.04 rpi-raspbian

rbld modify rpi-raspbian:initial

>> sudo apt-get update
>> sudo apt-get install -y make
>> TOOLCHAIN=gcc-linaro-arm-linux-gnueabihf-raspbian-x64
>> sudo cp -r rpi-tools/arm-bcm2708/$TOOLCHAIN /
>> echo export CC=/$TOOLCHAIN/bin/arm-linux-gnueabihf- | sudo tee -a /rebuild/rebuild.rc
>> exit

rbld commit rpi-raspbian --tag v001

Compiling code

navigate to the directory where the Makefile is and run make like this:

cd code-location
rbld run rpi-raspbian:v001 -- make -j8