使用者工具

網站工具


jetson_agx_orin_development

Jetson AGX Orin Development

Download SDKmanager in Host(X86 PC)

Orin AGX Platform Adaptation and Bring-Up Guide

Console mode flash command

Before JetPack 5.1.1
Jetson Orin module to be emulated Flashing command
Jetson AGX Orin 64GB
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
Jetson AGX Orin 32GB
sudo ./flash.sh jetson-agx-orin-devkit-as-jao-32gb mmcblk0p
Jetson Orin NX 16GB
sudo ./flash.sh jetson-agx-orin-devkit-as-nx16gb mmcblk0p1
Jetson Orin NX 8GB
sudo ./flash.sh jetson-agx-orin-devkit-as-nx8gb mmcblk0p1
Jetson Orin Nano 8GB*
sudo ./flash.sh jetson-agx-orin-devkit-as-nano8gb mmcblk0p1
Jetson Orin Nano 4GB
sudo ./flash.sh jetson-agx-orin-devkit-as-nano4gb mmcblk0p1

After JetPack 5.1.2

Flash AGX ORIN Development Kit

sudo ./flash.sh jetson-agx-orin-devkit internal

Build Kernel

export CROSS_COMPILE_AARCH64_PATH=$HOME/l4t-gcc/
export CROSS_COMPILE_AARCH64=$HOME/l4t-gcc/bin/aarch64-buildroot-linux-gnu-
cd ~/workspace/NX/Linux_for_Tegra/source/public
mkdir kernel_out
./nvbuild.sh -o $PWD/kernel_out
cd ../../
./fl.sh

Install Vscode on Target Device

git clone https://github.com/JetsonHacksNano/installVSCode.git
cd installVSCode
./installVSCode.sh
./installVSCodeWithPython.sh
code     --> run vscode from console mode

Jetpack 5.x會有無法啟動的問題 安裝後執行以下程式碼即可啟用(參考來源)

code --no-sandbox

Install Chromium

search ubuntu SW “chromium”

Install JetPACK

cat /etc/nv_tegra_release
sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo apt install nvidia-jetpack

Install JTOP

sudo apt install python3-pip
sudo pip3 install jetson-stats
sudo systemctl restart jtop.service

sudo jtop
jetson_release     -->命令显示NVIDIA Jetson的状态和所有信息

minicom -D /dev/ttyACM0

Setting CPU clock to maximum

Setting AGX ORIN development kit Power mode at the upper right corner MAXN 50W 30W 15W

If you want to run CPU maximum frequency
$sudo jetson_clocks

Using Jetson Power GUI

https://developer.nvidia.com/deepstream-getting-started
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#jetson-setup

Deepstream

/opt/nvidia/deepstream/deepstream-6.3/samples

$ sudo apt install \
libssl1.1 \
libgstreamer1.0-0 \
gstreamer1.0-tools \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
libgstreamer-plugins-base1.0-dev \
libgstrtspserver-1.0-0 \
libjansson4 \
libyaml-cpp-dev

1. Clone the librdkafka repository from GitHub:

git clone https://github.com/edenhill/librdkafka.git

2. Configure and build the library:

cd librdkafka
git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
./configure
make
sudo make install

3. Get deepstream-6.3_6.3.0-1_arm64.deb

Download deepstream-6.3_6.3.0-1_arm64.deb

Get deepstream-6.3_6.3.0-1_arm64.deb for Jetson not to download for x86

sudo apt install ./deepstream-6.3_6.3.0-1_arm64.deb

4. Copy the generated libraries to the deepstream directory:

sudo mkdir -p /opt/nvidia/deepstream/deepstream-6.3/lib
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-6.3/lib

Running deepstreaming demo

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source30_1080p_dec_preprocess_infer-resnet_tiled_display_int8.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt

XXXX sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source1_usb_dec_infer_resnet_int8.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source2_1080p_dec_infer-resnet_demux_int8.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.yml

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.yml

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source4_1080p_dec_preprocess_infer-resnet_preprocess_sgie_tiled_display_int8.txt

sudo deepstream-app -c /opt/nvidia/deepstream/deepstream-6.3/samples/configs/deepstream-app/source2_dewarper_test.txt

CPU Stress Test

sudo apt update
sudo apt install cuda-toolkit-11-4
sudo apt install stress
sudo apt -y install pip
sudo apt -y install python3-pip
sudo -H pip install -U jetson-stats

compiled jetson-gpu-burn source code

git clone https://github.com/anseeto/jetson-gpu-burn.git
cd jetson-gpu-burn
make

Using stress to run CPU loading
Using gpu_burn to run GPU loading

running CPU:8 cores

 stress -c 8 &

running CPU:12 cores

 stress -c 12 &

running GPU maximum loading:

./gpu_burn 1000

Fan Control

/etc/nvfancontrol.conf 

FAN_DEFAULT_PROFILE cool
Restart the service

sudo systemctl restart nvfancontrol


Power Mode Setting

Nvidia Power Model Tool to config ID=0 “MAXN”

sudo nvpmodel -m 0(MAXN)/1(15W)/2(30W)/3(50W)

