Difference between revisions of "Jetson/FAQ/BSP"

From eLinux.org
Jump to: navigation, search
(Ethernet issue on Jetson TX2)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
* [[Jetson/FAQ/BSP/PTP_Synchronization | How to do time synchronization between two Xaviers by PTP (Precision Time Protocol)?]]
+
=== [[Jetson/FAQ/BSP/PTP_Synchronization | How to do time synchronization between two Xaviers by PTP (Precision Time Protocol)?]] ===
* [[Jetson/FAQ/BSP/Remove_TypeC | Software Changes to Remove TypeC USB port on Jetson AGX Xavier]]
+
=== [[Jetson/FAQ/BSP/Remove_TypeC | Software Changes to Remove TypeC USB port on Jetson AGX Xavier]] ===
* [[Jetson/FAQ/BSP/RootFS_Reduction | How to reduce RootFS disk usage on Jetson platform]]
+
=== [[Jetson/FAQ/BSP/RootFS_Reduction | How to reduce RootFS disk usage on Jetson platform]] ===
* How to get fan speed from FAN_TACH?
+
=== How to get fan speed from FAN_TACH? ===
 
   cat /sys/devices/generic_pwm_tachometer/hwmon/hwmon1/rpm
 
   cat /sys/devices/generic_pwm_tachometer/hwmon/hwmon1/rpm
* How to know boot reason when watchdog reset?
+
=== How to know boot reason when watchdog reset? ===
 
Device reset reason can be found in 'dmesg' output like below:
 
Device reset reason can be found in 'dmesg' output like below:
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
Line 14: Line 14:
 
</pre>
 
</pre>
  
* How to get kernel source code by source_sync.sh in L4T driver package?
+
=== How to get kernel source code by source_sync.sh in L4T driver package? ===
 
Run below command to get certain release source code:
 
Run below command to get certain release source code:
 
   ./source_sync.sh -t <release_tag>
 
   ./source_sync.sh -t <release_tag>
Line 21: Line 21:
 
   ./source_sync.sh -t tegra-l4t-r32.2.1
 
   ./source_sync.sh -t tegra-l4t-r32.2.1
  
* How to make text '''Bold''' or ''Italic'' by NvOSD in Tegra MultiMedia API?
+
=== How to make text '''Bold''' or ''Italic'' by NvOSD in Tegra MultiMedia API? ===
 
