Skip to content

P8P-7/core

Repository files navigation

Core

Build Status

Overview

Goliath II's heart. Contains all actions, commands and handles. If a command is found, it will be executed within the core.

Build steps

Raspbian (based on Debian 9 "Stretch")

git clone --recurse-submodules -j8 https://github.com/P8P-7/core.git
cd core
sudo ./preinstall.sh -j4
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
sudo make

Cross compile for the Raspberry Pi

  1. Copy the entire /lib, /usr and /opt directories of your Raspberry Pi into a newly created folder:
mkdir raspbian-rootfs
rsync -vrl --delete-after pi@$RASPI:/{lib,usr,opt} raspbian-rootfs/

(where $RASPI is the IP address of the Raspberry Pi)

  1. Install the Raspberry Pi toolchain.
# For Raspberry PI 3B
sudo ./install-toolchain.sh --arch=armv7

# For Raspberry PI 3B 
sudo ./install-toolchain.sh --arch=armv8
  1. Turn all the absolute symlinks into relative ones:
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod  x sysroot-relativelinks.py
./sysroot-relativelinks.py raspbian-rootfs/
  1. Let's cross compile!
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="../toolchains/toolchain-rpi.cmake" ..
make
  1. Upload build/bin to your Raspberry Pi.