1 – 性能
1.1 硬件
1.2 软件
3 – 系统更新
3.1 自动升级更新, (不建议)
3.2 手动升级更新 , (推荐)
3.2.1 准备
3.2.2 download & build
3.2.3 falshing
3.2.4 update
3.2.5 updating
5 – wifi 无线网卡(Intel 7260)
5.1 直接用 Debian 驱动安装
5.2 升级方式
5.3 使用 Grinch驱动包
5.4 说明
6 – VPN setup
7 – 补足内存不足
9 – 补足硬盘不足 (加SD-CARD)
11 – qt setup

图像处理方面ARM/DSP/FPGA/GPU各有优缺点,知道2014年英伟达推出Jetson系列带GPU的嵌入式超级计算机打破局面。

1 – 性能

Nvidia Jeston Tegra K1:

1.1 硬件

TK1拥有Cortex-A15架构的32bit四核CPU,拥有192核心开普勒GPU, 2GB内存,USB 3.0、HDMI 1.4、SATA、千兆以太网(Realtek RTL8111GS)、音频(Realtek ALC5639)、mini PCI-E
TK1一共四个串口,一个RS232串口和三个TTL电平,英伟达官方不建议使用UART 2,因为他用于开发板的调试;RS232串口存在只能发不能收的问题,目前未解决。TK1的小口micro-USB也可以使用,不过这个mcro-B-male到type-A-female的线不太常见到
USB控制器不支持Kinect V2

1.2 软件

Tk1 提供整个BSP和软件栈,包括 CUDA、OpenGL和Tegra 加速的 OpenCV。Nvidia TK1 comes with a GPU capable of OpenGL 4.4, OpenGL ES 3.1 and CUDA 6.5。
Tk1 自带有Tegra 操作系统,其实就是加入部分优化的ARM Ubuntu,保留了几乎所有Ubuntu 14.04 LST的功能。

Nivida 还提供了Tegra2Opencv的工具包,使用它可以利用NVCC编译Opencv,这比使用ARM编译的Opencv速度要快很多。
值得一提,使用NVCC编译的Opencv可以利用Opencv中的GPU模块,虽然Gpu模块现在还是一个效率存疑的模块,但是就测试结果来看,使用GpuMat 和Gpu::initUndistortRectifyMap效率cv::initUndistortRectifyMap的5倍。
Tk1 还有英伟达自家的VisionWorks 图像处理库,这个基于OpenVX的开源图像处理库提供基于硬件加速的视觉处理算法,就测试结果来看,像光流检测,立体匹配等VsionWorks里有的模块,效率基本上都是Opencv的10倍以上。
算法方面可以兼用Opencv和VisionWorks两个库,对比效率。

3 – 系统更新

更新有自动和手动两种方式:
* 自动方式,采用官方提供的升级包JetPack for L4T傻瓜式自动更新,图形界操作,JetPack 是所有需要安装包的集合,不仅更新系统,还同时更新其他软件包,cuda,opencv,cross-develop-environment,samples等,方便。缺点是安装后的软件包版本可能并非需要的,例如opencv是2.4。
*手动更新,实际上和自动方式一样,只不过仅仅是自动升级里面的一个步骤而已。
推荐 : 手动升级。

3.1 自动升级更新, (不建议)

安装程序开始之后选择TK1
其中Common为Jetson tk1和tx1共用文件,For Jetson TK1是特有文件。其他一些安装文件的作用:
*1. CUDA Toolkit for L4T
— 在移动平台上运行的CUDA,后期编译OpenCV需要,
必须安装
*2. OpenCV4Tegra for Jetson TK1 Developer Kit
— OpenCV优化包,
必须安装。
*3. NVIDIA VisionWorks Toolkit,NVIDIA VisionWorks Plus (SFM),NVIDIA(R) VisionWorks(TM) Object Tracker
— NVIDIA自的视觉库,基于OpenVX,包含了三维重建(SFM)和跟踪模块(Object Tracker),硬件加速能力甩OpenCV一条街,
建议安装。
*4. The NVIDIA CUDA Deep Neural Network library (cuDNN)
— NVIDIA自家的深度神经网络库,GPU加速能力超强,
建议研究神经网络和机器学习的用户安装
*5. CUDA Toolkit on Host for Cross Compiling
— 安装在宿主机上的CUDA,用于交叉编译。
希望用交叉编译的用户选择安装。
*6. OS and File System
— 注意,如果选择了这几项意味着重装TK1上的系统并且抹去所有文件,慎。

