Version 2 (modified by 11 years ago) (diff) | ,
---|
Set up a cross-build machine for the Raspberry Pi
Prerequisites
This document focuses on Debian hosts. Debian derivatives such as Ubuntu should work with minor changes.
Downloads
- Download the firmware (.tar.gz)
- Download the build tools (.tar.gz)
Alternatively, these can be retrieved using Git. Unpack them in two directories called firmware
and tools
.
Environment variables
- Set
RASPI_SDK_ROOT
to the directory containingfirmware
andtools
. - Add the following directory to
PATH
:
$RASPI_SDK_ROOT/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin
Bitten configuration
For Lol Engine autobuilders, add the following section to the bitten machine file:
[raspi] version = 0
Building autoconf projects
For simple autoconf projects (using ./configure ; make
) the following command can now be used:
RASPI_INCLUDES="$RASPI_SDK_ROOT/firmware/opt/vc/include" RASPI_LIBS="$RASPI_SDK_ROOT/firmware/opt/vc/lib" ./configure --host=arm-bcm2708hardfp-linux-gnueabi \ CPPFLAGS="-I$RASPI_INCLUDES -I$RASPI_INCLUDES/interface/vcos/pthreads" \ LDFLAGS="-L$RASPI_LIBS" make