Difference between revisions of "1012 NVIDIA TK1"

From Sensoray Technical Wiki
Jump to: navigation, search
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
== Introduction ==
 
This page will guide you in using the [http://sensoray.com/1012 Sensoray Model 1012] with [https://developer.nvidia.com/linux-tegra-r214 NVIDIA tegra k1 development] boards.
 
This page will guide you in using the [http://sensoray.com/1012 Sensoray Model 1012] with [https://developer.nvidia.com/linux-tegra-r214 NVIDIA tegra k1 development] boards.
  
A modified kernel and driver are required.  
+
A modified kernel is required.
  
 
The modified kernel can be flashed onto the TK1 from the development PC, installed by the TK1 or the modifications can be made by the TK1 and recompiled.  
 
The modified kernel can be flashed onto the TK1 from the development PC, installed by the TK1 or the modifications can be made by the TK1 and recompiled.  
  
The driver needs to be modified before being compiled.
+
The driver needs to be compiled with jetson=y.
  
=== Flashing a modified kernel image ===
+
== Flashing a modified kernel image ==
  
Instructions for flashing a Jetson Tegra K1 to run R21.4 with modifications to work with Sensoray Model 1012
 
Required:
 
Jetson TK1 and host computer running Linux
 
  
Procedure:
+
This method uses pre-compiled images of Sensoray driver 1.1.9 and Linux for Tegra R21.4, improvements in later versions will not be present.
1) Get the modified zImage extlinux.conf and tw6869.ko files for Jetson Tegra K1 and put them in Downloads folder
+
2) Follow Jetson quick-start guide from NVIDIA
+
  
a) quick-start step 1. Download Linux for Tegra package and sample root file system  
+
Get the modified zImage extlinux.conf and tw6869.ko files for Jetson Tegra K1 from Sensoray and put them in Downloads folder
 +
Follow Jetson quick-start guide from NVIDIA
 +
 
 +
quick-start step 1. Download Linux for Tegra package and sample root file system  
  
 
   $  wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra210_Linux_R23.1.1_armhf.tbz2
 
   $  wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra210_Linux_R23.1.1_armhf.tbz2
 
   $  wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra_Linux_Sample-Root-Filesystem_R23.1.1_armhf.tbz2
 
   $  wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra_Linux_Sample-Root-Filesystem_R23.1.1_armhf.tbz2
  
b) quick-start step 2. Untar and assemble the rootfs
+
quick-start step 2. Untar and assemble the rootfs
  
 
   $  sudo tar xpf ${RELEASE_NAME}
 
   $  sudo tar xpf ${RELEASE_NAME}
Line 29: Line 28:
 
   $  cd ../
 
   $  cd ../
  
3) Modify the kernel to be flashed
+
Modify the kernel to be flashed
 +
 
 +
  $ cd ~/Linux_for_Tegra/
 +
  $ sudo ./applybinaries.sh
  
   $ sudo cp ~/Downloads/zImage ~Linux_for_Tegra/zImage
+
   $ sudo cp ~/Downloads/zImage ~/Linux_for_Tegra/rootfs/boot/zImage
   $ sudo cp ~/Downloads/extlinux.conf ~Linux_for_Tegra/bootloader/ardbeg/jetson-tk1_extlinux.conf.emmc
+
   $ sudo cp ~/Downloads/extlinux.conf ~/Linux_for_Tegra/rootfs/boot/extlinux/extlinux.conf
  
4) Get the driver for Sensoray 1012.
+
Get the driver for Sensoray 1012.
  
 
   $ sudo cp ~/Downloads/tw6869.ko ~/Linux_for_Tegra/rootfs/lib/modules/3.10.40-gdacac96/extra/tw6869.ko
 
   $ sudo cp ~/Downloads/tw6869.ko ~/Linux_for_Tegra/rootfs/lib/modules/3.10.40-gdacac96/extra/tw6869.ko
  
5) Flash the TK1 (step 3. in Jetson's quick-start guide)
+
Flash the TK1 (step 3. in Jetson's quick-start guide)
  
a) Put your target system into "reset recovery mode" by holding down the RECOVERY button and press RESET button once on the target main board.
+
Put your target system into "reset recovery mode" by holding down the RECOVERY button and press RESET button once on the target main board.
  
b) Ensure your Linux host system is connected to the target device through the USB cable for flashing.
+
Ensure your Linux host system is connected to the target device through the USB cable for flashing.
  
 
   $ cd ~/Linux_for_Tegra/
 
   $ cd ~/Linux_for_Tegra/
  $ sudo ./applybinaries.sh
 
 
   $ sudo ./flash.sh jetson-tk1 mmcblk0p1  #This will take less than 10 minutes.
 
   $ sudo ./flash.sh jetson-tk1 mmcblk0p1  #This will take less than 10 minutes.
  