Set static max frequency to CPU, GPU and EMC clocks

sudo jetson_clocks


AGX Stable Diffusion

Download sd-v1-4.ckpt

git clone https://github.com/chitoku/stable-diffusion
cd stable-diffusion
git checkout jetson
cp ~/Downloads/sd-v1-4.ckpt /home/aopen/stable-diffusion/models/ldm/stable-diffusion-v1/
./docker/run.sh
python3 scripts/txt2img.py --prompt "Robots marching down a street in Japanese city" --plms

JETSON AGX Orin performance test

https://github.com/NVIDIA-AI-IOT/jetson_benchmarks

git clone https://github.com/NVIDIA-AI-IOT/jetson_benchmarks.git\\

cd jetson_benchmarks\\

mkdir models\\

sudo sh install_requirements.sh\\

python3 utils/download_models.py --all --csv_file_path ./benchmark_csv/orin-benchmarks.csv --save_dir /home/aopen/jetson_benchmarks/models\\

sudo python3 benchmark.py --all --csv_file_path benchmark_csv/orin-benchmarks.csv --model_dir /home/aopen/jetson_benchmarks/models\\

Where is DTSI file

/home/ubuntu/workspace/dev2725/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x

AGX ORIN Development Kit Flash flow

sudo ./flash.sh jetson-agx-orin-devkit internal

flash.sh    # Num 1688 code start & entry
jetson-agx-orin-devkit.conf     --> Define the DTB & SOM 
p3701.conf.common               --> SOM Define

Disable Board ID EEPROM

File Location :
Linux_for_Tegra/bootloader/tegra234-mb2-bct-common.dtsi (the MB2 BCT file)
Modification:
 - cvb_eeprom_read_size = <0x100> 
 + cvb_eeprom_read_size = <0x0>

Modified

/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/t186ref/BCT/tegra234-mb2-bct-scr-p3701-0000.dts
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/tegra234-mb2-bct-common.dtsi
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/common/kernel-dts/t234-common-cvm/tegra234-cvm-p3701.dtsi    --> Serial port
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dts   --> hdmi / hpd pin
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/tegra234-mb2-bct-common.dtsi --> eeprom size 0

/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi   --> GPIO setting
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi    --> pinmux
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/bootloader/t186ref/BCT/tegra234-mb1-bct-padvoltage-p3701-0000-a04.dtsi    --> padvoltage

/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/p3701.conf.common  --> process_chip_sku_version() / ODMDATA



LAN 
/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/p3701.conf.common
ODMDATA="gbe-uphy-config-22,hsstp-lane-map-3,nvhs-uphy-config-0,hsio-uphy-config-16,gbe0-enable-10g";

/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/concord/kernel-dts/cvb/tegra234-p3737-pcie.dtsi
/DonRtest
	pcie@14180000 {
	    status = "okay";
    	phys = <&p2u_hsio_0>;
    	phy-names = "p2u-0";
    };


/home/ubuntu/workspace/dev2725o/Linux_for_Tegra/source/public/kernel/kernel-5.10/arch/arm64/configs/defconfig
# TPM
CONFIG_HW_RANDOM_TPM=y
CONFIG_ARCH_BCM2835=y
CONFIG_HW_RANDOM_BCM2835=m
CONFIG_SPI_BCM2835=y
CONFIG_SECURITYFS=y
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS_SPI=y
CONFIG_DEVPORT=y
CONFIG_HW_RANDOM=m


Check HDMI Status

xrandr --output HDMI-0 --mode <res> --rate <refresh_rate>

ex: 
xrandr --output HDMI-0 --mode 1280x720 --rate 60

Pinmux Changes

If your carrier board schematic differs from that of the reference carrier board in Jetson Xavier NX Developer Kit, you must change the pinmux configuration applied by the software.

To define your board’s pinmux configuration, download the Jetson Xavier NX pinmux table from the Jetson Download Center. Be sure to get the right version of the table for your SOM.

The pinmux table is a spreadsheet that:

  • Shows the locations and default pinmux settings
  • Acts as a data source for software that defines the pinmux settings in the source code or device tree

You must customize the spreadsheet for the configuration of your board, then convert the .dtsi file generated by Excel to a .cfg file. For instructions, see the README file at:

Linux_for_Tegra/kernel/pinmux/t19x/ You must perform the same conversion for gpio.dtsi and padvoltage.dtsi.

pinmux table

GPIO Changes

If you designed your own carrier board, to translate from SOM connector pins to actual GPIO numbers you must understand the GPIO mapping formula below. The translated GPIO numbers can be controlled by the driver.

To check a GPIO number This example procedure checks the GPIO number of signal name SPI0_CS1.

  1. Open the Jetson AGX Orin pinmux table. (See Pinmux Changes, above.)
  2. Search the table for SPI0_CS1.
  3. Confirm that the Customer Usage field contains the GPIO name GPIO3_PZ.07.
  4. Search PZ.07 using the following command:

cat /sys/kernel/debug/gpio | grep PZ.07

jetson_agx_orin_development.txt · 上一次變更: 2024/04/16 15:34 由 don