Skip to content

Instantly share code, notes, and snippets.

@rsippl
Last active December 3, 2018 09:34
Show Gist options
  • Save rsippl/0c909fbc04dc27286dfa25b3cde67602 to your computer and use it in GitHub Desktop.
Save rsippl/0c909fbc04dc27286dfa25b3cde67602 to your computer and use it in GitHub Desktop.
TinkerBoard Setup
sudo apt-get update
sudo apt-get upgrade
sudo dpkg-reconfigure keyboard-configuration
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure tzdata
sudo apt-get install -y build-essential git cmake pkg-config
sudo apt-get install -y libjpeg-dev libtiff5-dev libpng-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-devlibgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y libatlas-base-dev gfortran
sudo apt-get install -y python2.7-dev python3-dev
sudo apt-get install -y libhdf5-dev
sudo apt-get install -y opencl-headers
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
/bin/bash Miniconda3-latest-Linux-armv7l.sh
. ~/.bashrc
conda create -n opencv python=3 numpy
source activate opencv
mkdir -p ~/Development/opencv
cd ~/Development/opencv
wget -O opencv-3.4.2.zip https://github.com/opencv/opencv/archive/3.4.2.zip
wget -O opencv_contrib-3.4.2.zip https://github.com/opencv/opencv_contrib/archive/3.4.2.zip
unzip opencv-3.4.2.zip
unzip opencv_contrib-3.4.2.zip
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.2/modules -D ENABLE_NEON=ON -D ENABLE_VFPV3=ON -D WITH_LIBV4L=ON -D WITH_OPENCL=ON -D CMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -D PYTHON3_EXECUTABLE=$CONDA_ENV_PATH/bin/python -D BUILD_TESTS=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON ../opencv-3.4.2
make -j4
make install
Text mode login:
systemctl set-default multi-user.target
Back to full desktop:
systemctl set-default graphical.target
On TB:
conda create -n tf --clone opencv
source activate tf
conda config --add channels conda-forge
source activate tf
On Mac:
mkdir tensorflow/tinkerboard
cd tensorflow/tinkerboard
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout r1.9
cd ..
CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.4" \
tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 \
tensorflow/tools/ci_build/pi/build_raspberry_pi.sh
(takes some time)
cd output-artifacts
scp tensorflow-1.9.0-cp34-none-linux_armv7l.whl linaro@tinkerboard:~
on TB:
source activate tf
conda uninstall six numpy # will be reinstalled by tf
pip install tensorflow-1.9.0-cp34-none-linux_armv7l.whl
pip install matplotlib
In ~/.ssh/config on the Mac, add these lines:
ForwardX11 yes
Compression yes
then log in via ssh and test by running e.g. xterm
Movidius Neural Compute Stick
git clone -b ncsdk2 http://github.com/Movidius/ncsdk
source activate tf
cd ncsdk/api/src
sudo apt-get install libusb-1.0-0-dev
make get_mvcmd
sudo make basicinstall
make pythoninstall
cd ../../examples/apps/hello_ncs_py
python hello_ncs.py
cd ../hello_ncs_cpp && make run # optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment