Nvidia Jetson NX flashing, configure Ubuntu20

Reference 1

Flash the Nvidia Jetson NX kit and configure Ubuntu20. _nvidia nx brush machine_I want to learn to play chords blog-CSDN blog

NVIDIA Jetson NX, AI configuration. Install SDK Components

Reference 2

Jetson Xavier NX flashing process- Zhihu (zhihu.com)

1. Preparation before flashing

Hardware and software: virtual machine VMware Workstation. A Dupont cable, original Android data cable, keyboard, mouse, monitor, etc.

2. Install the Ubuntu virtual machine

1.2 Install a virtual machine_Alchemy Lu's Blog-CSDN Blog https://blog.csdn.net/qq_64079631/article/details/127935249

1.3 Install Ubuntu20.4 system_ubuntu20.04 depends: libuv1(=1.18.0-3) but 1.34.2-_Alchemy Lu's Blog-CSDN Blog https://blog.csdn.net/qq_64079631/article/details/ 127935127

Install ubuntu20.04 in the virtual machine, minimal installation. , The virtual machine disk must be at least 60G , otherwise it may fail.

You may be prompted later that the disk space of the virtual machine is not enough. There are two methods at this time, 1. Expand the disk of the virtual machine, 2. Do not expand, download the system first, and do not download the components first. After burning the system, download it again Component burning

3. Install SDK Manager

Open Ubuntu and download it from NVIDIA SDK Manager | NVIDIA Developer.deb . There is a U disk, no need to download it

After the download is complete  Ctrl+T , open Terminal and execute the command  sudo apt install ./sdkmanager.....amd64.debto install SDK Manager.

4. Burning system

Start the SDK Manager

Execute in Terminal  sdkmanager, log in with the account you want to use NVIDIA for the first time

  After successful login, enter the download and burn interface. At this point, we don't need to connect to the development board for the time being , we will download and compile the system and components first.

STEP01:

Select the hardware platform Xavier NX, choose 5.0.2【rev.2】for Linux;

click continue

STEP02:

Select the download item, as indicated by 1 and 2 in the figure, which are system and component respectively;

Check 3, which means download first, and then burn later;  

Check 4 agree, click continue;

Copy the Downloads folder of the U disk to the main directory, without downloading, go directly to start burning

 It prompts that the download path does not exist, click Create;

STEP03:

        Start downloading and compiling. If the network is good, it will take about 1 hour; (if interrupted in the middle, you need to return to the previous step and continue again)

 STEP04:

When the download is complete, click finish.

 Next, prepare to connect the development board for programming.

burning

Development board preparation:

 Short connect GND and FC REC (the second from the right and the third from the right) with a Dupont cable to make NX enter recovery mode, then use the built-in Android data cable to connect NX to the computer, then connect the mouse, keyboard, and monitor to NX, and finally plug in the power .

system programming

Short circuit the NX development board Connect the MicroUSB to the computer Power on

Choose to connect the development board to the virtual machine

Open the terminal and enter lsusb and the connection is successful if it appears as shown in the figure. If you can’t connect, check whether your cable is a data cable instead of a charging cable, or check your virtual machine settings

open sdkmanger

Log in

choose the first 

 It will automatically recognize that NX stands for OK

Next step

  Enter the password for this virtual machine at this time, and you're ready to go.

 A popup appears.

 Select as above:

Click Finish and wait for the burning to complete.

probably can brush

 Disconnect the shorted Dupont wire 

Start NX

NX connects HDMI to the display and connects to the Internet (wifi or network cable). Mouse and keyboard, power on  

Ubuntu20.04 starts to start, and you can configure user name, password and other information at this time

Successfully entered into Ubuntu
 

Download the Chinese language pack in the Ubuntu system

Right-click Settings, Region&Language, Manage install Language, Install, Install/Remove Language, only check Chinese (simplified), Apply

restart the system

Ubuntu system change apt source