6) from the TK1 load the Sensoray driver.
+
from the TK1 load the Sensoray driver.
  
 
   $ sudo depmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko
 
   $ sudo depmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko
 
   $ sudo insmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko
 
   $ sudo insmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko
  
8) Restart with Sensoray 1012 attached
+
Restart with Sensoray 1012 attached
  
 
   $ sudo reboot
 
   $ sudo reboot
  
7) MPlayer is used by the demo
+
MPlayer is used by the demo
  
 
   $ sudo apt-add-repository universe
 
   $ sudo apt-add-repository universe
Line 64: Line 65:
 
   $ sudo apt-get install mplayer mencoder
 
   $ sudo apt-get install mplayer mencoder
  
8) Run the demo
+
Run the demo
  
 
   $ wget http://www.sensoray.com/downloads/sdk_812_linux_1.1.9.zip
 
   $ wget http://www.sensoray.com/downloads/sdk_812_linux_1.1.9.zip
Line 71: Line 72:
 
   $ ~/sdk_812_1.1.9_linux/demo-sample/PyGTK/demoSX12.py
 
   $ ~/sdk_812_1.1.9_linux/demo-sample/PyGTK/demoSX12.py
  
 +
== Installing a modified kernel from TK1 ==
  
=== Installing a modified kernel from TK1 ===
+
This method uses a pre-compiled image of Linux for Tegra R21.4, improvements in later versions will not be present.
  
1) Get the modified zImage extlinux.conf and TW68-core.c files for nVIDIA Tegra K1 and put them in Downloads folder
+
Get the modified zImage and extlinux.conf files for nVIDIA Tegra K1 and put them in Downloads folder
  
2) Install kernel modifications
+
Install kernel modifications
  
 
   $ sudo cp ~/Downloads/zImage ~/boot/zImage
 
   $ sudo cp ~/Downloads/zImage ~/boot/zImage
 
   $ sudo cp ~/Downloads/extlinux.conf ~/boot/extlinux/extlinux.conf
 
   $ sudo cp ~/Downloads/extlinux.conf ~/boot/extlinux/extlinux.conf
  
3) Get Mplayer for the demo
+
Get Mplayer for the demo
  
a) Add universe repository
+
Add universe repository
  
 
   $ sudo gedit /etc/apt/sources.list
 
   $ sudo gedit /etc/apt/sources.list
  
i) Uncomment the universe repository lines
+
Uncomment the universe repository lines
  
 
  deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
 
  deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
Line 94: Line 96:
 
  deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
 
  deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
  
ii) Save and exit
+
Save and exit
  
b) Install dependencies
+
Install dependencies
  
 
   $ sudo apt-get update
 
   $ sudo apt-get update
 
   $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
 
   $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
  
c) Install MPlayer
+
Install MPlayer
  
 
   $ cd ~/
 
   $ cd ~/
Line 111: Line 113:
 
   $ sudo make install
 
   $ sudo make install
  
4) Restart
+
Get the driver for Sensoray 1012. The listed link is for 1.1.11 there may be a newer version.
  
  $ sudo reboot
+
Version 1.1.11 from Sensoray  
 
+
5) Get the driver for Sensoray 1012.
+
 
+
a) Version 1.1.9 from Sensoray  
+
  
 
   $ cd ~/
 
   $ cd ~/
   $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.9.zip
+
   $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.11.zip
   $ unzip sdk_812_linux_1.1.9.zip
+
   $ unzip sdk_812_linux_1.1.11.zip
 
   password: <not included in this doc>
 
   password: <not included in this doc>
 
   $ cd /usr/src/linux-headers-3.10.40-gdacac96
 
   $ cd /usr/src/linux-headers-3.10.40-gdacac96
 
   $ sudo make modules_prepare
 
   $ sudo make modules_prepare
  
b) Use the modified code for TK1
 
 
  $ cp ~/Downloads/TW68-core.c ~/sdk_812_1.1.9_linux/driver/vbuf2/TW6-core.c
 
  
 +
Load the driver
  
6) Load the driver
+
   $ cd ~/sdk_812_1.1.11_linux/driver/vbuf2
   $ cd ~/sdk_812_1.1.9_linux/driver/vbuf2
+
   $ make jetson=y
   $ make
+
 
   $ sudo make install
 
   $ sudo make install
 
   $ sudo make load
 
   $ sudo make load
  
  