3.2 手动升级更新 , (推荐)

阅读L4T Quick Start Guide r21_Release_v5.0

3.2.1 准备

–a Jetson-tk1 Tegra Developer System equipped Tegra K1 “””32 bit””” family processor.
–a host machine that is running Linux X64 ubuntu.

above two developer system is cabled as follows:
–USB Micro-B cable connecting Jetson-tk1 (J1E1 USB0) to your Linux host for flashing.
–Connect USB peripherals such as keyboard, mouse, and USB hub.
–An HDMI cable plugged into “J1C1 HDMI1” to an external HDMI display.
–An Ethernet cable plugged into the J1D1 on board Ethernet port.
–OPTIONAL:If you would like to connect to the debug console, a female to female NULL modem cable is required to plug into the serial port J1A2 UART4.
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:
epending 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:
*1. using its own keyboard mouse monitor
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@5A power supply in, press the small POWER button, then watch it boot up into 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.
*2. through the Ethernet port
tk1本身没有无线网卡,需要安装一块intel6236的pcie无线网卡,或者usb的无线网卡。 最好是cable-link 网线的方式1。

3.2.2 download & build
内核及驱动和文件系统包这两个文件最新的版本是R21.5, 不过还是选择常见21.3:
https://developer.nvidia.com/embedded/linux-tegra-archive
or, directly to:
https://developer.nvidia.com/linux-tegra-r213

得:
内核及驱动 :Tegra124_Linux_R21.3.0_armhf.tbz2
文件系统包 :Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2

*1. 解压内核及驱动包:
$ sudo tar –numeric-owner -jxpf Tegra124_Linux_R21.3.0_armhf.tbz2
*2. get filesystem
$ cd Linux_for_Tegra/rootfs
解压文件系统包:
$ sudo tar –numeric-owner -jxpf ../../Tegra_Linux_Sample-Root-Filesystem_R21.3.0_armhf.tbz2
*3. 返回到 Linux_for_Tegra:
$ cd ../
*4. 构建升级包:
$ sudo ./apply_binaries.sh
注意,执行命令前确保PC还有20G空间。

3.2.3 falshing
连接设备:
USB端插到ubuntu PC上,小头插到TK1上,也就是耳机口旁边的口。
TK1上有三个按钮,最左边的是电源,中间的是reset,最右边的是force recoverry,
在TK1运行状态下, 按住最右边的force recoverry 按钮同时再按一下中间reset键然后释放,指示灯会一下板子重启进入了刷机模式。

然后在ubuntu PC上的当前目录即linux_for_tegra目录下,执行刷机:
$ sudo ./flash.sh -S 14GiB jetson-tk1 mmcblk0p1
or
$ sudo ./flash.sh -S 14580MiB jetson-tk1 mmcblk0p1
… …
sending file: system.img
system.img sent successfully
大概十分钟。

设备自动重启:
重启TK1开发板,就发现这板子已经成功被初始化了。
进入ubuntu桌面环境,默认的用户名是ubuntu,密码ubuntu。

The eMMC that stores all the files in the Jetson TK1 has a capacity of 16GB, If you think you will want more disk space in your rootfs such as for installing toolkits or compiling large projects or storing videos, when you flash the Jetson (from a Linux desktop) you can modify the flash command to use the whole filesystem (note that this will erase all data on the Jetson TK1, and it takes roughly 1 hour to flash the whole eMMC!):
The maximum value of the flash.sh -S 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.

3.2.4 update
*1 建议免除更新的部分
An important step before connecting the Jetson to Internet: It is really important to tell “apt” not to overwrite the file “libglx.so” if you upgrade the system.
“libglx.so” is a specific file in NVIDIA’s graphics driver that might get replaced by an incorrect version from Ubuntu that stops you from being able to boot into the graphical environment!

So please execute this command on your Jetson before you connect it to Internet or perform an update:
$ sudo apt-mark hold xserver-xorg-core

