Difference between revisions of "VEYE CS Camera for Jetson TX2"

From wiki_veye
Jump to navigation Jump to search
 
(125 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[VEYE CS Camera for Jetson TX2/zh|查看中文]]
 
[[VEYE CS Camera for Jetson TX2/zh|查看中文]]
  
'''<big>How to use VEYE and CS series camera module on NVIDIA Jetson Nano,TX2,AGX Xavier and Xavier NX</big>'''
+
'''<big>How to use VEYE and CS series camera module on NVIDIA Jetson Nano,TX2,Xavier and Orin</big>'''
  
 
===Overview===
 
===Overview===
This guide shows how to use VEYE and CS series camera modules on Jetson Nano,TX2,AGX Xavier and Xavier NX.  Jetson SDK Version is
+
This guide shows how to use VEYE and CS series camera modules on Jetson Nano,Jetson Nano 2GB,TX2,TX2 NX,AGX Xavier and Xavier NX.  Jetson SDK Version is:
  
 
*Jetpack4.2.2,L4T r32.2.1
 
*Jetpack4.2.2,L4T r32.2.1
*Jetpack4.3,L4Tr32.3.1
+
*Jetpack4.3,L4T r32.3.1
*Jetpack4.4,L4T,r32.4.3
+
*Jetpack4.4,L4T r32.4.3
 +
*Jetpack4.4.1,L4T r32.4.4
 +
*Jetpack4.5,L4T r32.5
 +
*Jetpack4.5.1,L4T r32.5.1
 +
*Jetpack4.6,L4T r32.6.1
 +
 
 +
* Jetpack4.6.1, L4T r32.7.1
 +
*Jetpack4.6.2,L4T r32.7.2
 +
*Jetpack4.6.3,L4T r32.7.3
 +
*Jetpack4.6.4,L4T r32.7.4
 +
*Jetpack5.0.1DP, L4T r34.1.1
 +
*Jetpack5.0.2, L4T r35.1
 +
*Jetpack5.1,L4T r35.2.1
 +
*Jetpack5.1.1,L4T r35.3.1
 +
*Jetpack5.1.2,L4T r35.4.1
  
 
We provide two ways to do so: '''Prebuilt Binaries''' or '''Source Code. Yes, It's Open Source!'''
 
We provide two ways to do so: '''Prebuilt Binaries''' or '''Source Code. Yes, It's Open Source!'''
  
 
VEYE and CS series camera modules are camera module with ISP functions build in. It output UYVY data using MIPI-CSI2. We provide '''V4L2 interface''' for video streaming apps , and '''Video Control Toolkits (which is Shell Script)''' to control the camera module directly, which is called DRA(Directly Register Access).
 
VEYE and CS series camera modules are camera module with ISP functions build in. It output UYVY data using MIPI-CSI2. We provide '''V4L2 interface''' for video streaming apps , and '''Video Control Toolkits (which is Shell Script)''' to control the camera module directly, which is called DRA(Directly Register Access).
 +
====Camera module list====
 +
{| class="wikitable"
 +
|+Camera module dirver status list
 +
!Series
 +
!Model
 +
!Status
 +
|-
 +
|VEYE series
 +
| VEYE-MIPI-IMX327S
 +
| Done
 +
|-
 +
|VEYE series
 +
| VEYE-MIPI-IMX385
 +
|Done
 +
|-
 +
|VEYE series
 +
|VEYE-MIPI-IMX462
 +
|Done
 +
|-
 +
|VEYE series
 +
|VEYE-MIPI-IMX335
 +
|Done
 +
|-
 +
|CS series
 +
| CS-MIPI-IMX307
 +
|Done
 +
|-
 +
|CS series
 +
|CS-MIPI-SC132
 +
|Done
 +
|-
 +
|TX2-XAVIER-nCAM Series
 +
|CS-TX2-XAVIER-'''''n'''''CAM
 +
|Done
 +
|}
 +
====How to check the current L4T version====
 +
 +
===== Method 1 =====
 +
On Jetson board
 +
 +
<code>cat /etc/nv_tegra_release</code>
 +
 +
If it shows:
 +
 +
<code># R32 (release), REVISION: 4.3......</code>
 +
 +
It means L4t Version is 32.4.3
 +
 +
===== Method 2 =====
 +