7) Run the demo
+
Restart with the 1012 attached
 +
 
 +
  $ sudo reboot
 +
 
 +
Run the demo
 +
 
 
   $ cd ~/
 
   $ cd ~/
   $ ~/sdk_812_1.1.9_linux/demo-sample/PyGTK/demoSX12.py
+
   $ ~/sdk_812_1.1.11_linux/demo-sample/PyGTK/demoSX12.py
  
=== Compiling the kernel modifications ===
+
== Compiling the kernel modifications ==
  
1)  Get the source of the kernel being used.  
+
 
 +
Get the source of the kernel being used. The link is to R21.4 there may be newer versions
  
 
   $ wget http://developer.download.nvidia.com/embedded/L4T/r21_Release_v4.0/source/kernel_src.tbz2
 
   $ wget http://developer.download.nvidia.com/embedded/L4T/r21_Release_v4.0/source/kernel_src.tbz2
Line 150: Line 151:
 
   $ zcat /proc/config.gz > ~/kernel/.config
 
   $ zcat /proc/config.gz > ~/kernel/.config
  
2) Customize the kernel.
+
Add universe repository for dependencies
 
+
a) Add universe repository
+
  
 
   $ sudo gedit /etc/apt/sources.list
 
   $ sudo gedit /etc/apt/sources.list
  
i) Uncomment the universe repository lines
+
Uncomment the universe repository lines
  
 
  deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
 
  deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
Line 163: Line 162:
 
  deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
 
  deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
  
ii) Save and exit
+
Save and exit
 +
 
 +
Make changes to the kernel configuration
  
 
   $ sudo apt-get update
 
   $ sudo apt-get update
 
b) Make changes
 
 
 
   $ sudo apt-get install libncurses5-dev
 
   $ sudo apt-get install libncurses5-dev
 
   $ cd ~/kernel
 
   $ cd ~/kernel
 
   $ make menuconfig
 
   $ make menuconfig
  
i) set Contiguous Memory Allocation to 64Mb
+
Set Contiguous Memory Allocation to 64Mb
  
in menuconfig "y" turns a entry on <enter> goes into sub menus  
+
in menuconfig "y" turns a entry on <enter> goes into sub menus  
  
<esc><esc> gets out of sub menus
+
<esc><esc> gets out of sub menus
  
"-gdacac96" is the local version of R21.4  
+
"-gdacac96" is the local version of R21.4  
 
 
 
   General setup <enter>
 
   General setup <enter>
 
 
   Local version <enter> -gdacac96<enter>
 
   Local version <enter> -gdacac96<enter>
 
   <esc><esc>
 
   <esc><esc>
 
   Device Drivers <enter>
 
   Device Drivers <enter>
 
 
 
   Generic Driver Options <enter>
 
   Generic Driver Options <enter>
 
 
   Size in Mega Bytes <enter> 64 <enter>
 
   Size in Mega Bytes <enter> 64 <enter>
 
   <esc><esc>  
 
   <esc><esc>  
Line 195: Line 189:
 
   <esc><esc>
 
   <esc><esc>
  
  ii) Save and exit
+
Save and exit
  iii) Increase coherent memory pool
+
 
 +
Increase coherent memory pool
  
 
   $ sudo gedit /boot/extlinux/extlinux.cof
 
   $ sudo gedit /boot/extlinux/extlinux.cof
  
A) add to the end of the last line
+
Add to the end of the last line
  
 
   coherent_pool=32M
 
   coherent_pool=32M
  
B) Save and exit
+
Save and exit
  
c) Install the changes
+
Install the changes to the kernel
  
 
   $ make -j4
 
   $ make -j4
Line 213: Line 208:
 
   $ sudo cp ~/kernel/arch/arm/boot/zImage /boot/zImage
 
   $ sudo cp ~/kernel/arch/arm/boot/zImage /boot/zImage
  
3) Get Mplayer for the demo
+
Get Mplayer for the demo
  
 
   $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
 
   $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
Line 224: Line 219:
 
   $ sudo make install
 
   $ sudo make install
  
4) Restart
+
Get the driver for Sensoray 1012. The listed link is for 1.1.11 there may be a newer version.
 
+
  $ sudo reboot
+
 
+
5) Get the driver for Sensoray 1012. version 1.1.9 needs to be modified to work on TK1
+
  
 
   $ cd ~/
 
   $ cd ~/
   $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.9.zip
+
   $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.11.zip
   $ unzip sdk_812_linux_1.1.9.zip
