Skip to content

Instantly share code, notes, and snippets.

@minhoolee
Created March 14, 2016 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minhoolee/152d1492ff4005b7c247 to your computer and use it in GitHub Desktop.
Save minhoolee/152d1492ff4005b7c247 to your computer and use it in GitHub Desktop.
#! /bin/sh
# Install script for Grinch Kernel 21.3, CUDA 6.5, OpenCV4Tegra 21.2 for the NVIDIA Jetson TK1
# Warning: This script is specific for L4T 21.4 (https://developer.nvidia.com/linux-tegra-r214)
# Please substitute the correct versions of the deb files and Grinch kernel for the latest version
# Written by Min Hoo Lee
# March 14, 2016 (3/14/16)
read -p "Have you installed the latest Grinch Kernel [y/n] " -n 1 -r
echo # move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
# Script courtesy of jetsonhacks
# Download the Grinch kernel files
wget http://www.jarzebski.pl/files/jetsontk1/grinch-21.3.4/zImage
wget http://www.jarzebski.pl/files/jetsontk1/grinch-21.3.4/jetson-tk1-grinch-21.3.4-modules.tar.bz2
wget http://www.jarzebski.pl/files/jetsontk1/grinch-21.3.4/jetson-tk1-grinch-21.3.4-firmware.tar.bz2
# Compare the md5sum checksum for the downloaded files to make sure that they are not corrupt
# check zImage
CSUM="a4a4ea10f2fe74fbb6b10eb2a3ad5409"
MD5=$(md5sum zImage | cut -d ' ' -f 1)
if [ "$MD5" != "$CSUM" ]
then
/bin/echo -e "\e[0;31mThe checksum does not match for the file 'zImage'.\e[0m"
echo "Correct checksum: "$CSUM
echo "Checksum of downloaded file: "$MD5
/bin/echo -e "\e[0;31mInstallation Aborted. Please try downloading file again and doing a manual installation.\e[0m"
exit 1
fi
# check modules download
CSUM="3f84d425a13930af681cc463ad4cf3e6"
MD5=$(md5sum jetson-tk1-grinch-21.3.4-modules.tar.bz2 | cut -d ' ' -f 1)
if [ "$MD5" != "$CSUM" ]
then
/bin/echo -e "\e[0;31mThe checksum does not match for the file 'jetson-tk1-grinch-21.3.4-modules.tar.bz2'.\e[0m"
echo "Correct checksum: "$CSUM
echo "Checksum of downloaded file: "$MD5
/bin/echo -e "\e[0;31mInstallation Aborted. Please try downloading file again and doing a manual installation.\e[0m"
exit 1
fi
# check firmware downloads
CSUM="f80d37ca6ae31d03e86707ce0943eb7f"
MD5=$(md5sum jetson-tk1-grinch-21.3.4-firmware.tar.bz2 | cut -d ' ' -f 1)
if [ "$MD5" != "$CSUM" ]
then
/bin/echo -e "\e[0;31mThe checksum does not match for the file 'jetson-tk1-grinch-21.3.4-modules.tar.bz2'.\e[0m"
echo "Correct checksum: "$CSUM
echo "Checksum of downloaded file: "$MD5
/bin/echo -e "\e[0;31mInstallation Aborted. Please try downloading file again and doing a manual installation.\e[0m"
exit 1
fi
/bin/echo -e "\e[0;32mChecksum matches for downloaded files. Installation will now start.\e[0m"
sudo tar -C /lib/modules -vxjf jetson-tk1-grinch-21.3.4-modules.tar.bz2
sudo tar -C /lib -vxjf jetson-tk1-grinch-21.3.4-firmware.tar.bz2
sudo cp zImage /boot/zImage
/bin/echo -e "\e[0;32mGrinch Kernel Installed! Please Reboot.\e[0m"
exit 1
fi
# Make sure to not override the file "libglx.so" by updating the system
sudo apt-mark hold xserver-xorg-core
sudo apt-get update
sudo apt-get install git vim curl cmake g++
# Install cuda 6.5 toolkit for L4T 21.4 (Later versions, download deb from NVIDIA website)
curl http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/cuda-repo-l4t-r21.3-6-5-prod_6.5-42_armhf.deb > cuda-repo-l4t-r21.3-6-5-prod_6.5-42_armhf.deb
suda dpkg -i cuda-repo-l4t-r21.3-6-5-prod_6.5-42_armhf.deb
sudo apt-get update
sudo apt-get install cuda-tookit-6.5
# Install opencv4tegra 21.2 for L4T 21.4 (Later versions, download deb from NVIDIA website)
curl http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.2/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb > 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment