-
Notifications
You must be signed in to change notification settings - Fork 0
BuildRaspbian
staticlibs edited this page Nov 20, 2020
·
4 revisions
On Debian Buster (should work on other x86_64 Linux distros in similar way):
Install dependencies:
sudo apt install build-essential cmake file git openjdk-11-jdk-headless pkg-config wget zip
Get cross-toolchain for Raspberry Pi OS Buster ARMv6 hard-float:
wget https://github.com/Pro/raspi-toolchain/releases/download/v1.0.1/raspi-toolchain.tar.gz
tar xfz raspi-toolchain.tar.gz --strip-components=1 -C /opt
Get sysroot and setup pkg-config:
git clone https://github.com/wiltonruntime/crosspi-buster-sysroot.git /opt/cross-pi-gcc-sysroot
ln -s /opt/cross-pi-gcc-sysroot/usr/bin/arm-linux-gnueabihf-pkg-config /opt/cross-pi-gcc/bin/arm-linux-gnueabihf-pkg-config
Setup Java:
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
Build:
cd wilton
mkdir build
cd build
cmake .. -DSTATICLIB_TOOLCHAIN=linux_armhf_gcc -DWILTON_BUILD_FLAVOUR=crosspi
make dist
file ./wilton_<version>/bin/wilton
>./wilton_<version>/bin/wilton: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV)
On Raspberry Pi OS Buster use the build steps for Debian Buster.