+
   $ unzip sdk_812_linux_1.1.11.zip
 
   password: <not included in this doc>
 
   password: <not included in this doc>
 
   $ cd /usr/src/linux-headers-3.10.40-gdacac96
 
   $ cd /usr/src/linux-headers-3.10.40-gdacac96
 
   $ sudo make modules_prepare
 
   $ sudo make modules_prepare
  $ cd ~/sdk_812_1.1.9_linux/driver/vbuf2
 
  $ getit ./TW68-core.c
 
  
i) at line 1306 add:                            NOTE: Ctrl+F “pci_enable_” will take you there
+
Load the driver
+
if (pci_assign_resource(pci_dev,0)){
+
err = -EIO;
+
goto fail1;
+
}
+
+
so it now reads:
+
  
1305 dev->pci = pci_dev;
+
  $ make jetson=y
1306 if (pci_assign_resource(pci_dev,0)){
+
  $ sudo make install
1307 err = -EIO;
+
  $ sudo make load
1308 goto fail1;
+
1309 }
+
1310 if (pci_enable_device(pci_dev)){
+
  
ii) save and exit
+
Restart with the 1012 attached
  
6) Load the driver
+
  $ sudo reboot
  
  $ make
+
Run the demo
  $ sudo make install
+
  $ sudo make load
+
  
7) Run the demo
+
  $ cd ~/
 +
  $ ~/sdk_812_1.1.11_linux/demo-sample/PyGTK/demoSX12.py
  
  $ cd ~/
+
[[Category:1012|Nvidia]]
  $ ~/sdk_812_1.1.9_linux/demo-sample/PyGTK/demoSX12.py
+

Latest revision as of 11:58, 4 June 2020

Contents

[edit] Introduction

This page will guide you in using the Sensoray Model 1012 with NVIDIA tegra k1 development boards.

A modified kernel is required.

The modified kernel can be flashed onto the TK1 from the development PC, installed by the TK1 or the modifications can be made by the TK1 and recompiled.

The driver needs to be compiled with jetson=y.

[edit] Flashing a modified kernel image

This method uses pre-compiled images of Sensoray driver 1.1.9 and Linux for Tegra R21.4, improvements in later versions will not be present.

Get the modified zImage extlinux.conf and tw6869.ko files for Jetson Tegra K1 from Sensoray and put them in Downloads folder Follow Jetson quick-start guide from NVIDIA

quick-start step 1. Download Linux for Tegra package and sample root file system

  $   wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra210_Linux_R23.1.1_armhf.tbz2
  $   wget http://developer.download.Jetson.com/embedded/L4T/r23_Release_v1.0/Tegra_Linux_Sample-Root-Filesystem_R23.1.1_armhf.tbz2

quick-start step 2. Untar and assemble the rootfs

  $   sudo tar xpf ${RELEASE_NAME}
  $   cd Linux_for_Tegra/rootfs/
  $   sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R21.4.0_armhf.tbz2
  $   cd ../

Modify the kernel to be flashed

  $ cd ~/Linux_for_Tegra/	
  $ sudo ./applybinaries.sh
  $ sudo cp ~/Downloads/zImage ~/Linux_for_Tegra/rootfs/boot/zImage
  $ sudo cp ~/Downloads/extlinux.conf ~/Linux_for_Tegra/rootfs/boot/extlinux/extlinux.conf

Get the driver for Sensoray 1012.

  $ sudo cp ~/Downloads/tw6869.ko ~/Linux_for_Tegra/rootfs/lib/modules/3.10.40-gdacac96/extra/tw6869.ko

