Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BuildRaspbian

staticlibs edited this page Nov 20, 2020 · 4 revisions

Outline

Cross-compile on Linux x86_64

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)

Compile natively on RaspberryPi

On Raspberry Pi OS Buster use the build steps for Debian Buster.

Clone this wiki locally