Before you begin, ensure that you've setup network access, either with ethernet or wlan.
sudo dpkg-reconfigure tzdata
Typically we use "US/Pacific-New"
Place an sdcard in the slot, and edit /etc/fstab
/dev/mmcblk1p1 /mnt/sdcard vfat umask=000,uid=1000,gid=27 0 0
(This makes the sdcard writable to the ubuntu user.)
First sudo vi /etc/apt/sources.list
and uncomment the "universe" lines in order to access universe packages.
# install screen
sudo apt-get install screen
# run screen for the remainder of the install
# this allows you to reconnect if your network connection is lost
screen
# if you lose your network connection, reconnect to the jetson and use:
screen -r
Next update the list of available packages and install desired:
sudo apt-get update
sudo apt-get install -y build-essential git cmake cmake-curses-gui libv4l-dev v4l-utils python-numpy python-scipy libavformat-dev libpng-dev libjpeg-dev libtiff-dev libswscale-dev libeigen3-dev libgtk2.0-dev
Download cuda from https://developer.nvidia.com/jetson-tk1-support
Because this is behind a firewall you may need to download to eg an sdcard.
sudo dpkg -i /mnt/sdcard/cuda-repo-l4t-r19.2_6.0-42_armhf.deb
# make apt aware of the package you downloaded
sudo apt-get update
# Install the CUDA Toolkit including OpenGL toolkit from NVIDIA
sudo apt-get install -y cuda-toolkit-6-0
# Add yourself to the "video" group to allow access to the GPU
sudo usermod -a -G video $USER
echo "# Add CUDA bin & library paths:" >> ~/.bashrc
echo "export PATH=/usr/local/cuda-6.0/bin:$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-6.0/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc
- Install public / private development keys to ~/.ssh/
- Install a ~/.ssh/ config file
Host bitbucket.org
IdentityFile ~/.ssh/id_rsa
- Clone our custom opencv repo (opencv-fastcap):
git clone [email protected]:foobarn/opencv-fastcap.git
- Setup custom opencv build
cd opencv-fastcap
mkdir build
cd build
ccmake ..
- Configure required stuff: typically profiling on, debug on, perf tests off, docs off, GigE off , shared libs OFF, build type = RELEASE, cuda_arch = 3.2, clear cuda_arch_ptx, BUILD_FAT_JAVA_LIB off, etc
- 'c' for configure until you see 'g' for generate, then generate and exit
- Build opencv:
# install requires root access
sudo make -j4 install
Because we are building in the native Jetson environment, this can take a half hour or more.
Clone your source repos and go!
To find a package, try apt-cache search foo