You can change the source according to the method of Ubuntu in the virtual machine, or you can follow the method below.

Backup source:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bat

Edit the new source file:sudo gedit /etc/apt/sources.list

Add the following to the file

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse

save close

Execute  sudo apt-get update and  sudo apt-get upgrade update.

Set SSD boot items

Open the application menu in ubuntu and find the Disks disk

Start the disk application, you can see the 128GB Disk, select it, click the three dots in the upper right corner to select  Format Disk(格式化磁盘), and format it.

Click Formatto select the EXT4 format.

insert image description here

 After the formatting is complete, all become Free Space.

点击 +  ,  Free Space FollowingChoose 16GB.

insert image description here

 Give the volume a name, create.

insert image description here

Copy system files from emmc to SSD

Clone the GitHub project and execute the commands in sequence
git clone https://github.com/jetsonhacks/rootOnNVMe.git
cd rootOnNVMe
./copy-rootfs-ssd.sh

3) Set to boot from SSD

./setup-service.sh

Restart, execute df -h, and see that the SSD device usage is greater than zero.

View the ip address of NX

Command: ifconfig , remember the ip, it will be used later.

Next burn the components

When burning the SDK, you don’t need to plug in the DuPont cable, run the SDK Manager, only select the second item in SETP02 Jetson SDK Components, and keep the rest unchanged. Continue to install until the installation is complete.

  

 Check that
under NX Ubuntu20.04, download jtop and check whether the SDK is installed successfully

Command line input:

sudo apt-get update

sudo apt install python3-pip -y

sudo pip3 install jetson-stats -i https://pypi.douban.com/simple/

Restart Ubuntu20.04

sudo jtop

 press 7

Configure CUDA, cuDNN

Execute the following commands in sequence:

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_cnn_infer.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_cnn_infer.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_cnn_train.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_cnn_train.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_ops_infer.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_ops_infer.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_ops_train.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_ops_train.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_adv_infer.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_adv_infer.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_adv_train.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn_adv_train.so.8

sudo ln -sf /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn.so.8.4.1 /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcudnn.so.8

If the following problems occur, execute the command.

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_cnn_infe r.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_cnn_trai n.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_ops_infe r.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_ops_trai n.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_adv_infe r.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn_adv_trai n.so.8 is not a symbolic link

/sbin/ldconfig.real: /usr/local/cuda/targets/aarch64-linux/lib/libcudnn.so.8 is not a symbolic link

CUDA10.2 has been installed by default, but there is no configuration, you need to write the CUDA path into the environment variable.
Open the .bashrc file and execute the command:

sudo gedit  ~/.bashrc

Add the following at the end of the file:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/usr/local/cuda

Then update, execute:

source ~/.bashrc

Check whether the CUDA environment is configured

nvcc -V

 At this point, the system is finished

Configure the code runtime environment

1. Install qt

When jetson installs atp-get install qt, an error of unable to locate or dependencies unmet appears_e: unable to locate package qt5-default_wangxinRS's Blog-CSDN Blog

Install Qt on the nvidia-jetson series hardware platform_Zhongyl_'s Blog-CSDN Blog

Check the version of qt

qmake -v

qt build directory: build-pro_name_Qt_5_12_8_GCC_64bit-Debug

2. Install opencv4.5

Put opencv-4.5.3.zip and opencv_contrib-4.5.3.zip in the same folder (very important)

Jetson OpenCV installation, support cuda acceleration, has solved many common problems - Not L's Blog - CSDN Blog

3. Install Dahua driver

Index of /pub/sdk/Ver2.2.5/Linux/arm/aarch64/ (huaraytech.com)

The download is aarch64, and the USB disk has

1.8 Install Dahua Camera SDK and Test_Dahua Industrial Camera Software_Alchemy Lu's Blog-CSDN Blog

4. Compile and install the eigen library

Jetson Xavier NX installs Eigen-3.3.7 and Ceres-1.14.0_one_DS Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/qq_64079631/article/details/132039148