Now you can allow Ubuntu to update itself automatically or you can run “sudo apt-get upgrade” without problems. You can get more information about this issue on the official development forum.
Note: Is this only a problem for L4T Rel-19 only? It seems fixed in Rel-21.

*** NOW , connect cable, we can access internet ***

*2 两个command-line工具
These 2 tools are extremely useful when using the commandline, but were not installed by default in Ubuntu 14.04.
Run this to install them:
$ sudo apt-get install bash-completion command-not-found
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).
$ sudo apt-file update &>/dev/null
$ sudo update-command-not-found &>/dev/null

3.2.5 updating
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.
Add the Universe package repositories, since you will often need packages from Universe for code development:
$ sudo apt-add-repository universe
$ sudo apt-get update
long time… …

if graphical environment
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:
gsettings set com.canonical.Unity.Lenses disabled-scopes “[‘more_suggestions-amazon.scope’,
‘more_suggestions-u1ms.scope’, ‘more_suggestions-populartracks.scope’, ‘music-musicstore.scope’,
‘more_suggestions-ebay.scope’, ‘more_suggestions-ubuntushop.scope’, ‘more_suggestions-skimlinks.scope’]”

if not run into 桌面环境 but with 命令行模式:
If not in GRAPH mode, Installing the graphical desktop on your target board (if not already installed):
a) Make sure the Ethernet cable is connected.
b) Use eth0 for the built-in Ethernet port:
sudo dhclient eth0
c) Check to see if Ethernet is up and running. You should see an IP address associated with eth0.
$ ifconfig
$ sudo apt-get update
$ sudo apt-get install ubuntu-desktop
d) Reboot and the system will boot to the graphical desktop.
Okay

5 – wifi 无线网卡(Intel 7260)

驱动配置 有三种ways:

5.1 直接用 Debian 驱动安装
(Realtek为例):
https://packages.debian.org/sid/all/firmware-realtek/download 下载 firmware-realtek_20160824-1_all.deb, 直接在图形界面上双击 -> 选择“Open With Ubuntu Software Center”=> “Install”

5.2 升级方式
首先利用Jetpack将Jetson TK1升级到最新的L4T (version 21.3 +)

5.2.1 如果有 有线网络,将网线插到开发板,在开发板L4T的terminal输入以下指令来下载并安装驱动:
The Grinch is written and supported by Jetson Forum user Santyago.
This installation script is for Linux for Tegra (L4T) 21.3, which must be installed on the Jetson before running the install script.

$ sudo apt-get install git
$ git clone https://github.com/jetsonhacks/installGrinch.git
$ cd installGrinch
$ ./installGrinch.sh
Connecting to www.jarzebski.pl…
… 2h13m left
After install script completes, reboot the Jetson TK1.
$ sudo reboot

5.2.2 如果没有有线网,需要一台Linux-X64电脑,在该电脑terminal输入以下指令下载驱动:
$ wget http://www.jarzebski.pl/files/jetsontk1/grinch-21.3.4/
$ 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
将刚刚在电脑上下载好的3个驱动文件拷贝到Jseton TK1开发板上git clone的installGrinch文件夹下
$ ./installGrinchNoDownload.sh
$ sudo reboot
SO Bad,
this NOT Works for Me 🙁

5.3 使用 Grinch 驱动包
网上有比较繁琐的操作方式 简化只需下载两个文档、执行两个步骤,重启即可. 不过没有校验 md5 , 特别是 zImage !!! 有可能开不了机 !!!

下载两个关键文档:
$ wget http://www.jarzebski.pl/files/jetson-tk1-grinch-21.3.4-modules.tar.bz2 (112M)
$ wget http://www.jarzebski.pl/files/jetson-tk1-grinch-21.3.4-firmware.tar.bz2 (32M)

执行两个解压缩指令:
$ sudo tar -C /lib/modules -vxjf jetson-tk1-grinch-21.3.4-modules.tar.bz2 (解压缩到 /lib/modules 目录)
$ sudo tar -C /lib -vxjf jetson-tk1-grinch-21.3.4-firmware.tar.bz2 (解压缩到 /lib 目录)
$ sudo cp zImage /boot/zImage

重启,就可以看到 Wifi 连线了。now, we run the new kernel of Grinch kernel.

