Skip to content

Instantly share code, notes, and snippets.

View jetsonhacks's full-sized avatar

JetsonHacks jetsonhacks

View GitHub Profile
@jetsonhacks
jetsonhacks / gExampleClient.sh
Created October 28, 2014 06:06
Gstreamer RTSP H.264 Receiver
#!/bin/sh
# NVIDIA Jetson TK1
# Get rtsp stream from network, decode and display
SOURCE=<IP ADDRESS OF MACHINE, e.g. 10.10.10.10>
#VIDEO Capabilities of the receiver
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
TCP_VIDEO_CAPS="application/x-rtp"
VIDEO_SINK="videoconvert ! xvimagesink sync=false"
TCPSRC="tcpclientsrc host=$SOURCE port=5000"
VIDEO_DEC="h264parse ! omxh264dec"
#!/bin/sh
# Video Mixer example
# 3 MPEG IPCAMS and local webcam
# Webcam is MJPEG 1280x720
JPEG_DEC="jpegparse ! queue ! jpegdec"
VID_SPEC="videorate ! videoscale ! video/x-raw-yuv,framerate=30/1,width=960,height=540"
NVVIDCONV="queue ! nvvidconv"
VELEM="v4l2src device=/dev/video0" #video0 is a Logitech c920 webcam with built-in H.264 compression & MJPEG
VCAPS="image/jpeg, width=1280, height=720, framerate=30/1"
# Video Source
@jetsonhacks
jetsonhacks / Install LT4 21.1.md
Last active January 26, 2024 16:59
Install LT4 21.1 on Jetson TK1

For best results, you should read through the official NVIDIA documentation found on:

https://developer.nvidia.com/linux-tegra-rel-21

In particular, the Quick Start Guide.

For this process you will need:

  • A host desktop or laptop computer running Ubuntu Linux 12.04 is officially recommended. In practice, this may be a virtual machine, I have used VirtualBox in the past. Also, I've successfully flashed from Ubuntu Linux 14.04. Your mileage may vary.
  • Micro USB cable provided with the Jetson TK1 kit
  • Jetson TK1 and power supply
@jetsonhacks
jetsonhacks / enableUSB3.md
Last active October 12, 2015 05:56
NVIDIA Jetson TK1 Enable USB 3.0 under LT4 21.1

Linux for Tegra (LT4) uses UBoot as its bootloader, replacing fastboot. In order to enable the full size USB port as 3.0, you can change the boot configuration file on the Jetson.

The boot configuration file is located here:

/boot/extlinux/extlinux.conf

There are several example configuration files in that directory which define how to boot from different devices.

The switch to change is:

@jetsonhacks
jetsonhacks / installCUDA65.sh
Last active April 1, 2020 18:51
Fresh install CUDA 6.5 on NVIDIA Jetson TK1 Development Kit
#!/bin/sh
# Fresh install for CUDA 6.5 on Jetson TK1 for Linux for Tegra (L4T) 21.1
# CUDA 6.5 REQUIRES L4T 21.1 !!!
sudo apt-add-repository universe
sudo apt-get update
# This is for L4T r21.1 ; Update for your L4T i.e. r21.3
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda-repo-l4t-r21.1-6-5-prod_6.5-14_armhf.deb
# Install the CUDA repo metadata that you downloaded
# This is for L4T 21.1 ; Update for your L4T i.e. 21.3
@jetsonhacks
jetsonhacks / maxCPU.sh
Created November 19, 2014 00:28
Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until reboot:
#!/bin/sh
# Get and install OpenCV for Tegra
# Linux for Tegra (LT4) 21.1 and CUDA 6.5 *must* be installed on the Jetson before installation!
wget http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.1/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev
@jetsonhacks
jetsonhacks / installCaffe.sh
Last active July 10, 2020 04:09
Install Caffe on NVIDIA Jetson TK1 LT4 21.2 - CUDA 6.5
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
@jetsonhacks
jetsonhacks / installcuDNNR2.sh
Last active March 8, 2017 06:19
NVIDIA Jetson TK1 - Install cuDNN R2
#!/bin/sh
# Install cuDNN R2 on NVIDIA Jetson TK1
# Register as a NVIDIA developer and download the cuDNN package
# Package is named cudnn-6.5-linux-ARMv7-R2-rc1.tgz
# This script and the cuDNN package should be in the same directory, usually ~/Downloads
# This script places the library and include files for cudnn in the CUDA 6.5 directories
# Make sure this is executing as root
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
@jetsonhacks
jetsonhacks / installcuDNNR1.sh
Created January 20, 2015 00:02
install cuDNN Release candidate 1
#!/bin/sh
# Install cuDNN R1 on NVIDIA Jetson TK1
# Register as a NVIDIA developer and download the cuDNN package
# Package is named cudnn-6.5-linux-armv7-R1.tgz
# This script and the cuDNN package should be in the same directory, usually ~/Downloads
# This script places the library and include files for cudnn in the CUDA 6.5 directories
# Make sure this is executing as root
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""