Add pynetworktables and robotpy-cscore

This commit is contained in:
Peter Johnson 2018-11-30 21:05:14 -08:00
parent a0a68d9a7a
commit 78f99637b9
No known key found for this signature in database
GPG Key ID: D39DD4DA7D41E329
3 changed files with 49 additions and 0 deletions

View File

@ -6,6 +6,7 @@ mkdir -p stage2/01-sys-tweaks/extfiles
# tools
#
cp tools/setuidgids stage2/01-sys-tweaks/extfiles/
cp tools/_cscore.so stage2/01-sys-tweaks/extfiles/_cscore.cpython-35m-arm-linux-gnueabihf.so
#
# openjdk
@ -24,6 +25,16 @@ cp ../thirdparty-opencv/buildShared/linux-raspbian/bin/opencv-*.jar stage2/01-sy
# of the target platform, so rename it
cp ../thirdparty-opencv/buildShared/linux-raspbian/lib/python3/cv2.*.so stage2/01-sys-tweaks/extfiles/cv2.cpython-35m-arm-linux-gnueabihf.so
#
# robotpy-cscore
#
sh -c 'cd ../robotpy-cscore/ && tar czf - cscore' > stage2/01-sys-tweaks/extfiles/robotpy-cscore.tar.gz
#
# pynetworktables
#
sh -c 'cd ../pynetworktables/ && tar czf - networktables ntcore' > stage2/01-sys-tweaks/extfiles/pynetworktables.tar.gz
#
# allwpilib
#

View File

@ -86,6 +86,10 @@ cat extfiles/libopencv.tar.gz | sh -c "cd ${ROOTFS_DIR}/usr/local/frc/lib/ && ta
install -m 755 extfiles/cv2.*.so "${ROOTFS_DIR}/usr/local/lib/python3.5/dist-packages/"
cat extfiles/pynetworktables.tar.gz | sh -c "cd ${ROOTFS_DIR}/usr/local/lib/python3.5/dist-packages/ && tar xzf -"
cat extfiles/robotpy-cscore.tar.gz | sh -c "cd ${ROOTFS_DIR}/usr/local/lib/python3.5/dist-packages/ && tar xzf -"
install -m 755 extfiles/_cscore.*.so "${ROOTFS_DIR}/usr/local/lib/python3.5/dist-packages/cscore/"
install -m 755 extfiles/libwpiutil*.so* "${ROOTFS_DIR}/usr/local/frc/lib/"
install -m 755 extfiles/libcscore*.so* "${ROOTFS_DIR}/usr/local/frc/lib/"
install -m 755 extfiles/libntcore*.so* "${ROOTFS_DIR}/usr/local/frc/lib/"

View File

@ -1,2 +1,36 @@
ALL: setuidgids _cscore.so
setuidgids: setuidgids.c
arm-raspbian9-linux-gnueabihf-gcc -O -Wall -D_GNU_SOURCE -o $@ $<
_cscore.so: ../../robotpy-cscore/src/_cscore.cpp ../../robotpy-cscore/src/ndarray_converter.cpp
arm-raspbian9-linux-gnueabihf-g++ -O -Wall -shared -fPIC -o $@ \
-I../../thirdparty-opencv/opencv/include \
-I../../thirdparty-opencv/opencv/modules/core/include \
-I../../thirdparty-opencv/opencv/modules/calib3d/include \
-I../../thirdparty-opencv/opencv/modules/features2d/include \
-I../../thirdparty-opencv/opencv/modules/flann/include \
-I../../thirdparty-opencv/opencv/modules/highgui/include \
-I../../thirdparty-opencv/opencv/modules/imgcodecs/include \
-I../../thirdparty-opencv/opencv/modules/imgproc/include \
-I../../thirdparty-opencv/opencv/modules/ml/include \
-I../../thirdparty-opencv/opencv/modules/objdetect/include \
-I../../thirdparty-opencv/opencv/modules/photo/include \
-I../../thirdparty-opencv/opencv/modules/shape/include \
-I../../thirdparty-opencv/opencv/modules/stitching/include \
-I../../thirdparty-opencv/opencv/modules/superres/include \
-I../../thirdparty-opencv/opencv/modules/video/include \
-I../../thirdparty-opencv/opencv/modules/videoio/include \
-I../../thirdparty-opencv/opencv/modules/videostab/include \
-I../../thirdparty-opencv/buildShared/linux-raspbian \
-I../../allwpilib/wpiutil/src/main/native/include \
-I../../allwpilib/cscore/src/main/native/include \
-I/usr/local/arm-raspbian9-linux-gnueabihf/usr/include/python3.5 \
-L../../allwpilib/cscore/build/libs/cscore/shared/raspbian/release \
-L../../allwpilib/wpiutil/build/libs/wpiutil/shared/raspbian/release \
-L../../thirdparty-opencv/buildShared/linux-raspbian/lib \
../../robotpy-cscore/src/_cscore.cpp \
../../robotpy-cscore/src/ndarray_converter.cpp \
-lcscore \
-lwpiutil \
-lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_core