这个驱动包会更新很多驱动,
建议刷机之后,
直接执行。

5.4 说明
– Grinch是什么,为什么Nvidia没有默认安装Grinch
Many people, especially those coming from desktop platforms, wonder why the Jetson lacks initial support for a wide variety of external peripherals when removed from the box.
The reason is that the Jetson is an embedded development kit, which means its main initial intent was to help developers build devices that include the Tegra K1 chip. If you think about it from that perspective, it wouldn’t make much sense to have extra drivers and cruft installed that a device doesn’t use.
For example, if you were building a phone, it doesn’t make sense to have drivers for 20 different wireless cards that the phone doesn’t contain.

However, the Jetson is also powerful enough to be a general purpose desktop computer.
Desktop computer users have certain expectations, including being able to add devices and drivers, or have support for common devices available.
Fortunately the Jetson community, led by user Santyago built a new Linux kernel named Grinch which includes a lot of the features to which most desktop users are accustomed.

6 – VPN setup

How to setup Express VPN using OpenVPN with Ubuntu Network Manager
NOT i386 nor amd64, its armV7L
so woanload ovpn file and key zip
then
$ sudo apt-get install network-manager-openvpn
and,
REF: https://2y0ge4lrxiko1n2r1be9ibxk-wpengine.netdna-ssl.com/wp-content/uploads/support-center-assets/setup/linux/nm_connected.png
REF: https://www.expressvpn.com/support/vpn-setup/manual-config-for-linux-ubuntu-with-openvpn/

7 – 补足内存不足

TK1的内存太小了,2G。内存不足会很多莫名其妙, 例如, 跑caffe神经网络时候: — killed
需要增加交换文件。一般是内存的整数倍。

看系统有没有 Swap 分区或者分区有多大?
$ free -m
— Swap: xx xx xx

磁盘有剩余空间做swap吗?
$ df -h

创建交换文件
$ sudo fallocate -l 2G /swapfile
$ ls -lh /swapfile

$ sudo chmod 600 /swapfile
$ ls -lh /swapfile

$ sudo mkswap /swapfile
$ sudo swapon /swapfile

$ swapon -s
再次查看 free -m 的结果
$ free -m
有了。

如果要卸载这个swap文件时进入 swap文件目录:
$ sudo swapoff /swapfile
$ 然后rm ……..

如果需要开机就保持这个swap:
$ sudo cp /etc/fstab /etc/fstab.orig
$ sudo vi /etc/fstab
底部添加如下:
/swapfile none swap sw 0 0
格式是这样:
swapPath(包括文件名) /home/ubuntu/swappath(挂载目录may be none) swap defaults 0 0

9 – 补足硬盘不足 (加SD-CARD)

sd-card规格很多 :
支持SD卡的设备或卡槽最大是2G,支持SDHC的可以到32G,支持SDXC的则是2T(2048G)。

2009年的sdxc比较新, 有可能出错,例如插入sd之后:
Unable to mount 128 GB Volume
Error mounting /dev/mmcblk0p1 at /media/deha/3332-3632: Command-line `mount -t “exfat” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077” “/dev/mmcblk0p1” “/media/dehaou1404/3332-3632″‘
exited with non-zero exit status 32: mount: unknown filesystem type ‘exfat’

这是因为ubuntu没有安装 exfat 文件系统。
exFAT是Microsoft的专利,多用于USB sticks and camera sd cards。

安装支持即可:
$ sudo apt-get install exfat-fuse exfat-utils

8.1 普通SD sdcard

TK1只有16Gb内建falsh, 但ros或opencv 或caffe都远不止此。玩性tk1提供了SD卡槽可以外扩。
例如:
SanDisk 32Gb SD Card (class 10 / U3, r/w speed 90Mb/s,full size SD card rather than mini-SD)

建议:
个人的opencv 或caffe应用都部署到此sd-card上, 这样只需下载编译一次就可以携卡走天下, 拥有这块sd卡再也不怕更新系统了。

看下卡:
$ lsblk
… …
mmcblk1p1 179:33 0 29.7G 0 part
ok,
如果类似`-mmcblk1p1 179:33 0 29.7G 0 part /media/ubuntu/fd7a0700-efaf-47a5-a118-9202607b46e8这样的则说明已经自动安装了,如果在图形界面, 可以点右键unmount然后再确认。

