|
@ -29,6 +29,7 @@ rsync -avz --rsync-path="sudo rsync" $PI_USER_HOST:/usr/include sysroot/usr/ |
|
|
rsync -avz --rsync-path="sudo rsync" $PI_USER_HOST:/usr/lib sysroot/usr/ |
|
|
rsync -avz --rsync-path="sudo rsync" $PI_USER_HOST:/usr/lib sysroot/usr/ |
|
|
#rsync -avz --rsync-path="sudo rsync" $PI_USER_HOST:/opt/vc sysroot/opt/ |
|
|
#rsync -avz --rsync-path="sudo rsync" $PI_USER_HOST:/opt/vc sysroot/opt/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SYSROOT=$(readlink -f ./sysroot) |
|
|
SYSROOT=$(readlink -f ./sysroot) |
|
|
|
|
|
|
|
|
if [ ! -f ./sysroot-relativelinks.py ] |
|
|
if [ ! -f ./sysroot-relativelinks.py ] |
|
@ -59,6 +60,21 @@ cmake ../ -DBUILD_EXAMPLES=false \ |
|
|
-DPython_INCLUDE_DIR="${SYSROOT}/usr/include/python3.8" \ |
|
|
-DPython_INCLUDE_DIR="${SYSROOT}/usr/include/python3.8" \ |
|
|
-DPython_LIBRARY="${SYSROOT}/usr/lib/aarch64-linux-gnu/libpython3.8.so" \ |
|
|
-DPython_LIBRARY="${SYSROOT}/usr/lib/aarch64-linux-gnu/libpython3.8.so" \ |
|
|
-DLIBUSB_LIB="${SYSROOT}/usr/lib/aarch64-linux-gnu/libusb-1.0.so.0.2.0" \ |
|
|
-DLIBUSB_LIB="${SYSROOT}/usr/lib/aarch64-linux-gnu/libusb-1.0.so.0.2.0" \ |
|
|
-DCMAKE_TOOLCHAIN_FILE=${CURDIR}/toolchain.cmake |
|
|
|
|
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${CURDIR}/toolchain.cmake |
|
|
make -j14 |
|
|
make -j14 |
|
|
tar cvzf $CURDIR/librealsensecompiled.tar.gz $(find . -name "*.so*") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Collect built binaries and tar up |
|
|
|
|
|
mkdir -p $CURDIR/output |
|
|
|
|
|
make DESTDIR=$CURDIR/output install |
|
|
|
|
|
|
|
|
|
|
|
cd $CURDIR/output |
|
|
|
|
|
tar cvzf ./librealsense2_pyrealsense2_aarch64.tar.gz ./* |
|
|
|
|
|
|
|
|
|
|
|
cd $CURDIR |
|
|
|
|
|
read -p "Remove generated build files (incl. toolchain, librealsense source and Raspi libraries)? " -n 1 -r |
|
|
|
|
|
echo # (optional) move to a new line |
|
|
|
|
|
if [[ $REPLY =~ ^[Yy]$ ]] |
|
|
|
|
|
then |
|
|
|
|
|
rm -rf ./sysroot ./tools ./librealsense ./output |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|