don't install openCV on drideOSZ
This commit is contained in:
parent
4df2c00cee
commit
bc3721a7bb
2
build.sh
2
build.sh
|
@ -130,6 +130,8 @@ fi
|
||||||
|
|
||||||
export IMG_DATE=${IMG_DATE:-"$(date -u +%Y-%m-%d)"}
|
export IMG_DATE=${IMG_DATE:-"$(date -u +%Y-%m-%d)"}
|
||||||
|
|
||||||
|
export OS_TYPE=$1
|
||||||
|
|
||||||
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
export SCRIPT_DIR="${BASE_DIR}/scripts"
|
export SCRIPT_DIR="${BASE_DIR}/scripts"
|
||||||
export WORK_DIR=${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}
|
export WORK_DIR=${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}
|
||||||
|
|
|
@ -46,7 +46,7 @@ on_chroot << EOF
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
# Script to check if all is good before install script runs
|
# Script to check if all is good before install script runs
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
|
echo OS_TYPE
|
||||||
echo "====== Dride install script ======"
|
echo "====== Dride install script ======"
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -90,8 +90,8 @@ echo "========== Installing build-essential ============"
|
||||||
sudo apt-get install build-essential -y
|
sudo apt-get install build-essential -y
|
||||||
|
|
||||||
|
|
||||||
echo "========== Installing libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libjasper-dev python2.7-dev ============"
|
echo "========== Installing libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libjasper-dev python2.7-dev gpac ============"
|
||||||
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libjasper-dev python2.7-dev -y
|
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libjasper-dev python2.7-dev gpac -y
|
||||||
|
|
||||||
|
|
||||||
# Install Node
|
# Install Node
|
||||||
|
@ -117,7 +117,7 @@ sudo pip install "picamera[array]==1.12"
|
||||||
echo "" >> /boot/config.txt
|
echo "" >> /boot/config.txt
|
||||||
echo "#enable piCaera" >> /boot/config.txt
|
echo "#enable piCaera" >> /boot/config.txt
|
||||||
echo "start_x=1" >> /boot/config.txt
|
echo "start_x=1" >> /boot/config.txt
|
||||||
echo "gpu_mem=256" >> /boot/config.txt
|
echo "gpu_mem=128" >> /boot/config.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -248,32 +248,32 @@ sudo systemctl disable gpsd.socket
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ OS_TYPE == "drideOS" ]; then
|
||||||
|
echo "========== Downloading and installing OpenCV ============"
|
||||||
|
cd /
|
||||||
|
# git clone https://github.com/Itseez/opencv.git --depth 1
|
||||||
|
wget -c -O "opencv-3.1.0.zip" "https://github.com/Itseez/opencv/archive/3.1.0.zip"
|
||||||
|
sudo apt-get install unzip
|
||||||
|
unzip -q -n "opencv-3.1.0.zip"
|
||||||
|
|
||||||
echo "========== Downloading and installing OpenCV ============"
|
cd opencv-3.1.0
|
||||||
cd /
|
echo "==>>>====== Building OpenCV ============"
|
||||||
# git clone https://github.com/Itseez/opencv.git --depth 1
|
cd /home/opencv-3.1.0
|
||||||
wget -c -O "opencv-3.1.0.zip" "https://github.com/Itseez/opencv/archive/3.1.0.zip"
|
mkdir build
|
||||||
sudo apt-get install unzip
|
cd build
|
||||||
unzip -q -n "opencv-3.1.0.zip"
|
cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ..
|
||||||
|
echo "==>>>====== This might take a long time.. ============"
|
||||||
|
make -j1
|
||||||
|
|
||||||
cd opencv-3.1.0
|
sudo make install
|
||||||
echo "==>>>====== Building OpenCV ============"
|
sudo ldconfig
|
||||||
cd /home/opencv-3.1.0
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/usr/local ..
|
|
||||||
echo "==>>>====== This might take a long time.. ============"
|
|
||||||
make -j1
|
|
||||||
|
|
||||||
sudo make install
|
# remove the installation file
|
||||||
sudo ldconfig
|
cd /
|
||||||
|
sudo rm opencv-3.1.0.zip
|
||||||
# remove the installation file
|
|
||||||
cd /
|
|
||||||
sudo rm opencv-3.1.0.zip
|
|
||||||
|
|
||||||
# TODO: Add a test if openCV was installed correctly
|
|
||||||
|
|
||||||
|
# TODO: Add a test if openCV was installed correctly
|
||||||
|
fi
|
||||||
|
|
||||||
echo "========== Setup sound to I2S ============"
|
echo "========== Setup sound to I2S ============"
|
||||||
sudo curl -sS https://dride.io/code/i2samp.sh | bash
|
sudo curl -sS https://dride.io/code/i2samp.sh | bash
|
||||||
|
|
Loading…
Reference in New Issue
Block a user