格式化为ext4:
$ sudo mkfs.ext4 /dev/mmcblk1p1
… …
Writing superblocks and filesystem accounting information: done

记下UUID:
$ sudo blkid
/dev/mmcblk1p1: UUID=”6c16887d-f1c8-4f57-8c31-b39762a53166″ TYPE=”ext4″

建立安装点 例如sdmountpoint:
$ sudo mkdir /media/sdmountpoint

修改fstab:
$ sudo cp /etc/fstab /etc/fstab.orig.sdcard
$ sudo vi /etc/fstab
底部添加如下一行
UUID=6c16887d-f1c8-4f57-8c31-b39762a53166 /media/sdmountpoint ext4 defaults,users 0 0

加载下:
$ sudo mount -a
$ ls /media/sdmountpoint
—lost+found

符号链接:
符号链接可以把sd作为家目录下的一个文件夹一样, 例如 ~/sdcard这样一个符号链接到/media/sdmountpoint/sdcard:
$ sudo mkdir /media/sdmountpoint/sdcard
$ sudo chown ubuntu /media/sdmountpoint/sdcard
$ sudo chgrp ubuntu /media/sdmountpoint/sdcard

$ cd ~
$ ln -s /media/sdmountpoint/sdcard sdcard
$ sudo reboot
这样 /home/ubuntu/sdcard就有了32G.

如果执行~/sdcard或者 /media/sdmountpoint/sdcard的可执行bin提示permision denied, 可改fstab的挂载选项为下面这样:
UUID=6c16887d-f1c8-4f57-8c31-b39762a53166 /media/sdmountpoint ext4 defaults 0 0

常用的选项:
fstab中每行的第一列为uuid,第二列为挂载点,第三列文件类型,第四列挂载选项,第五列dump,第六列fsck选项。重点四五六。

fstab中的第四列表示设备或者分区所需要的挂载选项。这一列也是fstab中最复杂的一列。
auto 和 noauto: 控制设备是否自动挂载的选项。auto是默认选择的选项。这样设备会在启动或者mount -a命令时按照fstab的内容自动挂载。如果不希望这样就使用noauto选项,如果只能明确地通过手工来挂载设备。
user 和 nouser:一个非常有用的选项。user选项允许普通用户也能挂载设备,nouser只允许root用户挂载。nouser是默认选项。发现没有办法正常挂载光驱,Windows分区。如果为普通身份用户 遇到类似问题,或者别的其他问题,就把 user属性增加到fstab中。
exec 和 noexec: exec是默认选项。exec允许执行对应分区中的可执行二进制程序,noexec的作用相反。如果拥有一个分区,分区上有一些可执行程序,而恰好不愿意执行他们,就可以使用noexec属性。这种情况多发生于挂载Windows分区时。
sync 和 async:sync同步完成,sync会影响系统的运行速度. 而async进行缓冲处理。虽然async是默认属性,但是对于u盘,移动硬盘这种可移动存储设备最好还是使用sync选 项。
ro: 以只读来挂载文件系统。
rw: 以可读可写的属性来挂载系统。

一般用户没有特殊需求,直接使用defaults就可以了。defaults: 所有选项全部使用默认配置, 这个default包括了:
defaults := rw, suid, dev, exec, auto, nouser, and async.

第五六列:dump和fsck选项
dump是一个备份工具,fsck是一个文件系统扫描检查工具。
fstab的第五列是表示dump选项,dump工具通过这个选项位置上的数字来决定文件系统是否需要备份。如果是0,dump就会被忽略。
第六列是fsck选项,fsck命令通过检测该字段来决定文件系统通过什么顺序来扫描检查,根文件系统/对应该字段的值应该为 1,其他文件系统应该为2。若文件系统无需在启动时扫描检查,则设置该字段为0。

8.2 exFat格式的sd card

看下卡:
$ lsblk
… …
├─sda7 8:7 0 1.9G 0 part [SWAP]
└─sda8 8:8 0 56.1G 0 part /
mmcblk0 179:0 0 119.1G 0 disk
└─mmcblk0p1 179:1 0 119.1G 0 part /media/deh1404/3332-3632