Refer to this [https://pypi.org/project/jetson-stats/ link] to install jetson-stats:
 +
 +
<code>jtop</code>
 +
 
===Hardware Setup===
 
===Hardware Setup===
We have designed a 6cam interposer board  for TX2 devkit and Xavier, It support up to 6 cameras at the same time.   
+
We have designed a 6cam interposer board  for TX2 devkit,Xavier and Orin, It support up to 6 cameras at the same time.   
 
[[File:ADP-N1-6CAM YT0.95-4I.jpg|alt=6cam interposer board connected with 6 cameras|center|thumb|800x800px|6cam interposer board connected with 6 cameras]]
 
[[File:ADP-N1-6CAM YT0.95-4I.jpg|alt=6cam interposer board connected with 6 cameras|center|thumb|800x800px|6cam interposer board connected with 6 cameras]]
<br />
+
 
 +
 
 +
In particular, the VEYE-MIPI-IMX335 must use a 12V DC terminal to provide auxiliary power due to its high power consumption. Refer to [[ADP-N1-V2.0 Adapter Board Data Sheet#Adapter Board Pinlist.EF.BC.88.E6.8E.A5.E5.8F.A3.E5.92.8C.E5.BC.95.E8.84.9A.E8.AF.B4.E6.98.8E.EF.BC.89|J11 of ADP-N1]].
 
====NVIDIA TX2 Developer Kit====
 
====NVIDIA TX2 Developer Kit====
 
It is connected as shown in figure:
 
It is connected as shown in figure:
 
[[File:TX2-6CAM-YT2.0-3.5I.jpg|alt=TX2 Devkit 6 cameras connection|center|thumb|800x800px|'''TX2 Devkit 6 cameras connection''']]
 
[[File:TX2-6CAM-YT2.0-3.5I.jpg|alt=TX2 Devkit 6 cameras connection|center|thumb|800x800px|'''TX2 Devkit 6 cameras connection''']]
<br />
+
<br />'''Be sure to screw the ADP adapter board to the bottom board.'''
  
====NVIDIA TX2 AGX Xavier====
+
====NVIDIA AGX Xavier(the same with Orin)====
[[File:AGX XAVIER 6cam.jpg|alt=Connect VEYE cameras to AGX Xavier|center|thumb|800x800px|Connect VEYE cameras to AGX Xavier (the green interposer board  is temporary,the official version is black. )]]
 
 
<br />
 
<br />
====NVIDIA Nano Xavier NX Devkit====
+
[[File:ADP-N1-V2.0 XAVIER 6CAM.jpg|link=http://wiki.veye.cc/index.php/File:ADP-N1-V2.0%20XAVIER%206CAM.jpg|alt=Connect VEYE cameras to AGX Xavier|center|thumb|800x800px|Connect VEYE cameras to AGX Xavier]]
 +
<br />'''Be sure to screw the ADP adapter board to the bottom board to ensure that the adapter plate is installed flat.'''
 +
====NVIDIA Nano ,TX2 NX and Xavier NX Devkit====
 
The Xavier NX interface is compatible with raspberry pi and Jetson Nano. The connection mode is shown in figure:
 
The Xavier NX interface is compatible with raspberry pi and Jetson Nano. The connection mode is shown in figure:
 
[[File:Xavier NX connection with VEYE-MIPI-327.jpg|alt=Xavier NX connection with VEYE-MIPI-327|center|thumb|800x800px|Xavier NX connection with VEYE-MIPI-327]]
 
[[File:Xavier NX connection with VEYE-MIPI-327.jpg|alt=Xavier NX connection with VEYE-MIPI-327|center|thumb|800x800px|Xavier NX connection with VEYE-MIPI-327]]
Line 31: Line 101:
 
[[File:Xavier NX connection with CS-MIPI-IMX307.jpg|alt=Xavier NX connection with CS-MIPI-IMX307|center|thumb|800x800px|Xavier NX connection with CS-MIPI-IMX307]]
 
[[File:Xavier NX connection with CS-MIPI-IMX307.jpg|alt=Xavier NX connection with CS-MIPI-IMX307|center|thumb|800x800px|Xavier NX connection with CS-MIPI-IMX307]]
 
[[File:Jetson nano to Veye327.jpg|link=http://wiki.veye.cc/index.php/File:Jetson%20nano%20to%20Veye327.jpg|alt=Jetson Nano A02 与VEYE模组连接|center|thumb|800x800px|VEYE327 connection with Jetson Nano A02]]
 
[[File:Jetson nano to Veye327.jpg|link=http://wiki.veye.cc/index.php/File:Jetson%20nano%20to%20Veye327.jpg|alt=Jetson Nano A02 与VEYE模组连接|center|thumb|800x800px|VEYE327 connection with Jetson Nano A02]]
 
+
[[File:VEYE camera connection with Orin Nano and Orin NX.jpg|center|thumb|800x800px|VEYE camera  connection with Orin Nano and Orin NX]]
===Upgrade Jetson Nano, Jetson TX2, AGX Xavier and Xavier NX system===
+
<br />
 +
===Upgrade Jetson Nano, TX2,Xavier and Orin system===
  
 
====Overview====
 
====Overview====
This section describes how to upgrade the Jetson system to support our camera module. To support our camera module, we need to update the two parts of the L4T (Linux for Tegra) of the Jetson system, '''Image''' and '''DTB'''.
+
This section describes how to upgrade the Jetson system to support our camera module.  
  
In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source  when it is not necessary.
+
* Jetpack4.x versions
  
In particular, for Xavier NX, we provide a burning image of the TF card.
+
To support our camera module, we need to update the two parts of the L4T (Linux for Tegra) of the Jetson system, '''Image''' and '''DTB'''.
  
====Buruing the prebuilt Image to upgrade Jetson Nano and Xavier NX Devkit====
+
In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source  when it is not necessary.
'''''This method is no longer recommended because in this mode, the DTB partition reverts to the default value in some cases. It is recommended to use pre-compiled Image and DTB for driver upgrade.'''''
 
  
You can use the image prebuild by us to upgrade jetson Xavier NX system, which will support our camera.
+
* Jetpack5.x versions
  
Using whole prebuilt image
+
The driver is no longer compiled into the Image, but loaded into the system as a separate module. The dtb file is still compiled together as a whole to facilitate replacement.
  
*download :
+
The dtb can also be loaded dynamically as an overlay. Refer to the official nVidia Developer's Guide for NVIDIA® Jetson™ Linux for details.
  
baiduyun:https://pan.baidu.com/s/1sWrcfEOivjuQ7T7P5bVcng
+
* For MV series camera
  
google driver:https://drive.google.com/drive/folders/1KHSMTdyw-ZczR1yJPj-5y9eIv7izbgt3?usp=sharing
+
For MV series modules, we have added features to Image in order to support extended data types and external trigger modes. So regardless of Jetpack version, you need to update Image.  
  
If Baidu cloud disk download is too slow, you can contact our company customer service ''xumm@csoneplus.com'' to obtain.
+
Whether you need to update modules depends on Jetpack version.
 
 
*How to burn<code><nowiki/></code>
 
 
 
refer to [https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write Official document]
 
  
 
====BSP package introduction====
 
====BSP package introduction====
  
 
=====Path=====
 
=====Path=====
[https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/kernel_image https://github.com/veyeimaging/nvidia_jetson_veye_bsp]
+
https://github.com/veyeimaging/nvidia_jetson_veye_bsp
 
=====bsp package includes:=====
 
=====bsp package includes:=====
  
*prebuild linux kernel:Image
+
*prebuilt dtb for different boards
*prebuild dtb for different boards
 
 
*driver source code
 
*driver source code
 
*dts source code
 
*dts source code
 
*i2c toolkits
 
*i2c toolkits
  
====Upgrade Jetson Nano and Xavier NX without HOST PC====
+
In release packages
 +
 
 +
* prebuilt linux kernel:Image
 +
* prebuilt camera drivers
 +
 
 +
==== DTB file corresponds to Jetson boards ====
 +
 
 +
=====Nano A02=====
 +
<code>tegra210-p3448-0000-p3449-0000-a02.dtb</code>
 +
=====Nano B01 Devkit=====
 +
<code>tegra210-p3448-0000-p3449-0000-b00.dtb</code>
 +
=====Nano B01 4G emmc=====
 +
<code>tegra210-p3448-0002-p3449-0000-b00.dtb</code>
 +
===== Nano 2GB =====
 +
<code>tegra210-p3448-0003-p3542-0000.dtb</code>
 +
=====TX2 Devkit=====
 +
<code>tegra186-quill-p3310-1000-c03-00-base.dtb</code>
 +
 
 +
===== TX2 NX(p3509-0000 carrier board) =====
 +
use the same carrier board with XAVIER NX Devkit
 +
 
 +
<code>tegra186-p3636-0001-p3509-0000-a01.dtb</code>
 +
=====AGX XAVIER=====
 +
<code>tegra194-p2888-0001-p2822-0000.dtb</code>
 +
=====XAVIER NX Devkit=====
 +
<code>tegra194-p3668-all-p3509-0000.dtb</code>
 +
 
 +
Specially, For Jetpack5.x, must use this dtb:
 +
 
 +
* Jetson Xavier NX (P3668-0000) For developer kit only:
  
=====Check the current L4T version=====
+
<code>tegra194-p3668-0000-p3509-0000.dtb</code>
First check the current L4T version and try to replace it with the same version.
+
 
 +
* Jetson Xavier NX (P3668-0001) Commercial module:
 +
 
 +
<code>tegra194-p3668-0001-p3509-0000.dtb</code>
 +
=====AGX Orin=====
 +
<code>tegra234-p3701-0000-p3737-0000.dtb</code>
 +
===== Orin NX=====
 +
 
 +
*Jetson Orin NX 16G(P3767-0000):
 +
 
 +
<code>tegra234-p3767-0000-p3768-0000-a0.dtb</code>
 +
 
 +
*Jetson Orin NX 8G (P3767-0001):
 +
 
 +
<code>tegra234-p3767-0001-p3768-0000-a0.dtb</code>
 +
===== Orin Nano=====
 +
 
 +
*Jetson Orin Nano 8G(P3767-0003) and Jetson Orin Nano Devkit(P3767-0005):
  
<code>cat /etc/nv_tegra_release</code>
+
<code>tegra234-p3767-0003-p3768-0000-a0.dtb</code>
  
If it shows:
+
*Jetson Orin Nano 4G (P3767-0004):
  
<code># R32 (release), REVISION: 4.3......</code>
+
<code>tegra234-p3767-0004-p3768-0000-a0.dtb</code>
 +
==== DTB file name and camera module correspondence ====
 +
Under the dtb directory of each motherboard, the directory corresponding to the camera model is stored, and you can usually know the corresponding camera model directly by the directory name.
  
It means L4t Verion is 32.4.3
+
Specially:
  
=====Download the bsp package to the Jetson board=====
+
1, VEYE-MIPI-CAM2M is the new version of VEYE series dtb, which supports all VEYE 2M series products, including VEYE-MIPI-327E, VEYE-MIPI-IMX327S, VEYE-MIPI-IMX462, VEYE-MIPI-IMX385.
On Jetson Nano or Xavier NX:
 
  
<code>git clone <nowiki>https://github.com/veyeimaging/nvidia_jetson_veye_bsp.git</nowiki></code>
+
2, The ones with fpdlink as suffix correspond to fpdlink coaxial model module.
  
=====Upgrade Image=====
+
3,MV-MIPI-MVCAM is the common dtb for all MV series and RAW series cameras, excluding RAW-MIPI-AR0234M and RAW-MIPI-IMX462M..
First, under the bsp package directory, find the corresponding version of the Image package, decompress it, and execute:
 
  
<code>sudo cp <path to your Image dir>/Image /boot/Image -f</code>
+
====Upgrade directly on the jetson board====
 +
Applicable models: Jetson Nano, Xavier and Orin.
  
=====Upgrade dtb=====
+
Note: AGX Xavie Jetpack version >= 4.4 , support this upgrade mode. Earlier versions have not been verified and are not recommended.
Under the bsp package directory, find the dtb file corresponding to your camera module model and L4T version number.
 
  
<code>sudo cp <path to your dtb dir>/<DTB file name> /boot/ -f</code>
+
=====Check the current L4T version=====
 +
First check the current L4T version and try to replace it with the same version.
  
Then, edit the ''/ boot/extlinux/extlinux.conf''  file and add the following line.
+
<code>cat /etc/nv_tegra_release</code>
  
<code>FDT /boot/<DTB file name></code>
+
If it shows:
  
====Upgrade Jetson Board using Host PC====
+
<code># R32 (release), REVISION: 4.3......</code>
  
=====Setting Up the Host PC Environment=====
+
It means L4t Verion is 32.4.3
  
*Cross-compiling Toolchain
+
===== Note about L4T 32.7. 2 =====
 +
The Image and dts of L4T 32.7.2 are identical to those of L4T 32.7.1, so you can directly use the contents of the L4T 32.7.1 related directory.
  
Please refer to this [https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fxavier_toolchain.html%23wwpID0ESHA link] to install toolchain on your Host PC.
+
In addition, the upgrade requires updating cboot, please refer to the FAQ section.
 +
=====Download the bsp package to the Jetson board=====
 +
On Jetson Board:
  
*L4T source code and Rootfs
+
<code>wget <nowiki>https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz</nowiki></code>
  
You could use SDK Manager or [https://developer.nvidia.com/embedded/downloads directly download] to get source code.
+
Or type in the address bar of your browser:<code><nowiki>https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz</nowiki></code>
  
Sync code as this if you use SDK Manager:
+
<code>tar -xzvf nvidia_jetson_veye_bsp.tar.gz</code>
 +
=====Upgrade Image(For Jetpack4.x or MV series cameras)=====
 +
Backup old version Image
  
''- Jetpack4.2.2''
+
<code>cp /boot/Image /boot/Image.backup</code>
  
<code>./source_sync.sh -t tegra-l4t-r32.2.1</code>
+
<code>cp /boot/Image.sig /boot/Image.sig.backup</code>
  
''- Jetpack4.3''
+
Under the bsp package directory, find the corresponding version of the Image package, decompress it, and execute:
  
<code>./source_sync.sh -t tegra-l4t-r32.3.1</code>
+
<code>sudo cp <path to your Image dir>/Image /boot/Image -f</code>
  
''- Jetpack4.4''
+
''For Xavier NX Devkit''
  
<code>./source_sync.sh -t tegra-l4t-r32.4.3</code>
+
Need to use the signed file(For example,file inside Image_l4t_r32.*.*_veyecam_signed_4_xavier),copy Image and Image.sig to /boot/ dir on the Jetson Xavier board:
  
*Setting Up the Environment
+
<code>sudo cp <path to your Image dir>/Image* /boot/Image -f</code>
  
Assume SDK install directory is <TOPDIR>,source code is in $L4T_DIR/sources directory.
+
Effective after restart.
  
''- Nano@Jetpack4.2.2''
+
===== install camera modules(For Jetpack5.x) =====
 +
Check linux version:
  
<code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448/></code>
+
<code>uname -r</code>
  
''- Nano@Jetpack4.3''
+
Find the corresponding directory in <code>nvidia_jetson_veye_bsp/ko</code> :
  
<code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_NANO_DEVKIT/></code>
+
<code>sudo cp nvidia_jetson_veye_bsp/ko/$(uname -r)/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f</code>
  
''- Nano@Jetpack4.4''
+
'''Specially,for Jetpack5.1 version''':
  
<code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/></code>
+
<code>sudo cp nvidia_jetson_veye_bsp/ko/5.10.104-tegra-l4t35.2.1/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f</code>
  
''- TX2@Jetpack4.2.2''
+
'''Specially,for Jetpack5.1.1 version''':
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3310/</code>
+
<code>sudo cp nvidia_jetson_veye_bsp/ko/5.10.104-tegra-l4t35.3.1/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f</code>
  
''- TX2@Jetpack4.3''
+
====== General ======
 +
Register the modules to the system by executing the following command.
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/</code>
+
<code>sudo depmod</code>
  
''- TX2@Jetpack4.4''
+
====== Special ======
 +
If using a camera module with fpdlink interface. You must manually control the loading order to ensure that ds90ub954.ko is loaded before the camera driver is loaded.
  
<code>export TOP_DIR=/home/xumm/nvidia/JetPack_4.4_Linux_JETSON_TX2/</code>
+
After the system boots, manually insert the drivers in order, e.g.
  
''- AGX XavierJetpack4.2.2''
+
<code>sudo insmod ds90ub954.ko</code>
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P2888/</code>
+
<code>sudo insmod cs_imx307.ko</code>
  
''- AGX XavierJetpack4.3''
+
The command to load the driver can be added to the startup script.
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.3_Linux_P2888/</code>
+
=====Upgrade dtb=====
 +
Under the bsp package directory, find the dtb file corresponding to your camera module model and L4T version number.
  
''- AGX XavierJetpack4.4''
+
<code>sudo mkdir /boot/veyecam/</code>
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_AGX_XAVIER/</code>
+
<code>sudo cp <path to your dtb dir>/<DTB file name> /boot/veyecam/ -f</code>
  
- ''Xavier NX Jetpack4.4''
+
Backup extlinux.conf file first
  
<code>export TOP_DIR=/home/xumm/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_XAVIER_NX_DEVKIT</code>
+
<code>cp /boot/extlinux/extlinux.conf  / boot/extlinux/extlinux.conf.back</code>
  
- Common part
+
Then, edit the ''/boot/extlinux/extlinux.conf''  file and add the following line.
  
<code>export L4T_DIR=$TOP_DIR/Linux_for_Tegra</code>
+
<code>FDT /boot/veyecam/<DTB file name></code>
  
<code>export LOCALVERSION=-tegra</code>
+
Note: <DTB file name> should be replaced with the corresponding dtb name of the mainboard, ensure that the file specified in the FDT line actually exists correctly.
  
<code>export LDK_ROOTFS_DIR=$TOP_DIR/Linux_for_Tegra/rootfs</code>
+
Effective after restart.
  
<code>export ARCH=arm64</code>
+
====Upgrade Jetson Board using Host PC====
 +
This section provides the second method of upgrading the system.
  
<code>export CROSS_COMPILE=aarch64-linux-gnu-</code>
+
This method has the same goal as the method in the previous section, and one of the two can be chosen.
  
<code>export CROSS32CC=arm-linux-gnueabihf-gcc</code>
+
This method is complicated and not recommended for Nano, Xavier, Orin.
  
<code>export TEGRA_KERNEL_OUT=$L4T_DIR/sources/kernel/out_kernel</code>
+
Specifically, for TX2 systems, only the methods in this section can be taken to upgrade.
  
<code>export KERNEL_PATH=$L4T_DIR/sources/kernel/out_kernel</code>
+
=====Burn the standard Image=====
 +
'''''Note: if your Jetson board has correctly burned the standard version Image, you can skip this step.'''''
  
<code>export NVIDIA_PATH=$L4T_DIR/sources/kernel/nvidia</code>
+
You can burn the standard Image using SDK Manager or following the steps below.
  
<code>export NANO_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t210/</code>
+
* Set PATH
  
<code>export TX2_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t18x</code>
+
Assume SDK install directory is <TOPDIR>.
  
<code>export XAVIER_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t19x</code>
+
<code>export TOP_DIR=<absolute path to top dir accroding to your jetpack version and board name;for example /home/xumm/nvidia/nvidia_sdk/JetPack_4.5_Linux_JETSON_XAVIER_NX_DEVKIT/></code>
  
<code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code>
+
<code>export L4T_DIR=$TOP_DIR/Linux_for_Tegra</code>
  
 
*Build default image, flashing to Jetson Board, prepare L4T environment
 
*Build default image, flashing to Jetson Board, prepare L4T environment
Line 210: Line 333:
 
- Nano
 
- Nano
  
<code>sudo ./flash.sh jetson--qspi-sd mmcblk0p1</code>
+
<code>sudo ./flash.sh jetson-nano-devkit mmcblk0p1</code>
 +
 
 +
<code>sudo ./flash.sh jetson-nano-2gb-devkit mmcblk0p1</code>
  
 
''- TX2''
 
''- TX2''
  
 
<code>sudo ./flash.sh jetson-tx2 mmcblk0p1</code>
 
<code>sudo ./flash.sh jetson-tx2 mmcblk0p1</code>
 +
 +
''- TX2 NX(p3509-0000 carrier board)''
 +
 +
<code>sudo ./flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1</code>
  
 
''- AGX Xavier''  
 
''- AGX Xavier''  
Line 226: Line 355:
 
<code>cd $L4T_DIR</code>
 
<code>cd $L4T_DIR</code>
  
<code>git clone https://github.com/veyeimaging/nvidia_jetson_veye_bsp<nowiki/>.git</code><code><nowiki/></code>
+
<code>wget <nowiki>https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz</nowiki></code>
 +
 
 +
<code>tar -xzvf nvidia_jetson_veye_bsp.tar.gz</code>
  
 
<code>export RELEASE_PACK_DIR=$L4T_DIR/nvidia_jetson_veye_bsp</code>
 
<code>export RELEASE_PACK_DIR=$L4T_DIR/nvidia_jetson_veye_bsp</code>
 
=====Upgrade Image and DTB=====
 
=====Upgrade Image and DTB=====
prebuilt Image on github:https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/kernel_image
+
Extract the downloaded `nvidia_jetson_veye_bsp.tar.gz`, and locate the Image corresponding to the specific version.
  
 
*Installing the Kernel
 
*Installing the Kernel
Line 244: Line 375:
 
''- AGX Xavier and Xavier NX Devkit''
 
''- AGX Xavier and Xavier NX Devkit''
  
Need to use the signed file,copy Image and Image.sig to /boot/ dir on the Jetson Xavier board:
+
Need to use the signed file(For example,file inside Image_l4t_r32.*.*_veyecam_signed_4_xavier),copy Image and Image.sig to /boot/ dir on the Jetson Xavier board:
  
 
<code>sudo cp <path to your Image dir>/Image  /boot/Image -f</code>
 
<code>sudo cp <path to your Image dir>/Image  /boot/Image -f</code>
Line 274: Line 405:
 
- ''Nano''
 
- ''Nano''
  
<code>sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1</code>
+
<code><s>sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1</s></code>
 +
 
 +
<code>sudo ./flash.sh -r -k DTB  jetson-nano-devkit mmcblk0p1</code>
 +
 
 +
<code>sudo ./flash.sh -r -k DTB  jetson-nano-2gb-devkit mmcblk0p1</code>
  
 
''- TX2''
 
''- TX2''
  
 
<code>sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1</code>
 
<code>sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1</code>
 +
 +
''- TX2 NX(p3509-0000 carrier board)''
 +
 +
<code>sudo ./flash.sh -r -k kernel-dtb jetson-xavier-nx-devkit-tx2-nx mmcblk0p1</code>
  
 
''- AGX Xavier''
 
''- AGX Xavier''
Line 291: Line 430:
  
 
====Are Image and DTB upgrade successful ?====
 
====Are Image and DTB upgrade successful ?====
 
=====For Image=====
 
<code>ls /sys/bus/i2c/drivers/</code>
 
 
There should have  veye327 csx307 cssc132 directory.
 
 
=====For DTB=====
 
=====For DTB=====
 
DTB varies from platform  and from camera module.
 
DTB varies from platform  and from camera module.
  
- Nano A02
+
- Nano A02/ Nano 2G
  
 
<code>ls /proc/device-tree/host1x/i2c@546c0000/</code>
 
<code>ls /proc/device-tree/host1x/i2c@546c0000/</code>
Line 311: Line 445:
 
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
 
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
  
- AGX Xavier
+
or
  
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
+
<code>ls /proc/device-tree/i2c@3180000/tca9548@77/i2c@*</code>
  
- Xavier NX
+
- AGX Xavier/AGX Orin
  
<code>ls /proc/device-tree/cam_i2cmux/i2c@*</code>
+
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
  
You should be able to find the camera model you used.
+
or
====Building from Source====
 
=====Build kernel=====
 
  
*patch code
+
<code>ls /proc/device-tree/i2c@3180000/tca9548@77/i2c@*</code>
  
<code>cp $RELEASE_PACK_DIR/drivers_source/cam_drv_src/* $NVIDIA_PATH/drivers/media/i2c/</code>
+
- Xavier NX and TX2 NX(p3509-0000 carrier board)
  
''- r32.2.1''
+
<code>ls /proc/device-tree/cam_i2cmux/i2c@*</code>
  
<code>cp $RELEASE_PACK_DIR/drivers_source/kernel_veyecam_config_32.2.1 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veyecam_defconfig</code>
+
You should be able to find the camera model you used.
  
''- r32.3.1''
+
=====For Image=====
 +
<code>ls /sys/bus/i2c/drivers/</code>
  
<code>cp $RELEASE_PACK_DIR/drivers_source/kernel_veyecam_config_32.3.1 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veyecam_defconfig</code>
+
When installing the camera correctly, the relevant directory for the camera should exist, such as veyecam csx307 cssc132 mvcam, etc.
 +
==== Protection against being overwritten by upgrades ====
 +
After making sure Image and dtb are successfully updated, please execute the following command to prevent kernel and dtb from being overwritten by update.
  
''- r32.4.2''
+
<code>sudo apt-mark hold nvidia-l4t-kernel nvidia-l4t-kernel-dtbs</code>
 +
====Build the drivers from source====
 +
Please refer to: [[VEYE CS Camera source for Jetson|Nvidia Jetson platform VEYE camera driver source code compilation guide]].
  
<code>cp $RELEASE_PACK_DIR/drivers_source/kernel_veyecam_config_32.4.2 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veyecam_defconfig</code>
+
Could be used for Flashing or Upgrading.
 +
===Applications and Test===
 +
====Check system status====
 +
Run the following command to confirm whether the camera is probed.
  
''- r32.4.3''
+
*VEYE-MIPI-IMX327S/VEYE-MIPI-IMX462/VEYE-MIPI-IMX385(using VEYE-MIPI-CAM2M dtb)
  
<code>cp $RELEASE_PACK_DIR/drivers_source/kernel_veyecam_config_32.4.3 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veyecam_defconfig</code>
+
<code>dmesg | grep veye</code>  
  
*build
+
The output message appears as shown below:
  
<code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code>
+
<code>camera id is veyecam</code>
  
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_veyecam_defconfig</code>
+
<code>sensor is IMX327/IMX462/IMX385</code>
  
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT Image -j4</code>
+
<code>subdev veyecam [i2c_bus]-003b bound</code>
  
Completed Image file is $TEGRA_KERNEL_OUT/arch/arm64/boot/Image,could be used for Flashing or Upgrading.
+
*For CS-MIPI-IMX307
  
Install Image for Flashing:
+
<code>dmesg | grep csx307</code>  
  
<code>sudo cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image $L4T_DIR/kernel/ -f</code>
+
The output message appears as shown below.:
  
*For xavier,need sign the file
+
<code>Detected CS307 sensor</code>
  
<code>cd $L4T_DIR</code>
+
<code>subdev csx307 [i2c_bus]-003b bound</code>
  
<code>./l4t_sign_image.sh --file kernel/Image --chip 0x19</code>
+
*For CS-MIPI-SC132
  
=====Build DTS=====
+
<code>dmesg | grep cssc132</code>  
  
*patch code
+
The output message appears as shown below.:
  
''- '''Nano@Jetpack4.2.2'''''
+
<code>subdev cssc132 [i2c_bus]-003b bound</code>
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/common/t210/* -r $NANO_DTS_PATH/</code>
+
*For VEYE-MIPI-IMX335
  
For VEYE-MIPI-327
+
<code>dmesg | grep imx335</code>
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
The output message appears as shown below.
  
For CS-MIPI-IMX307
+
<code>camera id is VEYE-MIPI-IMX335</code>
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/CS-MIPI-IMX307/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
<code>subdev veye_imx335 [i2c_bus]-003b bound</code>
  
''- '''Nano@Jetpack4.3'''''
+
*Run the following command to check the presence of video node.
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/common/t210/* -r $NANO_DTS_PATH/</code>
+
<code>ls /dev/video*</code>
  
For VEYE-MIPI-327
+
The output message appears as shown below.
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
<code>videoX</code>  
  
For CS-MIPI-IMX307
+
*For VEYE-MIPI-327(using VEYE-MIPI-327 dtb)
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/CS-MIPI-IMX307/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
<code>dmesg | grep veye327</code>  
  
''- '''Nano@Jetpack4.4'''''
+
The output message appears as shown below:
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/dts\ dtb/common/t210/* -r $NANO_DTS_PATH/</code>
+
<code>Detected VEYE327 sensor</code>
  
For VEYE-MIPI-327
+
<code>subdev veye327 [i2c_bus]-003b bound</code>
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/dts\ dtb/VEYE-MIPI-327/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
The [i2c_bus] in the driver prompt message indicates the i2c bus corresponding to this camera.
  
For CS-MIPI-IMX307
+
====Video Stream Toolkits Manual====
 +
The camera appears as /dev/videoX device node,where X is between [0-5].
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/dts\ dtb/CS-MIPI-IMX307/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
During the Linux boot process, the cameras are detected in the order of i2c bus from smallest to largest. For example, if only one camera is connected, X is 0 regardless of the hardware connection to the location. If 5 cameras are connected, X is reflected as [0-4] according to i2c bus from smallest to largest.
  
For CS-MIPI-SC132
+
In gstreamer command ,v4l2src and nvv4l2camerasrc has a param device=/dev/videoX to identify which camera to use.
 +
=====Gstreamer Usage=====
 +
<code>export DISPLAY=:0</code>
  
<code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/dts\ dtb/CS-MIPI-SC132/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code>
+
*Preview FHD
  
''- '''Jetson TX2@Jetpack4.2.2'''''
+
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.2.2_Linux_GA_P3310/dts\ dtb/common/t18x/* -r $TX2_DTS_PATH/</code>
+
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nv3dsink sync=false</code>
  
For CS-MIPI-IMX307
+
* Preview FHD(using xvimagesink sink if supported)
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.2.2_Linux_GA_P3310/dts\ dtb/CS-MIPI-IMX307/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
<code>export DISPLAY=:0</code>
  
For VEYE-MIPI-327
+
<code>gst-launch-1.0 -e v4l2src io-mode=4 device=/dev/video0 do-timestamp=true ! 'video/x-raw, width=1920, height=1080, framerate=30/1, format=UYVY' ! xvimagesink sync=false</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.2.2_Linux_GA_P3310/dts\ dtb/VEYE-MIPI-327/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
*Preview 720p@60 (CS-MIPI-IMX307)
  
'''''TX2@Jetpack4.3'''''
+
<code>gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.3_Linux_P3310/dts\ dtb/common/t18x/* -r $TX2_DTS_PATH/</code>
+
*Preview 1280*1080@45 (CS-MIPI-SC132)
  
For CS-MIPI-IMX307
+
<code>gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1280, height=(int)1080, framerate=(fraction)45/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.3_Linux_P3310/dts\ dtb/CS-MIPI-IMX307/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
*Preview 640*480p@130 (CS-MIPI-IMX307)
  
For CS-MIPI-SC132
+
<code>gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)640, height=(int)480, framerate=(fraction)130/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.3_Linux_P3310/dts\ dtb/CS-MIPI-SC132/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
*Preview 2 cameras  1080p HD
  
For VEYE-MIPI-327
+
<code>WIDTH=960</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.3_Linux_P3310/dts\ dtb/VEYE-MIPI-327/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
<code>HEIGHT=540</code>
  
''- '''TX2@Jetpack4.4'''''
+
<code>CAPS="video/x-raw(memory:NVMM),format=(string)UYVY, width=1920, height=1080"</code>
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.4_Linux_JETSON_TX2/dts\ dtb/common/t18x/* -r $TX2_DTS_PATH/</code>
+
<code>gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=$WIDTH sink_0::height=$HEIGHT sink_1::xpos=$WIDTH sink_1::ypos=0 sink_1::width=$WIDTH sink_1::height=$HEIGHT ! nv3dsink nvv4l2camerasrc device=/dev/video0 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp. nvv4l2camerasrc  device=/dev/video1 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp.</code>
  
For CS-MIPI-IMX307
+
*Record FHD in H.264 format to a video file
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.4_Linux_JETSON_TX2/dts\ dtb/CS-MIPI-IMX307/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
<code>gst-launch-1.0 nvv4l2camerasrc num-buffers=300 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nvv4l2h264enc control-rate=1 bitrate=10000000 ! h264parse ! qtmux ! filesink location=filename.mp4 -e</code>
  
For CS-MIPI-SC132
+
*Playback of saved video file
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.4_Linux_JETSON_TX2/dts\ dtb/CS-MIPI-SC132/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
<code>gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvoverlaysink -e</code>
  
For VEYE-MIPI-327
+
*Capturing FHD still image  
  
<code>cp $RELEASE_PACK_DIR/TX2/JetPack_4.4_Linux_JETSON_TX2/dts\ dtb/VEYE-MIPI-327/tegra186-quill-p3310-1000-a00-00-base.dts $TX2_DTS_PATH/quill/kernel-dts/</code>
+
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jp</code>
  
''- '''AGX Xavier@Jetpack4.2.2'''''
+
===== VEYE-MIPI-IMX335 gstreamer example =====
 +
Since VEYE-MIPI-IMX335 supports only a few specific resolution modes, its driver we use use_sensor_mode_id mode.
 +
{| class="wikitable"
 +
|+VEYE-MIPI-IMX335 mode
 +
!./veye5_mipi_i2c.sh video mode
 +
!v4l2-ctl sensor_mode
 +
!video format
 +
|-
 +
|1
 +
|0
 +
|2592x1944@20fps
 +
|-
 +
|2
 +
|1
 +
|2592x1944@12.5fps
 +
|-
 +
|3
 +
|2
 +
|2560x1440@25fps
 +
|-
 +
|4
 +
|3
 +
|2560x1440@30fps
 +
|}
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.2.2_Linux_GA_P2888/dts\ dtb/common/t19x/* -r $XAVIER_DTS_PATH/</code>
+
* prepare
  
For CS-MIPI-IMX307
+
<code>sudo apt-get install v4l-utils</code>
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.2.2_Linux_GA_P2888/dts\ dtb/CS-MIPI-IMX307/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
Refer to the following section and download the veye5_mipi_i2c.sh tool.
  
For VEYE-MIPI-327
+
* 2592x1944@20fps mode preview, framerate statistics
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.2.2_Linux_GA_P2888/dts\ dtb/VEYE-MIPI-327/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=0</code>
  
''- '''AGX Xavier@Jetpack4.3'''''
+
<code>./veye5_mipi_i2c.sh -w -f videomode -p1 1 -b [busnum]</code>
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.3_Linux_P2888/dts\ dtb/common/t19x/* -r $XAVIER_DTS_PATH/</code>
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5376</code>
  
For CS-MIPI-IMX307
+
Preview
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.3_Linux_P2888/dts\ dtb/CS-MIPI-IMX307/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM), width=(int)2592, height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false</code>
  
For CS-MIPI-SC132
+
Framerate statistics
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.3_Linux_P2888/dts\ dtb/CS-MIPI-SC132/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY,width=(int)2592,height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! fpsdisplaysink video-sink=fakesink -v</code>
  
For VEYE-MIPI-327
+
* 2560x1440@30fps mode video encode and capture
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.3_Linux_P2888/dts\ dtb/VEYE-MIPI-327/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=3</code>
  
''- '''AGX Xavier@Jetpack4.4'''''
+
<code>./veye5_mipi_i2c.sh -w -f videomode -p1 4 -b [busnum]</code>
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.4_Linux_JETSON_AGX_XAVIER/dts\ dtb/common/t19x/* -r $XAVIER_DTS_PATH/</code>
+
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5120</code>
  
For CS-MIPI-IMX307
+
Video encode
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.4_Linux_JETSON_AGX_XAVIER/dts\ dtb/CS-MIPI-IMX307/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>gst-launch-1.0 nvv4l2camerasrc num-buffers=300 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nvv4l2h264enc control-rate=0 bitrate=10000000 ! h264parse ! qtmux ! filesink location=filename.mp4 -e</code>
  
For CS-MIPI-SC132
+
Video Replay
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.4_Linux_JETSON_AGX_XAVIER/dts\ dtb/CS-MIPI-SC132/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nv3dsink -e</code>
  
For VEYE-MIPI-327
+
Capture
  
<code>cp $RELEASE_PACK_DIR/AGX-Xaviar/JetPack_4.4_Linux_JETSON_AGX_XAVIER/dts\ dtb/VEYE-MIPI-327/tegra194-p2888-0001-p2822-0000.dts $XAVIER_DTS_PATH/galen/kernel-dts/</code>
+
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jpg</code>
  
''- '''Xavier NX@Jetpack4.4'''''
+
===== Jetson multimedia-api samples =====
 +
The [https://docs.nvidia.com/jetson/l4t-multimedia/index.html Jetson Linux API] is available on the Jetson platform for developers to use. Please refer to the official nVidia documentation for the installation of the jetson_multimedia_api package.
  
<code>cp $RELEASE_PACK_DIR/Xavier-NX/JetPack_4.4_Linux_JETSON_XAVIER_NX_DEVKIT/dts\ dtb/common/t19x/* -r $XAVIER_DTS_PATH/</code>
+
For VEYE and CS series cameras, the ISP function is already integrated in the camera, so you cannot use libargus to get data, but can directly use the standard V4L2 interface to get data from the /dev/videoX device file.
  
For CS-MIPI-IMX307
+
The following two samples can be run directly.
  
<code>cp $RELEASE_PACK_DIR/Xavier-NX/JetPack_4.4_Linux_JETSON_XAVIER_NX_DEVKIT/dts\ dtb/CS-MIPI-IMX307/tegra194-p3509-0000-a00.dtsi $XAVIER_DTS_PATH/jakku/kernel-dts/common/</code>
+
====== 12_camera_v4l2_cuda ======
 +
<code>./camera_v4l2_cuda -d /dev/video0 -s 1920x1080 -f UYVY</code>
  
For CS-MIPI-SC132
+
====== v4l2cuda ======
 +
<code>./capture-cuda -d /dev/video0 -f UYVY -m -o out.ppm -s 1920x1080 -c 1</code>
  
<code>cp $RELEASE_PACK_DIR/Xavier-NX/JetPack_4.4_Linux_JETSON_XAVIER_NX_DEVKIT/dts\ dtb/CS-MIPI-SC132/tegra194-p3509-0000-a00.dtsi $XAVIER_DTS_PATH/jakku/kernel-dts/common/</code>
+
===== v4l2-ctl Application Examples =====
  
For VEYE-MIPI-327
+
======install v4l2-utils======
 +
<code>sudo apt-get install v4l-utils</code>
 +
======Configure parameters using v4l2-ctl======
  
<code>cp $RELEASE_PACK_DIR/Xavier-NX/JetPack_4.4_Linux_JETSON_XAVIER_NX_DEVKIT/dts\ dtb/VEYE-MIPI-327/tegra194-p3509-0000-a00.dtsi $XAVIER_DTS_PATH/jakku/kernel-dts/common/</code>
+
* List the data formats supported by the camera
  
*build
+
<code>v4l2-ctl -d /dev/video0 --list-formats-ext</code>
  
<code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code>
+
* Frame rate statistics
  
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs</code>
+
<code>v4l2-ctl -d /dev/video0  --set-fmt-video=width=1920,height=1080,pixelformat=UYVY--stream-mmap --stream-count=-1 --stream-to=/dev/null</code>
  
- ''Nano''
+
* Save image to file
  
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/</code>
+
<code>v4l2-ctl -d /dev/video0  --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --stream-to=uyvy-1920x1080.yuv</code>
  
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-b00.dtb $L4T_DIR/kernel/dtb/</code>
+
===== yavta =====
  
''- TX2''
+
======install yavta======
 +
<code>git clone <nowiki>https://github.com/veyeimaging/yavta.git</nowiki></code>
  
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb $L4T_DIR/kernel/dtb/</code>
+
<code>cd yavta;make</code>
  
''- AGX XAVIER''
+
====== Save image to file ======
 +
<code>./yavta -c1 -FUYVY-1920x1080.yuv --skip 0 -f UYVY -s 1920x1080 /dev/video0</code>
  
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra194-p2888-0001-p2822-0000.dtb</code>
+
===== Opencv =====
 +
To import camera data from v4l2 devices to opencv, we provide several samples.
  
''- XAVIER NX''
+
We provide 2 samples [https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/samples/opencv here].
  
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra194-p3668-all-p3509-0000.dtb  $L4T_DIR/kernel/dtb/</code>
+
====Using i2c script to modify camera parameters====
  
Could be used for Flashing or Upgrading.
+
*VEYE-MIPI-CAM2M Series(VEYE-MIPI-327、VEYE-MIPI-IMX327S、VEYE-MIPI-IMX462、VEYE-MIPI-IMX385)
===Applications and Test===
 
====Check system status====
 
Run the following command to confirm whether the camera is probed.
 
  
*For VEYE-MIPI-327
+
Video Control Toolkits Manual :[[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-327 I2C]]
  
<code>dmesg | grep veye327</code>  
+
*CS-MIPI-IMX307和CS-MIPI-SC132
  
The output message appears as shown below.
+
Video Control Toolkits Manual [[CS-MIPI-X i2c|CS-MIPI-X I2C]]
 
 
<code>Detected VEYE327 sensor</code>
 
 
 
<code>subdev veye327 X-003b bound</code>
 
 
 
*For CS-MIPI-IMX307
 
 
 
<code>dmesg | grep csx307</code>  
 
 
 
The output message appears as shown below.:
 
 
 
<code>Detected CS307 sensor</code>
 
 
 
<code>subdev csx307 X-003b bound</code>
 
 
 
*For CS-MIPI-SC132
 
  
<code>dmesg | grep cssc132</code>  
+
* VEYE-MIPI-IMX335
  
The output message appears as shown below.
+
Video Control Toolkits Manual [[5m mipi i2c user guide|VEYE-MIPI-IMX335 I2C]]
 +
===How to port the driver to a third party board===
  
<code>subdev cssc132 X-003b bound</code>
+
==== driver porting ====
 +
For Image, we have added functionality to the official standard Image and have not made any deletions. In general, you can use our compiled Image directly. for special cases, please refer to the source code for integration.
  
*Run the following command to check the presence of video node.
+
For modules it is even easier to just use them. Compiling from source code and is very simple, so I won't go into details here.
  
<code>ls /dev/video*</code>
+
==== dts porting ====
 +
We only provide dtb for some boards of Nano, TX2, Xavier, Orin. For the types not provided, it is necessary to:
  
The output message appears as shown below.
+
1. get the dts source code of that board.
 
 
<code>videoX</code>  
 
 
 
====Video Stream Toolkits Manual====
 
Our camera appears as /dev/videoX device node,where X is between [0-5].
 
  
in gstreamer command ,v4l2src has a param device=/dev/videoX to identify which camera to use.
+
2. put our camera related dts to the whole.
=====Gstreamer Usage=====
 
  
*Preview FHD(HW accelerated)
+
3. recompile to get the dtb of the corresponding board.
  
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
+
The operation steps are not complicated, but there are some third-party base board manufacturers do not open dts source code. This will require the cooperation of all parties to do so.
  
*Preview 720p@60 (CS-MIPI-IMX307,HW accelerated)
+
=== FAQ and bug list ===
  
<code>gst-launch-1.0 v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
+
==== Problem of system update not taking effect on a system with an SSD hard drive ====
 +
If an SSD hard drive is installed in a system and mounted on the / directory, it may cause regular system update operations (Image, ko, dtb) to be completely ineffective.
  
*Preview 1280*1080@45 (CS-MIPI-SC132,HW accelerated)
+
The reason for this is that the board comes with an eMMC storage device, and the Image, ko, and dtb that take effect during the boot stage are stored in the eMMC.
  
<code>gst-launch-1.0 v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)1280, height=(int)1080, framerate=(fraction)45/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
+
After the boot is completed, if the SSD hard drive is mounted on the / directory, it may cause the files stored on the eMMC to be inaccessible.
  
*Preview 640*480p@130 (CS-MIPI-IMX307,HW accelerated)
+
The solution in this case is to manually mount the ''mmcblk0p1'' partition of the eMMC to a specific directory, and perform all system update operations based on this directory.
  
<code>gst-launch-1.0 v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)640, height=(int)480, framerate=(fraction)130/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
+
==== VEYE cameras on Jetpack5.x ====
 +
Jetpack5.x has more stringent requirements for mipi signals in xavier and orin platforms. VEYE-MIPI-xxx series cameras need firmware hdver>=7 to be perfectly supported.
  
*Preview 2 cameras  1080p HD(HW accelerated)
+
==== CS-MIPI-IMX307 combined with Orin nano and Orin NX Green Screen ====
 +
When CS-MIPI-IMX307 is powered by the 3.3V mode of the FFC cable, the MIPI receiver state machine of Orin nano and Orin NX (Jetpack5.1.1) will enter an incorrect state.
  
<code>WIDTH=960</code>
+
It is recommended to refer to this [[Power supply mode switching|article]] and modify the power supply mode of CS-MIPI-IMX307 to use the 5V power supply mode.
  
<code>HEIGHT=540</code>
+
==== Jetpack5.0.1 DP ====
 +
This version has many bugs, such as not supporting nvv4l2camerasrc, not recommended to use.
  
<code>CAPS="video/x-raw,format=(string)UYVY, width=1920, height=1080"</code>
+
==== nv3dsink ====
 +
Jetpack 5.x no longer supports nvoverlaysink, use nv3dsink instead.
  
<code>gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=$WIDTH sink_0::height=$HEIGHT sink_1::xpos=$WIDTH sink_1::ypos=0 sink_1::width=$WIDTH sink_1::height=$HEIGHT ! nvoverlaysink v4l2src device=/dev/video0 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp. v4l2src device=/dev/video1 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp.</code>
+
==== cboot of L4T32.7.2 on Xavier ====
 +
For the Xavier series, there is a bug in the cboot of L4T32.7.2 that must be fixed before the upgrade can be done.
  
*Record FHD in H.264 format to a video file(HW accelerated)
+
[https://elinux.org/Jetson/L4T/r32.7.x_patches <nowiki>[Cboot] Cboot in 32.7.2 fails to read extlinux.conf</nowiki>]
  
<code>gst-launch-1.0 v4l2src num-buffers=300 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! omxh264enc qp-range=20,20:20,20:-1,-1 ! matroskamux ! queue ! filesink location=videoname.mkv</code>
+
We compiled the correct version of cboot and put it [https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/cboot_l4t_32.7.2 here].
  
*Playback of saved video file (HW accelerated)
+
After downloading, put it in Linux_for_Tegra/bootloader directory and execute the following command on PC to burn cboot.
  
<code>gst-launch-1.0 filesrc location=videoname.mkv ! matroskademux ! h264parse ! omxh264dec ! nvoverlaysink</code>
+
*AGX Xavier
  
*Capturing FHD still image  
+
<code>sudo ./flash.sh -r -k cpu-bootloader jetson-xavier mmcblk0p1</code>
  
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! jpegenc ! filesink location=jpgname.jpg</code>
+
*Xavier NX
====Video Control Toolkits Manual====
 
  
*i2c bus description:
+
<code>sudo ./flash.sh -r -k cpu-bootloader jetson-xavier-nx-devkit mmcblk0p1</code>
 +
=== Document History ===
  
For AGX-Xavier and TX2, ADP-N1 has 6 MIPI CSI-2 interface [A-F],the corresponding i2c address is[30-35].
+
*20230427
  
For Xavier NX, the corresponding i2c address is 9 and10.
+
Add support for Jetpack5.1.1.
  
For Nano A02, the corresponding i2c address is 6.
+
*20230222
  
For Xavier NX, the corresponding i2c address is 7 and 8.
+
Add support for Jetpack5.1.
  
It is also the same as the X part of dmesg message:
+
*20220831
  
<code>subdev veye327 X-003b bound</code>
+
Improve the description of VEYE series and MV series under Jetpack 5.0.2.
  
<code>subdev csimx307 X-003b bound</code>
+
* 20220824
  
<code>subdev cssc132 X-003b bound</code>
+
Add support for Jetpack5.0.2.
  
using -b option to identify which bus you want to use.
+
* 20220720
  
*VEYE-MIPI-327
+
Add multimedia-api samples and v4l2 samples.
  
Video Control Toolkits Manual :[[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-327 I2C]]
+
*20220714
  
*CS-MIPI-IMX307和CS-MIPI-SC132
+
Add L4T32.7.2 Note。
  
Video Control Toolkits Manual :[[CS-MIPI-X i2c|CS-MIPI-X I2C]]
+
* 20220629
===Realtimes RTSO-9001===
 
====Hardware Setup====
 
[[File:CS-MIPI-307 to ruitai 9001tx2.jpg|center|thumb|800x800px|CS-MIPI-IMX307 and RTSO-9001(TX2)]]
 
  
 +
Add support for Jetpack 5.0.1DP and tune through AGX-Orin.
  
Matching with Realtimes RTSO-9001, you need to use RTST-RPI adapter board.
+
* 20220110
  
Note: the power supply capacity of the MIPI CSI-2 interface of the current version of RTSO-9001 is not enough to support the power requirements of our camera, which requires an additional 5V power supply to the camera. It is not shown in the picture above.
+
Add VEYE-MIPI-IMX385 support.
  
====Software bsp====
+
* 20220105
  
*The corresponding directory for Realtimes RTSO-9001, is:
+
Use nvv4l2h264enc instead of omxh264enc in gstreamer command,because omxh264enc  has been deprecated.
  
nvidia_jetson_veye_bsp\TX2\JetPack_4.2.2_Linux_RTSO-9001
+
* 20211025
  
*Subject to the agreement with Ruitai, we do not release the source code
+
Use nvcamerasrc instead of v4l2src in gstreamer command , and the data goes directly into DMA memory.
*Our code have been submitted to Realtimes, and customers are advised to contact Realtimes for a complete version of the supported image.
 
  
 
===References===
 
===References===
Line 679: Line 834:
 
L4T Doc:  https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.htm
 
L4T Doc:  https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.htm
  
TX2 user guide: [https://developer.download.nvidia.cn/embedded/L4T/r28_Release_v2.0/GA/Docs/Jetson_TX1_and_TX2_Developer_Kits_User_Guide.pdf?lumI95GW6BEyMmhP1Is8E79OYo105-tpsC2bOVQmBZ6Tw8AkLU4pSDMPCuzOaEonWMiDO2hliXbNvtkH9do81TNIXmLZGGoV7xoEehyEgfc2WO8e0Czz5chLSHoCqIuPLL1 link]
+
TX2 user guide: [https://developer.download.nvidia.cn/embedded/L4T/r28_Release_v2.0/GA/Docs/Jetson_TX1_and_TX2_Developer_Kits_User_Guide.pdf?lumI95GW6BEyMmhP1Is8E79OYo105-tpsC2bOVQmBZ6Tw8AkLU4pSDMPCuzOaEonWMiDO2hliXbNvtkH9do81TNIXmLZGGoV7xoEehyEgfc2WO8e0Czz5chLSHoCqIuPLL1 link]<br />
 
 
Realtimes website:http://www.realtimes.cn/
 
<br />
 

Latest revision as of 16:03, 5 March 2024

查看中文

How to use VEYE and CS series camera module on NVIDIA Jetson Nano,TX2,Xavier and Orin

1 Overview

This guide shows how to use VEYE and CS series camera modules on Jetson Nano,Jetson Nano 2GB,TX2,TX2 NX,AGX Xavier and Xavier NX. Jetson SDK Version is:

  • Jetpack4.2.2,L4T r32.2.1
  • Jetpack4.3,L4T r32.3.1
  • Jetpack4.4,L4T r32.4.3
  • Jetpack4.4.1,L4T r32.4.4
  • Jetpack4.5,L4T r32.5
  • Jetpack4.5.1,L4T r32.5.1
  • Jetpack4.6,L4T r32.6.1
  • Jetpack4.6.1, L4T r32.7.1
  • Jetpack4.6.2,L4T r32.7.2
  • Jetpack4.6.3,L4T r32.7.3
  • Jetpack4.6.4,L4T r32.7.4
  • Jetpack5.0.1DP, L4T r34.1.1
  • Jetpack5.0.2, L4T r35.1
  • Jetpack5.1,L4T r35.2.1
  • Jetpack5.1.1,L4T r35.3.1
  • Jetpack5.1.2,L4T r35.4.1

We provide two ways to do so: Prebuilt Binaries or Source Code. Yes, It's Open Source!

VEYE and CS series camera modules are camera module with ISP functions build in. It output UYVY data using MIPI-CSI2. We provide V4L2 interface for video streaming apps , and Video Control Toolkits (which is Shell Script) to control the camera module directly, which is called DRA(Directly Register Access).

1.1 Camera module list

Camera module dirver status list
Series Model Status
VEYE series VEYE-MIPI-IMX327S Done
VEYE series VEYE-MIPI-IMX385 Done
VEYE series VEYE-MIPI-IMX462 Done
VEYE series VEYE-MIPI-IMX335 Done
CS series CS-MIPI-IMX307 Done
CS series CS-MIPI-SC132 Done
TX2-XAVIER-nCAM Series CS-TX2-XAVIER-nCAM Done

1.2 How to check the current L4T version

1.2.1 Method 1

On Jetson board

cat /etc/nv_tegra_release

If it shows:

# R32 (release), REVISION: 4.3......

It means L4t Version is 32.4.3

1.2.2 Method 2

Refer to this link to install jetson-stats:

jtop

2 Hardware Setup

We have designed a 6cam interposer board for TX2 devkit,Xavier and Orin, It support up to 6 cameras at the same time.

6cam interposer board connected with 6 cameras
6cam interposer board connected with 6 cameras


In particular, the VEYE-MIPI-IMX335 must use a 12V DC terminal to provide auxiliary power due to its high power consumption. Refer to J11 of ADP-N1.

2.1 NVIDIA TX2 Developer Kit

It is connected as shown in figure:

TX2 Devkit 6 cameras connection
TX2 Devkit 6 cameras connection


Be sure to screw the ADP adapter board to the bottom board.

2.2 NVIDIA AGX Xavier(the same with Orin)


Connect VEYE cameras to AGX Xavier
Connect VEYE cameras to AGX Xavier


Be sure to screw the ADP adapter board to the bottom board to ensure that the adapter plate is installed flat.

2.3 NVIDIA Nano ,TX2 NX and Xavier NX Devkit

The Xavier NX interface is compatible with raspberry pi and Jetson Nano. The connection mode is shown in figure:

Xavier NX connection with VEYE-MIPI-327
Xavier NX connection with VEYE-MIPI-327


Xavier NX connection with CS-MIPI-IMX307
Xavier NX connection with CS-MIPI-IMX307
Jetson Nano A02 与VEYE模组连接
VEYE327 connection with Jetson Nano A02
VEYE camera  connection with Orin Nano and Orin NX


3 Upgrade Jetson Nano, TX2,Xavier and Orin system

3.1 Overview

This section describes how to upgrade the Jetson system to support our camera module.

  • Jetpack4.x versions

To support our camera module, we need to update the two parts of the L4T (Linux for Tegra) of the Jetson system, Image and DTB.

In the Image, we added the camera driver, while the DTB indicates the camera model used. In general, you only need to use the Image and DTB, that we have prebuilt, and you don't need to build from source when it is not necessary.

  • Jetpack5.x versions

The driver is no longer compiled into the Image, but loaded into the system as a separate module. The dtb file is still compiled together as a whole to facilitate replacement.

The dtb can also be loaded dynamically as an overlay. Refer to the official nVidia Developer's Guide for NVIDIA® Jetson™ Linux for details.

  • For MV series camera

For MV series modules, we have added features to Image in order to support extended data types and external trigger modes. So regardless of Jetpack version, you need to update Image.

Whether you need to update modules depends on Jetpack version.

3.2 BSP package introduction

3.2.1 Path

https://github.com/veyeimaging/nvidia_jetson_veye_bsp

3.2.2 bsp package includes:
  • prebuilt dtb for different boards
  • driver source code
  • dts source code
  • i2c toolkits

In release packages

  • prebuilt linux kernel:Image
  • prebuilt camera drivers

3.3 DTB file corresponds to Jetson boards

3.3.1 Nano A02

tegra210-p3448-0000-p3449-0000-a02.dtb

3.3.2 Nano B01 Devkit

tegra210-p3448-0000-p3449-0000-b00.dtb

3.3.3 Nano B01 4G emmc

tegra210-p3448-0002-p3449-0000-b00.dtb

3.3.4 Nano 2GB

tegra210-p3448-0003-p3542-0000.dtb

3.3.5 TX2 Devkit

tegra186-quill-p3310-1000-c03-00-base.dtb

3.3.6 TX2 NX(p3509-0000 carrier board)

use the same carrier board with XAVIER NX Devkit

tegra186-p3636-0001-p3509-0000-a01.dtb

3.3.7 AGX XAVIER

tegra194-p2888-0001-p2822-0000.dtb

3.3.8 XAVIER NX Devkit

tegra194-p3668-all-p3509-0000.dtb

Specially, For Jetpack5.x, must use this dtb:

  • Jetson Xavier NX (P3668-0000) For developer kit only:

tegra194-p3668-0000-p3509-0000.dtb

  • Jetson Xavier NX (P3668-0001) Commercial module:

tegra194-p3668-0001-p3509-0000.dtb

3.3.9 AGX Orin

tegra234-p3701-0000-p3737-0000.dtb

3.3.10 Orin NX
  • Jetson Orin NX 16G(P3767-0000):

tegra234-p3767-0000-p3768-0000-a0.dtb

  • Jetson Orin NX 8G (P3767-0001):

tegra234-p3767-0001-p3768-0000-a0.dtb

3.3.11 Orin Nano
  • Jetson Orin Nano 8G(P3767-0003) and Jetson Orin Nano Devkit(P3767-0005):

tegra234-p3767-0003-p3768-0000-a0.dtb

  • Jetson Orin Nano 4G (P3767-0004):

tegra234-p3767-0004-p3768-0000-a0.dtb

3.4 DTB file name and camera module correspondence

Under the dtb directory of each motherboard, the directory corresponding to the camera model is stored, and you can usually know the corresponding camera model directly by the directory name.

Specially:

1, VEYE-MIPI-CAM2M is the new version of VEYE series dtb, which supports all VEYE 2M series products, including VEYE-MIPI-327E, VEYE-MIPI-IMX327S, VEYE-MIPI-IMX462, VEYE-MIPI-IMX385.

2, The ones with fpdlink as suffix correspond to fpdlink coaxial model module.

3,MV-MIPI-MVCAM is the common dtb for all MV series and RAW series cameras, excluding RAW-MIPI-AR0234M and RAW-MIPI-IMX462M..

3.5 Upgrade directly on the jetson board

Applicable models: Jetson Nano, Xavier and Orin.

Note: AGX Xavie Jetpack version >= 4.4 , support this upgrade mode. Earlier versions have not been verified and are not recommended.

3.5.1 Check the current L4T version

First check the current L4T version and try to replace it with the same version.

cat /etc/nv_tegra_release

If it shows:

# R32 (release), REVISION: 4.3......

It means L4t Verion is 32.4.3

3.5.2 Note about L4T 32.7. 2

The Image and dts of L4T 32.7.2 are identical to those of L4T 32.7.1, so you can directly use the contents of the L4T 32.7.1 related directory.

In addition, the upgrade requires updating cboot, please refer to the FAQ section.

3.5.3 Download the bsp package to the Jetson board

On Jetson Board:

wget https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz

Or type in the address bar of your browser:https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz

tar -xzvf nvidia_jetson_veye_bsp.tar.gz

3.5.4 Upgrade Image(For Jetpack4.x or MV series cameras)

Backup old version Image

cp /boot/Image /boot/Image.backup

cp /boot/Image.sig /boot/Image.sig.backup

Under the bsp package directory, find the corresponding version of the Image package, decompress it, and execute:

sudo cp <path to your Image dir>/Image /boot/Image -f

For Xavier NX Devkit

Need to use the signed file(For example,file inside Image_l4t_r32.*.*_veyecam_signed_4_xavier),copy Image and Image.sig to /boot/ dir on the Jetson Xavier board:

sudo cp <path to your Image dir>/Image* /boot/Image -f

Effective after restart.

3.5.5 install camera modules(For Jetpack5.x)

Check linux version:

uname -r

Find the corresponding directory in nvidia_jetson_veye_bsp/ko :

sudo cp nvidia_jetson_veye_bsp/ko/$(uname -r)/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f

Specially,for Jetpack5.1 version:

sudo cp nvidia_jetson_veye_bsp/ko/5.10.104-tegra-l4t35.2.1/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f

Specially,for Jetpack5.1.1 version:

sudo cp nvidia_jetson_veye_bsp/ko/5.10.104-tegra-l4t35.3.1/* /lib/modules/$(uname -r)/kernel/drivers/media/i2c/ -f

3.5.5.1 General

Register the modules to the system by executing the following command.

sudo depmod

3.5.5.2 Special

If using a camera module with fpdlink interface. You must manually control the loading order to ensure that ds90ub954.ko is loaded before the camera driver is loaded.

After the system boots, manually insert the drivers in order, e.g.

sudo insmod ds90ub954.ko

sudo insmod cs_imx307.ko

The command to load the driver can be added to the startup script.

3.5.6 Upgrade dtb

Under the bsp package directory, find the dtb file corresponding to your camera module model and L4T version number.

sudo mkdir /boot/veyecam/

sudo cp <path to your dtb dir>/<DTB file name> /boot/veyecam/ -f

Backup extlinux.conf file first

cp /boot/extlinux/extlinux.conf / boot/extlinux/extlinux.conf.back

Then, edit the /boot/extlinux/extlinux.conf file and add the following line.

FDT /boot/veyecam/<DTB file name>

Note: <DTB file name> should be replaced with the corresponding dtb name of the mainboard, ensure that the file specified in the FDT line actually exists correctly.

Effective after restart.

3.6 Upgrade Jetson Board using Host PC

This section provides the second method of upgrading the system.

This method has the same goal as the method in the previous section, and one of the two can be chosen.

This method is complicated and not recommended for Nano, Xavier, Orin.

Specifically, for TX2 systems, only the methods in this section can be taken to upgrade.

3.6.1 Burn the standard Image

Note: if your Jetson board has correctly burned the standard version Image, you can skip this step.

You can burn the standard Image using SDK Manager or following the steps below.

  • Set PATH

Assume SDK install directory is <TOPDIR>.

export TOP_DIR=<absolute path to top dir accroding to your jetpack version and board name;for example /home/xumm/nvidia/nvidia_sdk/JetPack_4.5_Linux_JETSON_XAVIER_NX_DEVKIT/>

export L4T_DIR=$TOP_DIR/Linux_for_Tegra

  • Build default image, flashing to Jetson Board, prepare L4T environment

cd $L4T_DIR

sudo ./apply_binaries.sh  

- Nano

sudo ./flash.sh jetson-nano-devkit mmcblk0p1

sudo ./flash.sh jetson-nano-2gb-devkit mmcblk0p1

- TX2

sudo ./flash.sh jetson-tx2 mmcblk0p1

- TX2 NX(p3509-0000 carrier board)

sudo ./flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1

- AGX Xavier

sudo ./flash.sh jetson-xavier mmcblk0p1

- Xavier NX Devkit

sudo ./flash.sh jetson-xavier-nx-devkit mmcblk0p1

3.6.2 Download our bsp package for Jetson

cd $L4T_DIR

wget https://github.com/veyeimaging/nvidia_jetson_veye_bsp/releases/latest/download/nvidia_jetson_veye_bsp.tar.gz

tar -xzvf nvidia_jetson_veye_bsp.tar.gz

export RELEASE_PACK_DIR=$L4T_DIR/nvidia_jetson_veye_bsp

3.6.3 Upgrade Image and DTB

Extract the downloaded `nvidia_jetson_veye_bsp.tar.gz`, and locate the Image corresponding to the specific version.

  • Installing the Kernel

Whether you use a prebuild kernel or you build it yourself

- Nano and TX2

copy Image to /boot/ dir on the Jetson Nano or TX2 board:

sudo cp <path to your Image dir>/Image /boot/Image -f

- AGX Xavier and Xavier NX Devkit

Need to use the signed file(For example,file inside Image_l4t_r32.*.*_veyecam_signed_4_xavier),copy Image and Image.sig to /boot/ dir on the Jetson Xavier board:

sudo cp <path to your Image dir>/Image /boot/Image -f

sudo cp <path to your Image dir>/Image.sig /boot/Image -f

on the Host PC:

cd $L4T_DIR

sudo ./flash.sh -k kernel jetson-xavier mmcblk0p1

- Xavier NX

on the Host PC:

cd $L4T_DIR

sudo ./flash.sh -k kernel jetson-xavier-nx-devkit mmcblk0p1

  • Flashing dtb file

Enter the recovery mode,and on the Host PC:

cp <path to your dtb dir>/dtbfilename $L4T_DIR/kernel/dtb/ -f

cd $L4T_DIR

- Nano

sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1

sudo ./flash.sh -r -k DTB jetson-nano-devkit mmcblk0p1

sudo ./flash.sh -r -k DTB jetson-nano-2gb-devkit mmcblk0p1

- TX2

sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

- TX2 NX(p3509-0000 carrier board)

sudo ./flash.sh -r -k kernel-dtb jetson-xavier-nx-devkit-tx2-nx mmcblk0p1

- AGX Xavier

sudo ./flash.sh -r -k kernel-dtb jetson-xavier mmcblk0p1

- Xavier NX

sudo ./flash.sh -r -k kernel-dtb jetson-xavier-nx-devkit mmcblk0p1

Reset Jetson Board after flashing.

3.7 Are Image and DTB upgrade successful ?

3.7.1 For DTB

DTB varies from platform and from camera module.

- Nano A02/ Nano 2G

ls /proc/device-tree/host1x/i2c@546c0000/

- Nano B01

ls /proc/device-tree/cam_i2cmux/i2c@*

- TX2 Devkit

ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*

or

ls /proc/device-tree/i2c@3180000/tca9548@77/i2c@*

- AGX Xavier/AGX Orin

ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*

or

ls /proc/device-tree/i2c@3180000/tca9548@77/i2c@*

- Xavier NX and TX2 NX(p3509-0000 carrier board)

ls /proc/device-tree/cam_i2cmux/i2c@*

You should be able to find the camera model you used.

3.7.2 For Image

ls /sys/bus/i2c/drivers/

When installing the camera correctly, the relevant directory for the camera should exist, such as veyecam csx307 cssc132 mvcam, etc.

3.8 Protection against being overwritten by upgrades

After making sure Image and dtb are successfully updated, please execute the following command to prevent kernel and dtb from being overwritten by update.

sudo apt-mark hold nvidia-l4t-kernel nvidia-l4t-kernel-dtbs

3.9 Build the drivers from source

Please refer to: Nvidia Jetson platform VEYE camera driver source code compilation guide.

Could be used for Flashing or Upgrading.

4 Applications and Test

4.1 Check system status

Run the following command to confirm whether the camera is probed.

  • VEYE-MIPI-IMX327S/VEYE-MIPI-IMX462/VEYE-MIPI-IMX385(using VEYE-MIPI-CAM2M dtb)

dmesg | grep veye  

The output message appears as shown below:

camera id is veyecam

sensor is IMX327/IMX462/IMX385

subdev veyecam [i2c_bus]-003b bound

  • For CS-MIPI-IMX307

dmesg | grep csx307  

The output message appears as shown below.:

Detected CS307 sensor

subdev csx307 [i2c_bus]-003b bound

  • For CS-MIPI-SC132

dmesg | grep cssc132  

The output message appears as shown below.:

subdev cssc132 [i2c_bus]-003b bound

  • For VEYE-MIPI-IMX335

dmesg | grep imx335

The output message appears as shown below.:

camera id is VEYE-MIPI-IMX335

subdev veye_imx335 [i2c_bus]-003b bound

  • Run the following command to check the presence of video node.

ls /dev/video*

The output message appears as shown below.

videoX  

  • For VEYE-MIPI-327(using VEYE-MIPI-327 dtb)

dmesg | grep veye327  

The output message appears as shown below:

Detected VEYE327 sensor

subdev veye327 [i2c_bus]-003b bound

The [i2c_bus] in the driver prompt message indicates the i2c bus corresponding to this camera.

4.2 Video Stream Toolkits Manual

The camera appears as /dev/videoX device node,where X is between [0-5].

During the Linux boot process, the cameras are detected in the order of i2c bus from smallest to largest. For example, if only one camera is connected, X is 0 regardless of the hardware connection to the location. If 5 cameras are connected, X is reflected as [0-4] according to i2c bus from smallest to largest.

In gstreamer command ,v4l2src and nvv4l2camerasrc has a param device=/dev/videoX to identify which camera to use.

4.2.1 Gstreamer Usage

export DISPLAY=:0

  • Preview FHD

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nv3dsink sync=false

  • Preview FHD(using xvimagesink sink if supported)

export DISPLAY=:0

gst-launch-1.0 -e v4l2src io-mode=4 device=/dev/video0 do-timestamp=true ! 'video/x-raw, width=1920, height=1080, framerate=30/1, format=UYVY' ! xvimagesink sync=false

  • Preview 720p@60 (CS-MIPI-IMX307)

gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)60/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false

  • Preview 1280*1080@45 (CS-MIPI-SC132)

gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1280, height=(int)1080, framerate=(fraction)45/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false

  • Preview 640*480p@130 (CS-MIPI-IMX307)

gst-launch-1.0 nvv4l2camerasrc ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)640, height=(int)480, framerate=(fraction)130/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false

  • Preview 2 cameras 1080p HD

WIDTH=960

HEIGHT=540

CAPS="video/x-raw(memory:NVMM),format=(string)UYVY, width=1920, height=1080"

gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=$WIDTH sink_0::height=$HEIGHT sink_1::xpos=$WIDTH sink_1::ypos=0 sink_1::width=$WIDTH sink_1::height=$HEIGHT ! nv3dsink nvv4l2camerasrc device=/dev/video0 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp. nvv4l2camerasrc device=/dev/video1 ! $CAPS ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420"! comp.

  • Record FHD in H.264 format to a video file

gst-launch-1.0 nvv4l2camerasrc num-buffers=300 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nvv4l2h264enc control-rate=1 bitrate=10000000 ! h264parse ! qtmux ! filesink location=filename.mp4 -e

  • Playback of saved video file

gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvoverlaysink -e

  • Capturing FHD still image  

gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jp

4.2.2 VEYE-MIPI-IMX335 gstreamer example

Since VEYE-MIPI-IMX335 supports only a few specific resolution modes, its driver we use use_sensor_mode_id mode.

VEYE-MIPI-IMX335 mode
./veye5_mipi_i2c.sh video mode v4l2-ctl sensor_mode video format
1 0 2592x1944@20fps
2 1 2592x1944@12.5fps
3 2 2560x1440@25fps
4 3 2560x1440@30fps
  • prepare

sudo apt-get install v4l-utils

Refer to the following section and download the veye5_mipi_i2c.sh tool.

  • 2592x1944@20fps mode preview, framerate statistics

v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=0

./veye5_mipi_i2c.sh -w -f videomode -p1 1 -b [busnum]

v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5376

Preview

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM), width=(int)2592, height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false

Framerate statistics

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY,width=(int)2592,height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! fpsdisplaysink video-sink=fakesink -v

  • 2560x1440@30fps mode video encode and capture

v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=3

./veye5_mipi_i2c.sh -w -f videomode -p1 4 -b [busnum]

v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5120

Video encode

gst-launch-1.0 nvv4l2camerasrc num-buffers=300 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nvv4l2h264enc control-rate=0 bitrate=10000000 ! h264parse ! qtmux ! filesink location=filename.mp4 -e

Video Replay

gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nv3dsink -e

Capture

gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jpg

4.2.3 Jetson multimedia-api samples

The Jetson Linux API is available on the Jetson platform for developers to use. Please refer to the official nVidia documentation for the installation of the jetson_multimedia_api package.

For VEYE and CS series cameras, the ISP function is already integrated in the camera, so you cannot use libargus to get data, but can directly use the standard V4L2 interface to get data from the /dev/videoX device file.

The following two samples can be run directly.

4.2.3.1 12_camera_v4l2_cuda

./camera_v4l2_cuda -d /dev/video0 -s 1920x1080 -f UYVY

4.2.3.2 v4l2cuda

./capture-cuda -d /dev/video0 -f UYVY -m -o out.ppm -s 1920x1080 -c 1

4.2.4 v4l2-ctl Application Examples
4.2.4.1 install v4l2-utils

sudo apt-get install v4l-utils

4.2.4.2 Configure parameters using v4l2-ctl
  • List the data formats supported by the camera

v4l2-ctl -d /dev/video0 --list-formats-ext

  • Frame rate statistics

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY--stream-mmap --stream-count=-1 --stream-to=/dev/null

  • Save image to file

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --stream-to=uyvy-1920x1080.yuv

4.2.5 yavta
4.2.5.1 install yavta

git clone https://github.com/veyeimaging/yavta.git

cd yavta;make

4.2.5.2 Save image to file

./yavta -c1 -FUYVY-1920x1080.yuv --skip 0 -f UYVY -s 1920x1080 /dev/video0

4.2.6 Opencv

To import camera data from v4l2 devices to opencv, we provide several samples.

We provide 2 samples here.

4.3 Using i2c script to modify camera parameters

  • VEYE-MIPI-CAM2M Series(VEYE-MIPI-327、VEYE-MIPI-IMX327S、VEYE-MIPI-IMX462、VEYE-MIPI-IMX385)

Video Control Toolkits Manual :VEYE-MIPI-327 I2C

  • CS-MIPI-IMX307和CS-MIPI-SC132

Video Control Toolkits Manual :CS-MIPI-X I2C

  • VEYE-MIPI-IMX335

Video Control Toolkits Manual :VEYE-MIPI-IMX335 I2C

5 How to port the driver to a third party board

5.1 driver porting

For Image, we have added functionality to the official standard Image and have not made any deletions. In general, you can use our compiled Image directly. for special cases, please refer to the source code for integration.

For modules it is even easier to just use them. Compiling from source code and is very simple, so I won't go into details here.

5.2 dts porting

We only provide dtb for some boards of Nano, TX2, Xavier, Orin. For the types not provided, it is necessary to:

1. get the dts source code of that board.

2. put our camera related dts to the whole.

3. recompile to get the dtb of the corresponding board.

The operation steps are not complicated, but there are some third-party base board manufacturers do not open dts source code. This will require the cooperation of all parties to do so.

6 FAQ and bug list

6.1 Problem of system update not taking effect on a system with an SSD hard drive

If an SSD hard drive is installed in a system and mounted on the / directory, it may cause regular system update operations (Image, ko, dtb) to be completely ineffective.

The reason for this is that the board comes with an eMMC storage device, and the Image, ko, and dtb that take effect during the boot stage are stored in the eMMC.

After the boot is completed, if the SSD hard drive is mounted on the / directory, it may cause the files stored on the eMMC to be inaccessible.

The solution in this case is to manually mount the mmcblk0p1 partition of the eMMC to a specific directory, and perform all system update operations based on this directory.

6.2 VEYE cameras on Jetpack5.x

Jetpack5.x has more stringent requirements for mipi signals in xavier and orin platforms. VEYE-MIPI-xxx series cameras need firmware hdver>=7 to be perfectly supported.

6.3 CS-MIPI-IMX307 combined with Orin nano and Orin NX Green Screen

When CS-MIPI-IMX307 is powered by the 3.3V mode of the FFC cable, the MIPI receiver state machine of Orin nano and Orin NX (Jetpack5.1.1) will enter an incorrect state.

It is recommended to refer to this article and modify the power supply mode of CS-MIPI-IMX307 to use the 5V power supply mode.

6.4 Jetpack5.0.1 DP

This version has many bugs, such as not supporting nvv4l2camerasrc, not recommended to use.

6.5 nv3dsink

Jetpack 5.x no longer supports nvoverlaysink, use nv3dsink instead.

6.6 cboot of L4T32.7.2 on Xavier

For the Xavier series, there is a bug in the cboot of L4T32.7.2 that must be fixed before the upgrade can be done.

[Cboot] Cboot in 32.7.2 fails to read extlinux.conf

We compiled the correct version of cboot and put it here.

After downloading, put it in Linux_for_Tegra/bootloader directory and execute the following command on PC to burn cboot.

  • AGX Xavier

sudo ./flash.sh -r -k cpu-bootloader jetson-xavier mmcblk0p1

  • Xavier NX

sudo ./flash.sh -r -k cpu-bootloader jetson-xavier-nx-devkit mmcblk0p1

7 Document History

  • 20230427

Add support for Jetpack5.1.1.

  • 20230222

Add support for Jetpack5.1.

  • 20220831

Improve the description of VEYE series and MV series under Jetpack 5.0.2.

  • 20220824

Add support for Jetpack5.0.2.

  • 20220720

Add multimedia-api samples and v4l2 samples.

  • 20220714

Add L4T32.7.2 Note。

  • 20220629

Add support for Jetpack 5.0.1DP and tune through AGX-Orin.

  • 20220110

Add VEYE-MIPI-IMX385 support.

  • 20220105

Use nvv4l2h264enc instead of omxh264enc in gstreamer command,because omxh264enc has been deprecated.

  • 20211025

Use nvcamerasrc instead of v4l2src in gstreamer command , and the data goes directly into DMA memory.

8 References

Jetson start up: https://developer.nvidia.com/embedded/learn/getting-started-jetson

Jetson Download Center: https://developer.nvidia.com/embedded/downloads

Xavier NX: https://developer.nvidia.com/embedded/learn/get-started-jetson-xavier-nx-devkit

TX2 development kit: https://developer.nvidia.com/embedded/jetson-tx2-developer-kit

SDK Manager: https://docs.nvidia.com/sdk-manager/index.html

L4T Doc: https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.htm

TX2 user guide: link