25 lines
1.0 KiB
Bash
25 lines
1.0 KiB
Bash
#!/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.
|