ok,
如果类似`-mmcblk1p1 179:33 0 29.7G 0 part /media/ubuntu/fd7a0700-efaf-47a5-a118-9202607b46e8这样的则说明已经自动安装了,如果在图形界面, 可以点右键unmount然后再确认。

记下UUID:
$ sudo blkid
— —
/dev/mmcblk0p1: UUID=”3332-3632″ TYPE=”exfat”

建立安装点 例如sdmountpoint:
$ sudo mkdir /media/sdmountpoint

修改fstab:
$ sudo cp /etc/fstab /etc/fstab.orig.sdcard
$ sudo vi /etc/fstab
底部添加如下一行
UUID=3332-3632 /media/sdmountpoint exfat defaults,users 0 0

加载下:
$ sudo mount -a
$ ls /media/sdmountpoint
—lost+found

符号链接:
符号链接可以把sd作为家目录下的一个文件夹一样, 例如 ~/sdcard这样一个符号链接到/media/sdmountpoint/sdcard:
$ sudo mkdir /media/sdmountpoint/sdcard
$ sudo chown dehaou1404 /media/sdmountpoint/sdcard
$ sudo chgrp dehaou1404 /media/sdmountpoint/sdcard

$ cd ~
$ ln -s /media/sdmountpoint/sdcard sdcard
$ sudo reboot
这样 /home/ubuntu/sdcard就有了32G.

如果执行~/sdcard或者 /media/sdmountpoint/sdcard的可执行bin提示permision denied, 可改fstab的挂载选项为下面这样:
UUID=6c16887d-f1c8-4f57-8c31-b39762a53166 /media/sdmountpoint ext4 defaults 0 0

11 – qt setup

方法一,直接采用仓库里已经提供到安装包。优点:简单;缺点:一般不是最新的版本,而且是基于OpenES的,对于之前代码是基OpenGL编写的需要做到OpenES的移植。
方法二,从源代码编译。优点:能够基于任意版本(比如最新的qt)编译,且可以基于OpenGL而不基于OpenES;缺点:复杂,编译时间长。
推荐: 方式一。

IF need the qt dependences:
$ sudo apt-get install qt4-qmake libqt4-dev (default installed)

$ sudo apt-get install build-essential (already)
$ sudo apt-get install qt5-default

可以shunbian安装qt:
Shunbian Install Qt Creator on NVIDIA Jetson TK1
$ sudo apt-get install qtcreator

which will load Qt Creator. Once Qt Creator is installed, there is still a little setup needed.
Open Qt Creator, and go to:
Tools->Options->Build & Run->Compilers
Click the ‘Add’ button and select ‘GCC’.
In the ‘Compiler path:’ text box, place the path to the gcc compiler. On a standard installation the path is: /usr/bin/gcc.
You should also check the ‘Kits’ setting, available from the ‘Kits’ tab. Selecting the Desktop (default) kit, you should see Compiler: GCC. The name GCC should match the Compiler named in the previous tab
The installation was shown on Linux for Tegra (L4T) release 21.3. Note that no special compiler flags were set. Also, CUDA was not configured.

From Qt’s perspective this is a somewhat unorthodox embedded device because its customized Linux system is based on Ubuntu 14.04 and runs the regular X11 environment.
Therefore the approach that is typical for low and medium-end embedded hardware, running OpenGL-accelerated Qt apps directly on the framebuffer using the eglfs platform plugin, will not be suitable.

In addition, the ability to do hardware-accelerated computing using CUDA is very interesting, especially when it comes to interoperating with OpenGL.

Let’s take a look at how CUDA code can be integrated with a Qt-based application.

Configuring and building Qt is no different than in any desktop Linux environment.

One option that needs special consideration however is -opengl es2 because Qt can be built either in a GLX + OpenGL or EGL + OpenGL ES configuration.

For example, the following configures Qt to use GLX and OpenGL:
configure -release -nomake examples -nomake tests

while adding -opengl es2 requests the usage of EGL and OpenGL ES:
configure -release -opengl es2 -nomake examples -nomake tests

*** TK1的限制说明 ***
定位嵌入应用的TK1, 其硬件提示是不建议跑训练的,一般是下载已经训练好的模型,模型的训练挪到别处进行。
虽然,示例目的,这里在TK1上面进行训练。