43c710ec39
* Move java lib install to /usr/local/frc/java * Build and install both debug and normal OpenCV libraries * Install OpenCV cmake files * Build OpenCV Java with version 8 target * Build static OpenCV for static allwpilib binaries * Move netconsoleTee install to /usr/local/frc/bin * Move multiCameraServer default app install to /usr/local/frc/bin * Install more FRC binaries * Fix /home/pi/zips/java-multiCameraServer.zip owner to pi:pi * Remove azure 60 minute timeout * Add openjdk-8-jdk to Azure docker image (this is needed for cmake to find javah as only cmake 3.9 is available)
54 lines
1.4 KiB
Bash
Executable File
54 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir -p 02-extract
|
|
pushd 02-extract
|
|
|
|
# raspbian toolchain
|
|
tar xzf ../01-download/Raspbian9-Linux-Toolchain-*.tar.gz
|
|
|
|
# additional headers/libs
|
|
pushd raspbian9/arm-raspbian9-linux-gnueabihf
|
|
|
|
# Extract data to toolchain basedir
|
|
for var in ../../../01-download/*.deb
|
|
do
|
|
ar p "$var" data.tar.xz | tar xJf -
|
|
done
|
|
|
|
# move the arm-linux-gnueabihf libs to just the base "lib"
|
|
sh -c 'cd lib && ln -s arm-linux-gnueabihf/* .'
|
|
sh -c 'cd usr/lib/debug && ln -s ../arm-linux-gnueabihf/debug/* .'
|
|
sh -c 'cd usr/lib && ln -s arm-linux-gnueabihf/* .'
|
|
|
|
# change absolute symlinks into relative symlinks
|
|
find . -lname '/*' | \
|
|
while read l ; do
|
|
echo ln -sf $(echo $(echo $l | sed 's|/[^/]*|/..|g')$(readlink $l) | sed 's/.....//') $l
|
|
done | \
|
|
sh
|
|
|
|
popd
|
|
|
|
# opencv sources
|
|
tar xzf ../01-download/3.4.4.tar.gz
|
|
mv opencv-3.4.4 opencv
|
|
sed -i -e 's/javac sourcepath/javac target="1.8" source="1.8" sourcepath/' opencv/modules/java/jar/build.xml.in
|
|
|
|
# toolchain setup for opencv and wpilib
|
|
cp ../arm-pi-gnueabihf.toolchain.cmake .
|
|
cp -R ../thirdparty-opencv/jni .
|
|
tar xzf ../01-download/jdk_11*.tar.gz jdk/include
|
|
mkdir -p cmake-modules
|
|
cat > cmake-modules/FindJNI.cmake << EOF
|
|
set(JNI_INCLUDE_DIRS "${PWD}/jdk/include" "${PWD}/jdk/include/linux")
|
|
set(JNI_LIBRARIES )
|
|
set(JNI_FOUND YES)
|
|
set(JAVA_AWT_LIBRARY )
|
|
set(JAVA_JVM_LIBRARY )
|
|
set(JAVA_INCLUDE_PATH "${PWD}/jdk/include")
|
|
set(JAVA_INCLUDE_PATH2 "${PWD}/jdk/include/linux")
|
|
set(JAVA_AWT_INCLUDE_PATH )
|
|
EOF
|
|
|
|
popd
|