https://elinux.org/api.php?action=feedcontributions&user=Turpinator&feedformat=atomeLinux.org - User contributions [en]2024-03-29T13:13:53ZUser contributionsMediaWiki 1.31.0https://elinux.org/index.php?title=Jetson/Kodi_(XBMC)&diff=387116Jetson/Kodi (XBMC)2015-08-11T15:12:11Z<p>Turpinator: added testing PPA link</p>
<hr />
<div>== Kodi (XBMC) for Jetson TK1 ==<br />
<br />
Current status: Full hardware-accelerated video decoding & rendering, with GLES/EGL and OMX on X.Org.<br />
<br />
== Installation ==<br />
<br />
If you have old non-PPA version installed, remove it first and delete all<br />
old Kodi settings (be sure to take a backup, if you have made any special<br />
settings):<br />
sudo apt-get remove xbmc xbmc-bin<br />
rm -rf $HOME/.xbmc<br />
<br />
If you have not yet enabled universe, enable it now:<br />
sudo apt-add-repository universe<br />
<br />
Add PPA for the Kodi, update and install Kodi:<br />
sudo add-apt-repository ppa:kulve/xbmc-jetson-tk1<br />
sudo apt-get update<br />
sudo apt-get install kodi<br />
<br />
If you want to include PVR support then you will need to install the correct PVR add-on. <br />
Run the following to find which add-on's are available:<br />
(sudo) apt-cache search xbmc-pvr<br />
<br />
Then install the one relevant using:<br />
sudo apt-get install <package><br />
<br />
== PVR Clients ==<br />
<br />
If the above easy steps don't work or you just want the latest then you can get<br />
them [https://github.com/opdenkamp/xbmc-pvr-addons here].<br />
<br />
If you dont have git, install it (you also wont have other stuff):<br />
sudo apt-get install git autoconf libtool build-essential<br />
<br />
Now clone the pvr add-on's:<br />
git clone https://github.com/opdenkamp/xbmc-pvr-addons.git<br />
<br />
Jump to the newly created dir:<br />
cd xbmc-pvr-addons/<br />
<br />
Now following the instructions on the wiki:<br />
./bootstrap<br />
./configure --prefix=/usr/share/kodi/<br />
make install<br />
<br />
The easiest way is to create a zip and install from zip:<br />
./bootstrap<br />
./configure<br />
make zip<br />
<br />
== Performance Tips ==<br />
<br />
It seems Kodi only uses the CPU cores that are online when Kodi starts, so I recommend<br />
maximizing CPU performance before starting Kodi / XBMC.<br />
<br />
For 4k/UltraHD/2160p TV you need to set the maximum GPU frequency as well.<br />
<br />
Commands to adjust performance only last until a reboot (or until something else changes them), so you can add commands to your "/etc/rc.local" bootup script if you want them to be run automatically on every boot. It's possible that something may change them later if you don't use Kodi soon after bootup, so you might want to also run "sudo /etc/rc.local" again just before starting Kodi / XBMC.<br />
<br />
Full details about adjust these are on the [[Jetson/Performance|Jetson Performance]] page, but for Kodi / XBMC with hardware decoding, it is usually good enough to just force all CPU cores of [[Jetson TK1]] online on every bootup, without forcing the CPU to run at max clock speeds.<br />
<br />
So open the bootup file on Jetson:<br />
sudo nano /etc/rc.local<br />
<br />
And enter these contents:<br />
# Turn on all 4 CPU cores, so that Kodi / XBMC sees them when it starts.<br />
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable<br />
echo 1 > /sys/devices/system/cpu/cpu0/online<br />
echo 1 > /sys/devices/system/cpu/cpu1/online<br />
echo 1 > /sys/devices/system/cpu/cpu2/online<br />
echo 1 > /sys/devices/system/cpu/cpu3/online<br />
<br />
exit 0<br />
<br />
And if you want max performance such as for 4K / Ultra HD / 2160p video, also add these extra commands to the file above, just above the "exit 0" line:<br />
# Use max CPU performance.<br />
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
<br />
# Use max GPU performance.<br />
echo 852000000 > /sys/kernel/debug/clock/override.gbus/rate<br />
echo 1 > /sys/kernel/debug/clock/override.gbus/state<br />
<br />
(For more details about how to adjust the CPU and GPU performance, go to the [[Jetson/Performance|Performance]] page).<br />
<br />
== Playback Quality Tips ==<br />
<br />
Use Kodi Audio configuration under system settings to enable HDMI audio.<br />
<br />
For jitter free video playback I recommend allowing Kodi to to adjust TV<br />
refresh rate always. For that you need to enable the Expert Settings and enable<br />
"Adjust display refresh rate to match video". For instructions, see:<br />
http://wiki.xbmc.org/index.php?title=Settings/Videos<br />
<br />
With limited testing I suggest selecting Audio Clock as the A/V sync method.<br />
<br />
== Testing Betas ==<br />
To test the latest version (currently 15.1rc1), simply add the testing PPA, update, and install.<br />
sudo add-apt-repository ppa:kulve/kodi-testing-jetson-tk1<br />
sudo apt-get update<br />
sudo apt-get install kodi</div>Turpinatorhttps://elinux.org/index.php?title=Jetson_TK1&diff=366086Jetson TK12014-12-28T21:55:26Z<p>Turpinator: Just tested fan pins, runs at 12V.</p>
<hr />
<div>{{TOC right}}<br />
<br />
== About this site ==<br />
This is the official Wiki for embedded Tegra & the Jetson TK1 board, maintained by both the community and NVIDIA.<br />
<br />
The other embedded Tegra community sites with official NVIDIA support are:<br />
* The [https://devtalk.nvidia.com/default/board/139/ forum] for discussing embedded Tegra & Jetson TK1 issues with the community & NVIDIA.<br />
* The [https://plus.google.com/114318922342198493952 blog] to stay updated with the latest news & plans for embedded Tegra & Jetson TK1 from NVIDIA.<br />
<br />
=== About Tegra K1 ===<br />
Tegra K1 is the world's first chip to have the same advanced features & architecture as a modern desktop GPU while still using the low power draw of a mobile chip! The Jetson TK1 board therefore allows embedded devices to use the exact same CUDA code that would also run on a desktop GPU (used by over 100,000 developers), with similar levels of GPU-accelerated performance as a desktop!<br />
<br />
=== About Jetson TK1 ===<br />
[[File:nvidia-tegra124-jetson-tk1-labelled.jpg|800px|right|Jetson TK1, "the world's first embedded supercomputer!"]]<br />
Jetson TK1 is NVIDIA's embedded Linux development platform featuring a Tegra K1 SOC (CPU+GPU+ISP in a single chip), selling for $192 USD ($1 per CUDA core!). Jetson TK1 comes pre-installed with [[Tegra/Downstream_SW/Linux4Tegra|Linux4Tegra]] OS (basically Ubuntu 14.04 with pre-configured drivers). There is also some official support for running other distributions using the mainline kernel, discussed further in the [[#Distributions|Distributions]] and [[#Mainline|Mainline]] kernel sections below.<br />
<br />
Besides the quad-core 2.3GHz ARM Cortex-A15 CPU and the revolutionary Tegra K1 GPU, the Jetson TK1 board includes similar features as a Raspberry Pi but also some PC-oriented features such as SATA, mini-PCIe and a fan to allow continuous operation under heavy workloads:<br />
<br />
=== Hardware Features ===<br />
* '''Dimensions:''' 5" x 5" (127mm x 127mm) board<br />
* [[Tegra/SoCs#Tegra124|Tegra K1 SOC]] (CPU+GPU+ISP in a single chip, with [[Jetson/Jetson_TK1_Power#Typical_power_draw_of_Jetson_TK1|typical power consumption between 1 to 5 Watts]]):<br />
** '''GPU:''' NVIDIA [http://en.wikipedia.org/wiki/Kepler_%28microarchitecture%29 Kepler] "GK20a" GPU with 192 SM3.2 CUDA cores (over 300 GFLOPS!)<br />
** '''CPU:''' NVIDIA "4-Plus-1" 2.32GHz ARM quad-core [http://infocenter.arm.com/help/topic/com.arm.doc.ddi0438h/index.html Cortex-A15] CPU with Cortex-A15 battery-saving shadow-core<br />
* '''DRAM:''' 2GB DDR3L 933MHz EMC x16 using 64-bit data width<br />
* '''Storage:''' 16GB fast eMMC 4.51 (routed to SDMMC4)<br />
* '''ROM:''' 4MB SPI boot flash (routed to SPI4)<br />
* '''[[Jetson/mini-PCIe|mini-PCIe]]:''' a half-height single-lane PEX slot (such as for Wifi, SSD RAID, FireWire or Ethernet addon cards)<br />
* '''SD/MMC card:''' a full-size slot (routed to SDMMC3)<br />
* '''[[Jetson/Cameras#Enabling_support_for_USB_3.0|USB 3.0]]:''' a full-size Type-A female socket<br />
* '''USB 2.0:''' a micro-AB female socket (for connecting to a PC, but can also be used as a spare USB 2.0 port using a [http://www.amazon.com/USB-Micro-Female-Male-Adaptor/dp/B0023FTRUO micro-B male to female Type-A adapter] that is sometimes included)<br />
* '''HDMI:''' a full-size port<br />
* '''RS232:''' a full-size DB9 serial port (routed to UART4)<br />
* '''[[Jetson/Audio|Audio]]:''' an ALC5639 Realtek HD Audio codec with Mic in and Line out jacks (routed to DAP2)<br />
* '''Ethernet:''' a RTL8111GS Realtek 10/100/1000Base-T Gigabit LAN port using PEX<br />
* '''SATA:''' a full-size port that supports 2.5" and 3.5" disks, but is not hot-pluggable. (Turn off the power before plugging in SATA disk drives)<br />
* '''JTAG:''' a 2x10-pin 0.1" port for debugging<br />
* '''[[Jetson/Jetson_TK1_Power|Power]]:''' a 12V DC barrel power jack and a 4-pin PC IDE power connector, using AS3722 PMIC<br />
* '''Fan:''' a fan-heatsink running on 12V (to allow safely running intense workloads continuously, but can usually be [[Jetson/Thermal#Replacing_the_fan_with_a_heatsink|replaced by a heat-spreader or heatsink]])<br />
<br />
The following signals are available through the 125-pin 2mm-pitch expansion port:<br />
* '''[[Jetson/Cameras#CSI_MIPI|Camera ports]]:''' 2 fast CSI-2 MIPI camera ports (one 4-lane and one 1-lane)<br />
* '''LCD port:''' LVDS and eDP Display Panel<br />
* '''Touchscreen ports:''' Touch SPI 1 x 4-lane + 1 x 1-lane CSI-2<br />
* '''UART'''<br />
* '''HSIC'''<br />
* '''[[Jetson/I2C|I2C]]:''' 3 ports<br />
* '''[[Jetson/GPIO|GPIO]]:''' 7 x GPIO pins (1.8V). Camera CSI pins can also be used for extra GPIO if you don't use both cameras.<br />
<br />
Front panel connector:<br />
*Green - Power LED<br />
*Orange - HDD LED<br />
*Red - Power Button<br />
*Purple / Blue - Reset Button<br />
<br />
Hardware-accelerated APIs supported:<br />
* '''CUDA''' 6.0 (SM3.2, roughly the same as desktop SM3.5)<br />
* '''[[Jetson/Tutorials/OpenGL|OpenGL]]''' 4.4<br />
* '''OpenGL ES''' 3.1<br />
* '''[[Jetson/H264_Codec|OpenMAX IL multimedia codec]]''' including H.264, VC-1 and VP8 through Gstreamer<br />
* '''NPP''' (CUDA optimized NVIDIA Performance Primitives)<br />
* '''[[Jetson/Computer_Vision_Performance#Hardware_Acceleration_of_OpenCV|OpenCV4Tegra]]''' (NEON + GLSL + quad-core CPU optimizations)<br />
* '''VisionWorks'''<br />
<br />
== Buying Guide ==<br />
Where can I get one and for how much?<br />
* Visit the [https://developer.nvidia.com/jetson-tk1 NVIDIA store] then choose a distributor in USA, or click on "International Orders" to see other countries it is available from including UK, Germany, France, Italy, Japan, Russia, China, Singapore, and Australia.<br />
* Jetson TK1 costs $192 ($1 per CUDA core!) in USA.<br />
* The package includes a power supply (with a detachable US mains cord), a USB micro-B cable for connecting it to a PC, and usually a [http://www.amazon.com/USB-Micro-Female-Male-Adaptor/dp/B0023FTRUO USB micro-B to female USB-A adapter] allowing you to have 2 regular USB ports.<br />
<br />
== An important step before connecting the Jetson to Internet ==<br />
It is really important to tell to "apt" to not overwrite the file "libglx.so" during upgrades. "libglx.so" is a specific file of the NVidia's graphics driver and its replacement makes the graphics environment of your Jetson unusable:<br />
sudo apt-mark hold xserver-xorg-core<br />
Now you can allow Ubuntu to update itself automatically or you can run "$ apt-get upgrade" without problems.<br />
You can get more information about this issue on the [https://devtalk.nvidia.com/default/topic/775070/embedded-systems/notice-on-apt-get-upgrade-libglx-so-corruption/ official development forum]. R19 only? believe fixed for R21.<br />
<br />
== Basic setup steps to access the board and access internet ==<br />
Whether you want to sew your embedded Tegra into a backpack or put it in a robot or simply use it as an ultra powerful media center, the first thing you should do with a new Jetson TK1 board is attach it to a HDMI monitor & keyboard & mouse to make sure it works and get familiar with it for a few minutes. The device can be accessed in 2 possible ways, depending on whether you want to plug a keyboard & mouse & monitor directly into the Jetson TK1 board or you want to plug an Ethernet cable between your device and a PC or laptop or router and access it through a network:<br />
<br />
<div style="margin-left:20px;"><br />
=== Direct access to a Jetson board using its own keyboard & mouse & monitor ===<br />
The [http://developer.download.nvidia.com/embedded/jetson/TK1/docs/Jetson_TK1_QSG_134sq_Jun14_rev7.pdf Jetson TK1 Quick Start Guide] (included as a booklet with your Jetson TK1) shows how to use the Jetson TK1 board as a mini standalone computer. Basically, you plug in a HDMI monitor or TV, plug a keyboard into the USB3.0 port, plug a mouse into the included micro-B to female USB adapter and plug that into the micro-B USB2.0 port on the board. Then plug the 12V power supply in, press the small POWER button, then watch it boot up into [[Tegra/Downstream_SW/Linux4Tegra|Linux4Tegra]] (Ubuntu 14.04 with some drivers pre-configured). When it asks for the password for user "ubuntu", just type "ubuntu" to log in. If you have an Ethernet router then simply plug an Ethernet cable from the board into your router (or plug in a USB Wifi dongle) to have internet access, and you are ready.<br />
</div><br />
<br />
<div style="margin-left:20px;"><br />
=== [[Jetson/Remote Access|Remote access to a Jetson board through the Ethernet port]] ===<br />
To access the board remotely through a local network from a PC or laptop, follow the [[Jetson/Remote Access|Remote Access]] instructions so you can control the device from the keyboard & mouse & monitor on your PC or laptop and share your desktop's Wifi or Ethernet internet access to the attached device.<br />
</div><br />
<br />
== Recommended first steps now that your board has internet access ==<br />
Open a command-line terminal to perform some initial operations. If you are using the Jetson TK1's graphical environment then click on the top-left icon in Ubuntu Unity and type "terminal" to open a command shell, or if you have remote access to the device through a network then open an SSH command shell into your device from your desktop such as by running "ssh ubuntu@tegra-ubuntu". Now you are ready for initial configuration.<br />
<br />
Add the Universe package repositories, since you will often need packages from Universe for code development:<br />
sudo apt-add-repository universe<br />
sudo apt-get update<br />
<br />
===== If you will use the shell command-line a lot =====<br />
Install "bash-completion" (it allows you to hit the "Tab" key to auto-complete your shell commands) and "command-not-found" (it shows which package you probably need to install if you run an unavailable command). These 2 tools are extremely useful when using the commandline, but were not installed by default in Ubuntu 14.04. Simply run this:<br />
sudo apt-get install bash-completion command-not-found<br />
exit<br />
Note: now you need to log back in for it to start using bash-completion and command-not-found.<br />
<br />
You probably should also change the shell prompt (by adjusting "PS1" in the ".bashrc" file in your home directory) to be more useful, such as getting the shell prompt to have a different color than regular commands, and make it obvious if a command returned with an error. There are thousands of custom .bashrc configurations on the web, including [https://github.com/shervinemami/Stuff Shervin's] that provides a different colored shell prompt depending on whether a command was succesful or returned an error.<br />
<br />
===== If you will use the graphical environment (Unity) a lot =====<br />
You might want to try some suggestions at "http://itsfoss.com/things-to-do-after-installing-ubuntu-14-04/" or similar, such as to turn off the desktop shopping suggestions that are enabled by default in Ubuntu 14.04 (despite the spyware concerns discussed by huge numbers of people) by running this:<br />
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', \<br />
'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', \<br />
'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"<br />
<br />
===== If you need more disk space on the eMMC =====<br />
<br />
The eMMC on the Jetson has a capacity of 16GB, however some instructions or boards default to only using 8GB of the drive ([http://elinux.org/Talk:Jetson_TK1#eMMC_8Gb.3F_860 or 12GB, see discussion]). If you require more disk space in your rootfs such as for installing toolkits or compiling large projects, you can flash the Jetson (from a Linux desktop) to have a larger filesystem (note that this will erase all data on the Jetson TK1, and it takes roughly 1 hour to flash the whole eMMC!):<br />
<br />
<pre>[user@host Linux_for_Tegra]$ sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1<br />
...<br />
sending file: system.img<br />
/ 15032385536/15032385536 bytes sent<br />
system.img sent successfully<br />
...<br />
Create, format and download took 2791 Secs<br />
Time taken for flashing 2792 Secs</pre><br />
<br />
The maximum value of the <code>flash.sh -S</code> flag that works successfully is 14580MiB. Greater values (like 16GiB) are beyond the capacity of the eMMC when the other system-required partitions are included.<br />
<br />
===== More recommended Linux tips for a Jetson TK1 =====<br />
Some more tips (such as how to speed up SSH logins, login automatically, share your keyboard & mouse, etc, are in a [https://devtalk.nvidia.com/default/topic/785551/embedded-systems/my-jetson-focused-linux-tips-and-tricks/ forum discussion].<br />
<br />
== Shutting down Jetson TK1 safely ==<br />
Just like any Linux computer, the recommended way to shut-down or turn off Jetson TK1 is to click Shutdown in the GUI or run this in a terminal, to ensure the filesystem will not be corrupt:<br />
sudo shutdown -h now<br />
<br />
<div id="Emulators"></div><br />
<br />
== Emulators for developing with Jetson TK1 ==<br />
* [[Jetson/Emulators|'''Emulators:''']] which Windows, OSX, Linux or SteamOS products with a powerful Nvidia GPU are economic and suitable for developing Jetson software?<br />
<br />
<br />
<div id="Books"></div><br />
<br />
== Books ==<br />
<br />
[http://bitkistl.blogspot.co.at/2014/09/explore-your-jetson-tk1-e-book.html Explore your Jetson TK1] (e-book)<br />
<br />
[[The JetPack Cookbook|The JetPack Cookbook]] (proposed)<br />
<br />
<br />
<div id="Tutorials"></div><br />
<br />
== Tutorials for developing with Jetson TK1 ==<br />
The following are tutorial projects for hardware and/or software development. They show the easiest way to do a certain task, while the [[#Info|Reference Information section]] below has more detailed pages. If you have something useful to contribute about Jetson TK1 or embedded Tegra then please do so.<br />
<br />
{| class="wikitable sortable" style="font-size: 90%; text-align: center; width: auto;"<br />
|-<br />
! Tutorial<br />
! Description<br />
! Programming Difficulty<br />
! Electronics Difficulty<br />
|-<br />
! [[Jetson/Hello World|Hello World]]<br />
| Create a simple program that prints "Hello World!", by compiling code directly on your device<br />
| #<br />
| <br />
|-<br />
! [[Jetson/Tutorials/CUDA|CUDA]]<br />
| Install CUDA then build & run some CUDA sample projects<br />
| #<br />
|<br />
|-<br />
! [[Jetson/Tutorials/Nsight|Nsight]]<br />
| Documentation and tutorials on GPU debugging and profiling with Nsight, which is installed with CUDA<br />
| #<br />
|<br />
|-<br />
! [[Jetson/Tutorials/OpenCV|OpenCV]]<br />
| Install OpenCV then grab camera frames or build & run some OpenCV samples<br />
| #<br />
| <br />
|-<br />
! [[Jetson/Tutorials/OpenGL|OpenGL]]<br />
| Links to many OpenGL and OpenGL ES sample projects<br />
| #<br />
|<br />
|-<br />
! [[Jetson/Tutorials/Full Body Detection|Full Body Detection]]<br />
| Shows how to perform full body detection (something that even desktop CPUs are too slow for!) from a webcam and display the face, using OpenCV<br />
| #<br />
|<br />
|-<br />
! [[Jetson/Tutorials/GPIO|GPIO Input & Output]]<br />
| Turn on an LED or send a signal to an Arduino microcontroller using GPIO<br />
| #<br />
| #<br />
|-<br />
! [[Jetson/Tutorials/Vision-controlled GPIO|Vision-controlled GPIO]]<br />
| Turn on an LED whenever a face is detected in your camera<br />
| #<br />
| #<br />
|-<br />
! [[Jetson/Tutorials/Battery Power|Battery Power]]<br />
| Power your Jetson TK1 from a battery pack<br />
|<br />
| #<br />
|-<br />
! [[Jetson/Tutorials/Automatic Pan Tilt|Automatic Pan Tilt]]<br />
| Build an autonomous pan-tilt face tracking camera, that tracks faces as they move around<br />
| #<br />
| #<br />
|-<br />
! [[Jetson/Tutorials/Optical Flow|Optical Flow Motion]]<br />
| Generate the optical flow motion vectors to see how things are moving<br />
| ##<br />
|<br />
|-<br />
! [[Jetson/Tutorials/Video Stabilization|Video Stabilization]]<br />
| Real-time video stabilization such as for a robot's onboard camera<br />
| ##<br />
|<br />
|-<br />
! [[Jetson/Tutorials/Program An Arduino|Program An Arduino]]<br />
| Program an Arduino microcontroller from your Jetson TK1 (instead of from a PC)<br />
| ##<br />
|<br />
|-<br />
! [[Jetson/Tutorials/Communicate To Arduino|Communicate To An Arduino]]<br />
| Connect an Arduino board to a Jetson TK1 board, with communication between then<br />
| ##<br />
| ##<br />
|-<br />
! [[Jetson/Tutorials/Follower Robot|Follower Robot]]<br />
| Get a wheeled robot to drive towards the nearest person<br />
| ##<br />
| ##<br />
|-<br />
! [[Jetson/Tutorials/Walking Follower Robot|Walking Follower Robot]]<br />
| Get a 2-legged robot to walk towards the nearest person<br />
| ###<br />
| ##<br />
|}<br />
<br />
<br />
<div id="Info"></div><br />
<br />
== Jetson TK1 Reference Information (more detailed than the tutorials above) ==<br />
==== General Topics ====<br />
* [https://developer.nvidia.com/jetson-tk1-support '''JetsonTK1 Support Page:'''] Includes a lot of the open-source hardware documents, such as the mechanical drawings, Bill of Materials (BOM), electrical circuit schematics, CAD files, Jetson TK1 module spec, Tegra K1 SOC Technical Reference Manual (TRM), etc.<br />
* [[Jetson/Jetson TK1 System Info|'''System Info:''']] Find out the hardware info & what is available on the Jetson TK1 such as disk space, RAM, and devices.<br />
* [[Jetson/Cloning|'''Cloning & Backup''']] Save the Jetson's eMMC (system.img) via the flash port and restore it to other Jetson boards.<br />
<br />
==== Networking Topics ====<br />
* [[Jetson/Network Adapters|'''Wifi & Ethernet Adapters:''']] Discusses which Wifi or Ethernet cards have been tested on Jetson TK1.<br />
* [[Jetson/Remote Access|'''Remote Access:''']] Control the device from your PC or laptop, and share your desktop's Wifi or Ethernet internet access to the attached device.<br />
<br />
==== Software Topics ====<br />
* [[Jetson/Installing_CUDA|'''CUDA Installation:''']] How to install the CUDA toolkit.<br />
* [[Jetson/Installing_VisionWorks|'''VisionWorks Installation:''']] How to install the VisionWorks toolkit.<br />
* [[Jetson/Installing_OpenCV|'''OpenCV Installation:''']] How to install OpenCV, including building from source.<br />
* [[Jetson/Installing_ArrayFire|'''ArrayFire Installation:''']] How to install ArrayFire for Tegra and getting started.<br />
* [[Jetson/Kodi_(XBMC)|'''Kodi (XBMC) Installation:''']] How to install XBMC Media Center such as for a green HTPC.<br />
* [[Jetson/Plex|'''Plex Media Server Installation:''']] How to install Plex Media Server such as for a green HTPC.<br />
* [[Jetson/Libraries|'''Libraries:''']] Libraries that have been tested on Jetson TK1.<br />
* [[Tegra/Downstream_SW/Linux4Tegra/WebBrowsers|'''Web Browsers:''']] How to get web browsers working, including Flash for watching youtube videos in Chromium.<br />
* [[Jetson/H264 Codec|'''H.264 Codec:''']] Hardware-accelerated video encoder/decoder for H.264 and other multimedia formats.<br />
* [[Jetson/cuDNN|'''cuDNN:''']] GPU-accelerated Machine Learning & Deep Neural Network library.<br />
<br />
==== Performance and Power Topics ====<br />
* [[Jetson/Performance|'''Performance:''']] How to maximize or minimize CPU & GPU clocks for different performance & power draw.<br />
* [[Jetson/Jetson TK1 Power|'''Power Management:''']] Electrical power related issues, such as powering the board from a battery or seeing how much power is drawn.<br />
* [[Jetson/Thermal|'''Thermal:''']] How to replace the fan with a heat-spreader or heatsink, and measure the board's temperatures.<br />
* [[Jetson/Graphics_Performance|'''Graphics Performance:''']] Discusses graphics performance of the Tegra TK1 on the board, including comparison with competing solutions.<br />
* [[Jetson/Computer Vision Performance|'''Computer Vision Performance & Power Draw:''']] Describes the different Tegra hardware optimizations in OpenCV, and shows power & perf measurements for many computer vision applications in OpenCV, CUDA and VisionWorks.<br />
<br />
==== Hardware Expansion Topics ====<br />
* [[Jetson/Cameras|'''Cameras & Webcams:''']] Discusses USB cameras and CSI cameras, stereo cameras and Time-Of-Flight 3D depth cameras.<br />
* [[Jetson/mini-PCIe|'''mini-PCIe Add-on Cards:''']] Shows some possible add-on cards that can be used in the mini-PCIe port.<br />
* [[Jetson/GPIO|'''GPIO:''']] How to control digital output pins and read input data pins on Jetson TK1.<br />
* [[Jetson/I2C|'''I2C:''']] How to communicate between microcontrollers & devices using I2C on Jetson TK1.<br />
* [[Jetson/Bluetooth|'''Bluetooth:''']] Use wireless Bluetooth devices such as keyboards, mice & speakers, or communicate to a smartphone or tablet.<br />
* [[Jetson/Enclosures|'''Enclosures & Cases:''']] Various cases that are available to protect a Jetson TK1.<br />
* [[Jetson/Audio|'''Audio:''']] Issues related to audio input or output, such as microphones or speakers.<br />
* [[Jetson/RTC|'''RTC:''']] Add battery backup RTC and support it using the Grinch Custom Kernel.<br />
<br />
== Projects using Jetson TK1 ==<br />
The following are descriptions, photos and/or videos of projects featuring Jetson TK1. Feel free to add your own!<br />
{| class="wikitable" style="text-align: center;"<br />
|-<br />
| [[File:WaylandWeston_JetsonTK1.jpg|320px|Linux 3.15 + Wayland + Weston + Nouveau running on Jetson TK1]]<br />
[http://www.codethink.co.uk/2014/06/12/no-secret-sauce-just-open-source Upstream Linux 3.15 + Wayland + Weston + Nouveau running a 100% open-source OS on Jetson TK1, by CodeThink in UK]. If you want to try a similar setup on your Jetson TK1, read [http://listmaster.pepperfish.net/pipermail/baserock-dev-baserock.org/2014-June/006529.html this] and [http://listmaster.pepperfish.net/pipermail/baserock-dev-baserock.org/2014-June/006566.html this].<br />
|| [[File:NVIDIA_WalkingRobot.jpg|180px|NVIDIA SCOL robot]]<br />
[https://plus.google.com/116884386788836719107/posts/Be9thtKZwW7 NVIDIA's SCOL "Super-Computer-On-Legs" robot, by Shervin Emami in Australia]. Performs Optical Flow video stabilization and HOG person detection to walk towards nearby people. [[Jetson/Tutorials/Walking_Follower_Robot|Tutorial]] being planned.<br />
|| [[File:GE_JetsonTK1.jpg|360px|GE Lidar + Optical Flow demo]]<br />
[http://devblogs.nvidia.com/parallelforall/low-power-sensing-autonomy-nvidia-jetson-tk1/ Jetson TK1 Lidar range finder + camera Optical Flow robotics demo by General Electric Intelligent Platforms in USA]. GE IP are developing a ruggedized Tegra K1 based module.<br />
|-<br />
| [[File:ExplorerRobot.jpg|250px|Explorer Robot]]<br />
[https://plus.google.com/b/114318922342198493952/+RaffaelloBonghi/posts/2hdF5VtTG4m Explorer Robot by the Officine Robotiche in Italy]<br />
|| [[File:MyzharBot2.jpg|300px|MyzharBot Robot]]<br />
[http://myzharbot.robot-home.it MyzharBot by Walter Lucetti in Italy] is a crawler robot made to study Navigation algorithms based on Computer Vision, Machine Learning and 3D Sensors. The project is open source and open hardware and has its own blog where you can find every information to replicate it.<br />
|| [[File:Project_turbo.jpg|250px|Project TURBO by GE]]<br />
Project TURBO (TK1 Unmanned Reconnaissance Bot) is a low-cost mobile research platform developed by GE Intelligent Platforms, exploring CUDA-accelerated autonomy, sensing & perception powered by Tegra K1.<br />
|-<br />
| [[File:Jetson_Cluster.jpg|270px|Cluster Computer]]<br />
Several users are building cluster computers using a handful of Jetson TK1's:<br />
* User [https://devtalk.nvidia.com/default/topic/766554/embedded-systems/-jetson-tk1-power-supply-dc-or-ac-/ rralf is using 10-15 Jetson TK1's].<br />
* User [https://devtalk.nvidia.com/default/topic/761234/#4274666 Purex is using 8 Jetson TK1's].<br />
|[[File:JetsonBalloonFinderOutputScreenshot.png|300px]]<br />
A user is using CUDA accelerated computer vision to find balloons (or other red round things). [http://pleasingsoftware.blogspot.com/2014/06/identifying-balloons-using-computer.html This article explains the algorithm and has a link to the source.]<br />
|[[File:Jedroid v1.0.jpg|300px]]<br />
'''Project Jedroid'''<br />
Android on Jetson TK1.<br />
Pure AOSP, Pure open source code. <br />
[http://http://jetson.co/wiki/main_page/development Jedroid source code now avaiable, let's work on jedroid together]<br />
|-<br />
|[[File:Nbajetson1.jpg|300px]]<br />
NBA 2K14 Android game using Jedroid on JetsonTK1<br />
[https://www.youtube.com/watch?v=SjgPy0R1fms Demo video]<br />
|[[File:TR4Tegra.jpg|231px|Transformative Reality]]<br />
TR4Tegra. Smart-glasses with a depth camera, connected to Jetson TK1 in a backpack, detects object location and notifies a blind user with a ~25x25 neural implant<br />
[https://plus.google.com/u/0/+WaiHoLi/posts/UxtarcqvUJb info]<br />
<br />
|[[File:VORviz.png|300px]]<br />
Monocular Visual Odometry for UAV using ROS on JETSON TK1<br />
[http://www.robnsngh.com/ Project Info]<br />
<br />
|}<br />
<br />
<br />
<div id="Distributions"></div><br />
<br />
== Linux distributions running on Tegra ==<br />
Jetson TK1 comes preloaded with NVIDIA's Linux4Tegra (L4T) distribution. However it is possible to install other distributions on a Tegra device:<br />
<br />
* [[Tegra/Downstream_SW/Linux4Tegra|Linux4Tegra]] (L4T) distribution: basically Ubuntu 14.04 with pre-configured drivers for bootloader, kernel, OpenGL, X.Org, Multimedia, etc.<br />
* [[Tegra/Mainline_SW/Gentoo_From_SD_Card|Gentoo Linux from SD]]: run Gentoo directly on an SD-card without modifying the contents of the eMMC storage. (Will soon support many other Linux distros such as Debian, Ubuntu, Redhat, etc!)<br />
* [[Tegra/Downstream_SW/Gentoo_From_eMMC|Gentoo Linux]]: run Gentoo Linux (from eMMC) instead of Ubuntu Linux.<br />
* [https://devtalk.nvidia.com/default/topic/767885/embedded-systems/android-on-jetson-tk1/ Android]: The user "lucasdai" is working on a community-supported version of Android on Jetson TK1.<br />
* others?<br />
<br />
<br />
<div id="Mainline"></div><br />
<br />
== Upstream/mainline OS & kernel system software on Tegra ==<br />
NVIDIA's Tegra SoCs are well supported by mainline OSS such as Linux and U-Boot. This section contains an index of topics related to running mainline software on Tegra.<br />
<br />
* [[Tegra/Mainline SW/U-Boot|U-Boot]].<br />
* [[Tegra/Mainline SW/Linux kernel|Linux kernel]].<br />
* [[Tegra/Mainline SW/Nouveau|Nouveau driver]].<br />
* [[Tegra/Boards/NVIDIA_Jetson_TK1|Issues specific to running mainline Linux on the Jetson TK1 board]].<br />
<br />
== Other embedded Tegra boards created by NVIDIA ==<br />
Jetson TK1 was the first embedded board that NVIDIA created for the general public, but there have also been some other [[Tegra/Boards|Tegra boards]], including the automotive-grade Tegra-K1 based [http://www.nvidia.com/object/visual-computing-module.html Visual Compute Module] and the [http://www.nvidia.com/object/jetson-automotive-development-platform.html Jetson Pro] development platform, both for the automotive industry (requires an NDA and large sales figures, etc).<br />
<br />
== Other SOCs created by NVIDIA ==<br />
[[Tegra/SoCs|SOCs]]: NVIDIA made several previous generations of Tegra SOCs for the mobile, automotive and MP3 player industries.<br />
<br />
== Other links ==<br />
[[Tegra/Resources|Resources]] is a list of links to Tegra-related documentation and code outside of this wiki, such as TRMs and mainline kernel links.<br />
<br />
[https://plus.google.com/114318922342198493952 Google+]<br />
<br />
== References ==<br />
<references/><br />
<br />
[[Category:NVIDIA]]<br />
[[Category:Tegra]]<br />
[[Category:Jetson]]</div>Turpinatorhttps://elinux.org/index.php?title=Jetson/Thermal&diff=366080Jetson/Thermal2014-12-28T21:54:25Z<p>Turpinator: Just tested fan pins, runs at 12V.</p>
<hr />
<div>== Introduction ==<br />
In a powerful ARM-based processor like Tegra-K1, the performance, power draw and temperature are closely linked to each other. For example, the chip will reduce the available performance if the temperature is too high, since this will reduce the power draw and eventually lower the temperature of the Tegra chip. Therefore you might want to read the [[Jetson/Performance|Performance]] and [[Jetson/Jetson_TK1_Power|Power]] pages in addition to this page.<br />
<br />
There are various temperature sensors on the [[Jetson TK1]] board and inside the Tegra K1 chip. Each temperature sensor is in a different "thermal zone", or location where that temperature is measured.<br />
<br />
== Thermal Zones ==<br />
To see the names of the thermal zones, run this:<br />
cat /sys/devices/virtual/thermal/thermal_zone*/type<br />
<br />
* "Tboard_tegra" measures the temperature of the [[Jetson TK1]] board (though I'm not sure of the exact location).<br />
* "Tdiode_tegra" measures the temperature at the edge of the [[Jetson TK1]] board.<br />
* The zones with "-therm" in their name are for sensors inside the Tegra SOC.<br />
<br />
== Reading the current temperatures ==<br />
To see the current temperatures of the thermal zones mentioned above, simply run this:<br />
cat /sys/devices/virtual/thermal/thermal_zone*/temp<br />
<br />
=== To repeatedly display the temperature in a GUI App ===<br />
Instead of just displaying it once, you can easily build a GUI app to display the current temperature. First install perl/tk:<br />
sudo apt-get install perl-tk<br />
<br />
Then save the following script as the file "showTemp.pl" in your home folder:<br />
#!/usr/bin/perl -w<br />
# By "peba@inode.at"<br />
<br />
use Tk;<br />
$main=MainWindow->new;<br />
$main->resizable (0,0);<br />
$temp="--";<br />
<br />
$myframe=$main->Frame ();<br />
$myframe->Label (-text => 'Temperature:')->pack ();<br />
$temp_label=$myframe->Label (-text => "$temp")->pack ();<br />
$myframe->pack();<br />
<br />
$main->repeat(1000,\&update_temp_label);<br />
MainLoop;<br />
<br />
sub update_temp_label {<br />
$temp=`cat /sys/devices/virtual/thermal/thermal_zone0/temp`;<br />
$temp_label->configure('-text' => $temp);<br />
}<br />
<br />
<br />
Now make the Perl script executable:<br />
chmod +x ~/showTemp.pl<br />
<br />
To execute it:<br />
~/showTemp.pl<br />
<br />
(Finally, hit Ctrl-C to close it)<br />
<br />
<br />
== Replacing the fan with a heatsink ==<br />
Warning: removal of the fan+heatsink will void the warranty.<br />
<br />
The [[Jetson TK1]] board comes with a large fan+heatsink combo attached to the SOC, to ensure the board is always safe to touch by humans even when running both the CPU & GPU at max performance for long durations. The fan is rated at 12V 1.4W, and runs at 12V. It is usually fine to remove the fan and replace it with a metal heat-spreader plate or heat-sink, such as to reduce power or increase dust-resistance or lifetime or simply to get rid of the fan noise. The fan+heatsink is clearly much larger than it needs to be, so it can be replaced by a small fan or large heatsink without a reduction in performance or safety.<br />
<br />
The Tegra K1 SOC is designed for tablets that use a small heatsink or heat-spreader plate, thus clearly it doesn't require a large fan. But tablets aren't expected to run at full performance for long periods, and you also can't touch the SOC of a tablet with your bare fingers, so NVIDIA decided to use a large surplus fan for [[Jetson TK1]]. If you wish to replace the fan with a heatsink, take into account that if you will be pushing the SOC to its limits for long durations, the SOC might be using upto 10W - 15W of power that you must dissipate with a large heatsink and/or external fan and/or attaching a heatspreader to the metal case of your overall device, otherwise the internal Tegra thermal management may reduce the performance to ensure it won't overheat.<br />
<br />
<br />
=== Known working passive heatspreaders ===<br />
[[File:JetsonTK1_Heatspreader.jpg|300px|thumb|A thin Aluminium heat-spreader attached to a Jetson TK1.]]<br />
<br />
NVIDIA has tested a 2" x 2" heat-spreader (a thin flat sheet of Aluminium) taken from a tablet and found it to be fine for most use-cases. They ran an intense Optical Flow computation on the GPU using ~7 Watts of power in the Tegra K1 SOC and found that the heat-spreader got warm but not too hot to touch. Thus for most light & medium workloads, a heat-spreader is good enough. If you are expecting to run heavy workloads (eg: 4 threads of efficient NEON SIMD CPU code, or efficient CUDA code using the entire GPU) for hours of continuous use, then a heatsink as mentioned above (or obviously the fan-heatsink that comes with [[Jetson TK1]]) is recommended, to ensure there is enough cooling of the Tegra SOC.<br />
<br />
The heat sink mounting holes on the board are 61mm apart. Heat sinks with fixed 59mm hole spacing such as the Enzotech CNB-S1 will not fit.<br />
<br />
<br />
<br />
=== Known working passive heatsinks ===<br />
[[File:jetson_tk1_heatpipe_hsf.jpg|400px|thumb|The [http://uk.connectland.eu/products/fiche/id/360/name/chipset-heatsink Connectland 1504002 Heatsink] attached to a Jetson TK1.]]<br />
<br />
It hasn't been tested by NVIDIA, but rough estimations suggest that a 1.5" x 1.5" x 0.8" Aluminium heatsink (such as an Aluminium [http://www.newark.com/malico/mbh33002-33p-2-6/heat-sink-31x31x33mm/dp/53M8254 Malico MBH33002] or Copper [http://www.newark.com/malico/cmba054949/heat-sink-northbridge/dp/53M7045 Malico CMBA054949] north-bridge heatsink) would allow pushing Tegra K1 to its limits for long durations while not getting hot enough for the SOC to reduce the performance or burn human skin.<br />
<br />
Note that the board's heatsink mounting holes are 61-64mm apart. Heatsinks with a fixed 59mm push pin hole spacing will not mount properly as is.<br />
<br />
A tall but '''tested''' model is the [http://uk.connectland.eu/products/fiche/id/360/name/chipset-heatsink Connectland 1504002 Heatsink] or [http://goo.gl/HGM7DD Deep Cool NBridge8] which is a dual heatpipe copper finned design. They can be found on Amazon UK for around £10, as well as on eBay and some other EU or Chinese mail order retailers. This model comes with tongue and groove links which let you attach the heatsink to the existing holes on the Jetson TK1, see the image on the right for an example.<br />
<br />
Temperatures of the CPU as reported by <tt>/sys/devices/virtual/thermal/thermal_zone0/temp</tt> with the Connectland 1504002 Heatsink were as follows:<br />
<br />
{| class="wikitable" style="text-align: center; width: auto;"<br />
|-<br />
! Ambient temperature !! Idle with stock fan !! Idle with heatsink !! After an hour of burnCortexA9 with heatsink<br />
|-<br />
| 25.8C || 33.5C || 37.5C || 48.5C<br />
|}</div>Turpinator