This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
fsfw_example_public/cmake/scripts/RPi/crosscompile/rpi_path_helper.sh

25 lines
1.0 KiB
Bash
Raw Normal View History

2021-04-27 17:22:34 +02:00
#!/bin/sh
# This script can be used to set the path to the cross-compile toolchain
# A default path is set if the path is not supplied via command line
if [ $# -eq 1 ];then
export PATH=$PATH:"$1"
else
# TODO: make version configurable via shell argument
export PATH=$PATH:"/opt/cross-pi-gcc/bin"
export CROSS_COMPILE="arm-linux-gnueabihf"
export RASPBERRY_VERSION="4"
export RASPBIAN_ROOTFS="${HOME}/raspberrypi/rootfs"
fi
# It is also recommended to set up a custom shell script to perform the
# sysroot synchronization so that any software is built with the library and
# headers of the Raspberry Pi. This can for example be dome with the rsync
# command.
# The following command can be used, <ip-address> and the local
# <rootfs-path> need to be set accordingly.
# rsync -vR --progress -rl --delete-after --safe-links pi@<ip-address>:/{lib,usr,opt/vc/lib} <rootfs-path>
# It is recommended to use $HOME/raspberrypi/rootfs as the rootfs path,
# so the default RASPBIAN_ROOTFS variable set in the CMakeLists.txt is correct.