User can refer to sample [https://docs.nvidia.com/jetson/l4t-multimedia/l4t_mm_video_decode_cuda.html 02_video_dec_cuda] on how to use NvOSD in Tegra MultiMedia API and do below change can make text ''Italic'',  '''Bold''' is similar.
 
User can refer to sample [https://docs.nvidia.com/jetson/l4t-multimedia/l4t_mm_video_decode_cuda.html 02_video_dec_cuda] on how to use NvOSD in Tegra MultiMedia API and do below change can make text ''Italic'',  '''Bold''' is similar.
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
Line 39: Line 39:
 
</pre>
 
</pre>
  
* How to get a unique ID for Jetson module?
+
=== How to get a unique ID for Jetson module? ===
 
   sudo cat /sys/firmware/devicetree/base/serial-number
 
   sudo cat /sys/firmware/devicetree/base/serial-number
  
* EEPROMs on Jetson platforms.
+
=== EEPROMs on Jetson platforms. ===
 
Jetson platform usually has two EEPROMs, one on module and one on carrier board. The EEPROM on carrier is for some Nvidia internal board id storage, not mandatory on customer design. EEPROM on module stores module version, MAC address, etc. Layout of EEPROM on module can be found  [https://developer.nvidia.com/embedded/dlc/tx1-tx2-module-eeprom-layout here].
 
Jetson platform usually has two EEPROMs, one on module and one on carrier board. The EEPROM on carrier is for some Nvidia internal board id storage, not mandatory on customer design. EEPROM on module stores module version, MAC address, etc. Layout of EEPROM on module can be found  [https://developer.nvidia.com/embedded/dlc/tx1-tx2-module-eeprom-layout here].
  
* How to use UART7 on TX2 (UART7 cannot receive data)?
+
=== How to use UART7 on TX2 (UART7 cannot receive data)? ===
 
On TX2, UART7 is used for BPMP debug console. User needs to disable BPMP debug console before using UART7 by [https://devtalk.nvidia.com/default/topic/1025679/jetson-tx2/how-to-enable-uart7-d8-d5-as-normal-uart-like-other-uart-uartc-c280000-/post/5225257/#5225257 change].
 
On TX2, UART7 is used for BPMP debug console. User needs to disable BPMP debug console before using UART7 by [https://devtalk.nvidia.com/default/topic/1025679/jetson-tx2/how-to-enable-uart7-d8-d5-as-normal-uart-like-other-uart-uartc-c280000-/post/5225257/#5225257 change].
  
* How to use ttyTHS0 on Xavier?
+
=== How to use ttyTHS0 on Xavier? ===
 
ttyTHS0 is used for console on Xavier by default by /etc/systemd/system/nvgetty.service. User needs to disable nvgetty service before using ttyTHS0.
 
ttyTHS0 is used for console on Xavier by default by /etc/systemd/system/nvgetty.service. User needs to disable nvgetty service before using ttyTHS0.
  
* Error when processing multi-channel high-resolution video data on Jetson platform
+
=== Error when processing multi-channel high-resolution video data on Jetson platform ===
 
In R32.2.1 and earlier L4T release, when processing multi-channel high-resolution video data, the system may report error like below:
 
In R32.2.1 and earlier L4T release, when processing multi-channel high-resolution video data, the system may report error like below:
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
 
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
Line 61: Line 61:
 
The reason is in R32.2.1 and earlier L4T release, dma mask is 32 bit for host1x context device. This causes NVDEC, NVENC, VIC, DLA... can only allocate 4GB dma buffer in total. Apply [[Media:Set_DMA_mask_to_host1x_device.patch|patch]] can fix this issue. The patch is merged in L4T R32.2.2.
 
The reason is in R32.2.1 and earlier L4T release, dma mask is 32 bit for host1x context device. This causes NVDEC, NVENC, VIC, DLA... can only allocate 4GB dma buffer in total. Apply [[Media:Set_DMA_mask_to_host1x_device.patch|patch]] can fix this issue. The patch is merged in L4T R32.2.2.
  
* Failed to use headless mode oem-config feature on Jetson platform
+
=== Failed to use headless mode oem-config feature on Jetson platform ===
 
When using headless mode oem-config, suggest to use putty on host to open tty device to config device. By default, headless mode uses tty device enumerated by USB port which is used to flash device. In this case, the tty device node should be /dev/ttyACMx on host.
 
When using headless mode oem-config, suggest to use putty on host to open tty device to config device. By default, headless mode uses tty device enumerated by USB port which is used to flash device. In this case, the tty device node should be /dev/ttyACMx on host.
  
 
Please '''keep USB cable connected during the whole headless mode oem-config phase''', or config will fail and system may ask you to login directly but no valid account is created.
 
Please '''keep USB cable connected during the whole headless mode oem-config phase''', or config will fail and system may ask you to login directly but no valid account is created.
  
* How to create user account on Jetson platform.
+
=== How to create user account on Jetson platform. ===
  
 
Prefer to use the below commands to create new user account on Jetson platform.
 
Prefer to use the below commands to create new user account on Jetson platform.
Line 75: Line 75:
 
   sudo usermod -a -G video <user_name>
 
   sudo usermod -a -G video <user_name>
 
The new user account need to be added to video group(adduser does it automatically), or the account may have issue when using CUDA related SDK like TensorRT.
 
The new user account need to be added to video group(adduser does it automatically), or the account may have issue when using CUDA related SDK like TensorRT.
 +
 +
=== How to flash specific partition on Jetson platform ===
 +
Jetson platform's partition information stores at Linux_for_Tegra/bootloader/flash.xml in Jetson BSP package. The flash.xml is automatically generated when running flash.sh.
 +
The template to generate flash.xml defines in xxxx.conf (jeton-tx2.conf for example) by item EMMC_CFG=xxxxxx.xml.
 +
 +
Check Linux_for_Tegra/bootloader/flash.xml can get the partition name of each binary file. For example, search "cboot.bin" in Jetson TX2's flash.xml, we can get both partitions "cpu-bootloader" and "cpu-bootloader_b" contain it. So we should run below commands to update cboot.bin.
 +
sudo ./flash.sh -k cpu-bootloader jetson-tx2 mmcblk0p1
 +
sudo ./flash.sh -k cpu-bootloader_b jetson-tx2 mmcblk0p1
 +
Official document describes "Flashing a Specific Partition" locates [https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fflashing.html%23wwpID0E0HD0HA here]
 +
 +
=== Ethernet issue on Jetson TX2 ===
 +
The Broadcom Ethernet PHY used on Jetson TX2 has issue when Energy-Efficient Ethernet(EEE) enabled. Apply [[Media:Add_option_to_disable_eee.patch|patch]] and enable CONFIG_EQOS_DISABLE_EEE kernel config, or user may meet some kinds of Ethernet issue (long delay, link down, transfer stuck or something else). The patch is merged in L4T R32.3.

Latest revision as of 22:32, 10 December 2019

How to do time synchronization between two Xaviers by PTP (Precision Time Protocol)?

Software Changes to Remove TypeC USB port on Jetson AGX Xavier

How to reduce RootFS disk usage on Jetson platform

How to get fan speed from FAN_TACH?

 cat /sys/devices/generic_pwm_tachometer/hwmon/hwmon1/rpm

How to know boot reason when watchdog reset?

Device reset reason can be found in 'dmesg' output like below:

[    0.996297] tegra-pmc: get_secure_pmc_setting: done secure_pmc=0
[    0.996407] tegra-pmc: ### PMC reset source: TEGRA_BCCPLEX_WATCHDOG
[    0.996466] tegra-pmc: ### PMC reset level: TEGRA_RESET_LEVEL_L1
[    0.996519] tegra-pmc: ### PMC reset status reg: 0x9
[    0.996627] tegra-pmc: PMC Prod config success

How to get kernel source code by source_sync.sh in L4T driver package?

Run below command to get certain release source code:

 ./source_sync.sh -t <release_tag>

Where <release_tag> can be found in Nvidia Jetson Linux Driver Package Release Notes, section 1.0 "About this Release". For example, for L4T 32.2.1, release notes says the release tag name is tegra-l4t-r32.2.1, so below command can get the kernel code:

 ./source_sync.sh -t tegra-l4t-r32.2.1

How to make text Bold or Italic by NvOSD in Tegra MultiMedia API?

User can refer to sample 02_video_dec_cuda on how to use NvOSD in Tegra MultiMedia API and do below change can make text Italic, Bold is similar.

diff --git a/samples/02_video_dec_cuda/videodec_main.cpp b/samples/02_video_dec_cuda/videodec_main.cpp
index 0d63328..45bebff 100644
--- a/samples/02_video_dec_cuda/videodec_main.cpp
+++ b/samples/02_video_dec_cuda/videodec_main.cpp
@@ -189,7 +189,7 @@ set_text(context_t* ctx)
    ctx->textParams.display_text = ctx->osd_text ? : strdup("nvosd overlay text");
    ctx->textParams.x_offset = 30;
    ctx->textParams.y_offset = 30;
-    ctx->textParams.font_params.font_name = strdup("Arial");
+    ctx->textParams.font_params.font_name = strdup("Italic");
    ctx->textParams.font_params.font_size = 18;
    ctx->textParams.font_params.font_color.red = 1.0;
    ctx->textParams.font_params.font_color.green = 0.0;

How to get a unique ID for Jetson module?

 sudo cat /sys/firmware/devicetree/base/serial-number

EEPROMs on Jetson platforms.

Jetson platform usually has two EEPROMs, one on module and one on carrier board. The EEPROM on carrier is for some Nvidia internal board id storage, not mandatory on customer design. EEPROM on module stores module version, MAC address, etc. Layout of EEPROM on module can be found here.

How to use UART7 on TX2 (UART7 cannot receive data)?

On TX2, UART7 is used for BPMP debug console. User needs to disable BPMP debug console before using UART7 by change.

How to use ttyTHS0 on Xavier?

ttyTHS0 is used for console on Xavier by default by /etc/systemd/system/nvgetty.service. User needs to disable nvgetty service before using ttyTHS0.

Error when processing multi-channel high-resolution video data on Jetson platform

In R32.2.1 and earlier L4T release, when processing multi-channel high-resolution video data, the system may report error like below:

NvRmChannelSubmit: NvError_IoctlFailed with error code 22 
NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 29, SyncPointValue = 0)  
NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 29, SyncPointValue = 0)  
NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 29, SyncPointValue = 0)  

The reason is in R32.2.1 and earlier L4T release, dma mask is 32 bit for host1x context device. This causes NVDEC, NVENC, VIC, DLA... can only allocate 4GB dma buffer in total. Apply patch can fix this issue. The patch is merged in L4T R32.2.2.

Failed to use headless mode oem-config feature on Jetson platform

When using headless mode oem-config, suggest to use putty on host to open tty device to config device. By default, headless mode uses tty device enumerated by USB port which is used to flash device. In this case, the tty device node should be /dev/ttyACMx on host.

Please keep USB cable connected during the whole headless mode oem-config phase, or config will fail and system may ask you to login directly but no valid account is created.

How to create user account on Jetson platform.

Prefer to use the below commands to create new user account on Jetson platform.

 sudo adduser <user_name>

Or

 sudo useradd <user_name> -m -s /bin/bash
 sudo passwd <user_name>
 sudo usermod -a -G video <user_name>

The new user account need to be added to video group(adduser does it automatically), or the account may have issue when using CUDA related SDK like TensorRT.

How to flash specific partition on Jetson platform

Jetson platform's partition information stores at Linux_for_Tegra/bootloader/flash.xml in Jetson BSP package. The flash.xml is automatically generated when running flash.sh. The template to generate flash.xml defines in xxxx.conf (jeton-tx2.conf for example) by item EMMC_CFG=xxxxxx.xml.

Check Linux_for_Tegra/bootloader/flash.xml can get the partition name of each binary file. For example, search "cboot.bin" in Jetson TX2's flash.xml, we can get both partitions "cpu-bootloader" and "cpu-bootloader_b" contain it. So we should run below commands to update cboot.bin.

sudo ./flash.sh -k cpu-bootloader jetson-tx2 mmcblk0p1
sudo ./flash.sh -k cpu-bootloader_b jetson-tx2 mmcblk0p1

Official document describes "Flashing a Specific Partition" locates here

Ethernet issue on Jetson TX2

The Broadcom Ethernet PHY used on Jetson TX2 has issue when Energy-Efficient Ethernet(EEE) enabled. Apply patch and enable CONFIG_EQOS_DISABLE_EEE kernel config, or user may meet some kinds of Ethernet issue (long delay, link down, transfer stuck or something else). The patch is merged in L4T R32.3.