Flash the TK1 (step 3. in Jetson's quick-start guide)

Put your target system into "reset recovery mode" by holding down the RECOVERY button and press RESET button once on the target main board.

Ensure your Linux host system is connected to the target device through the USB cable for flashing.

  $ cd ~/Linux_for_Tegra/	
  $ sudo ./flash.sh jetson-tk1 mmcblk0p1  #This will take less than 10 minutes.

from the TK1 load the Sensoray driver.

  $ sudo depmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko
  $ sudo insmod /lib/modules/3.10.40-gdacac96/extra/tw6869.ko

Restart with Sensoray 1012 attached

  $ sudo reboot

MPlayer is used by the demo

  $ sudo apt-add-repository universe	
  $ sudo apt-get update
  $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
  $ sudo apt-get install mplayer mencoder

Run the demo

  $ wget http://www.sensoray.com/downloads/sdk_812_linux_1.1.9.zip
  $ unzip sdk_812_linux_1.1.9.zip
  password:<not included in this doc>
  $ ~/sdk_812_1.1.9_linux/demo-sample/PyGTK/demoSX12.py

[edit] Installing a modified kernel from TK1

This method uses a pre-compiled image of Linux for Tegra R21.4, improvements in later versions will not be present.

Get the modified zImage and extlinux.conf files for nVIDIA Tegra K1 and put them in Downloads folder

Install kernel modifications

  $ sudo cp ~/Downloads/zImage ~/boot/zImage
  $ sudo cp ~/Downloads/extlinux.conf ~/boot/extlinux/extlinux.conf

Get Mplayer for the demo

Add universe repository

  $ sudo gedit /etc/apt/sources.list

Uncomment the universe repository lines

deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
deb-src http://ports.ubuntu.com/ubuntu-ports / trusty universe
deb http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe

Save and exit

Install dependencies

  $ sudo apt-get update
  $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev	

Install MPlayer

  $ cd ~/	
  $ wget http://mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz
  $ tar xf ~/Mplayer-1.2.tar.xz
  $ cd ~/Mplayer-1.2
  $ ./configure
  $ make -j4
  $ sudo make install

Get the driver for Sensoray 1012. The listed link is for 1.1.11 there may be a newer version.

Version 1.1.11 from Sensoray

  $ cd ~/
  $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.11.zip
  $ unzip sdk_812_linux_1.1.11.zip
  password: <not included in this doc>
  $ cd /usr/src/linux-headers-3.10.40-gdacac96
  $ sudo make modules_prepare


Load the driver

  $ cd ~/sdk_812_1.1.11_linux/driver/vbuf2	
  $ make jetson=y
  $ sudo make install
  $ sudo make load


Restart with the 1012 attached

  $ sudo reboot

Run the demo

  $ cd ~/
  $ ~/sdk_812_1.1.11_linux/demo-sample/PyGTK/demoSX12.py

[edit] Compiling the kernel modifications

Get the source of the kernel being used. The link is to R21.4 there may be newer versions

  $ wget http://developer.download.nvidia.com/embedded/L4T/r21_Release_v4.0/source/kernel_src.tbz2
  $ tar xf kernel.src.tbz2
  $ zcat /proc/config.gz > ~/kernel/.config

Add universe repository for dependencies

  $ sudo gedit /etc/apt/sources.list

Uncomment the universe repository lines

deb http://ports.ubuntu.com/ubuntu-ports / trusty universe
deb-src http://ports.ubuntu.com/ubuntu-ports / trusty universe
deb http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports / trusty-updates universe

Save and exit

Make changes to the kernel configuration

  $ sudo apt-get update
  $ sudo apt-get install libncurses5-dev
  $ cd ~/kernel
  $ make menuconfig

Set Contiguous Memory Allocation to 64Mb

in menuconfig "y" turns a entry on <enter> goes into sub menus

<esc><esc> gets out of sub menus

"-gdacac96" is the local version of R21.4

 			General setup <enter>
 				Local version <enter> -gdacac96<enter>
 				<esc><esc>
 			Device Drivers <enter>
 				Generic Driver Options <enter>
 					Size in Mega Bytes <enter> 64 <enter>
 					<esc><esc> 
 				<esc><esc>
 			<esc><esc>

Save and exit

Increase coherent memory pool

  $ sudo gedit /boot/extlinux/extlinux.cof

Add to the end of the last line

  coherent_pool=32M

Save and exit

Install the changes to the kernel

  $ make -j4
  $ make modules
  $ sudo make modules_install
  $ sudo cp ~/kernel/arch/arm/boot/zImage /boot/zImage

Get Mplayer for the demo

  $ sudo apt-get install libasound2-dev zlib1g-dev libxv-dev
  $ cd ~/
  $ wget http://mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz
  $ tar xf ~/Mplayer-1.2.tar.xz
  $ cd ~/Mplayer-1.2
  $ ./configure
  $ make -j4
  $ sudo make install

Get the driver for Sensoray 1012. The listed link is for 1.1.11 there may be a newer version.

  $ cd ~/
  $ wget http://sensoray.com/downloads/sdk_812_linux_1.1.11.zip
  $ unzip sdk_812_linux_1.1.11.zip
  password: <not included in this doc>
  $ cd /usr/src/linux-headers-3.10.40-gdacac96
  $ sudo make modules_prepare

Load the driver

  $ make jetson=y
  $ sudo make install
  $ sudo make load

Restart with the 1012 attached

  $ sudo reboot

Run the demo

 $ cd ~/
 $ ~/sdk_812_1.1.11_linux/demo-sample/PyGTK/demoSX12.py
Personal tools
Namespaces

Variants
Actions
Toolbox