Difference between revisions of "Linux BSP User Guide for jetson series"
Line 158: | Line 158: | ||
== Reference == | == Reference == | ||
− | <span style="color:#006400;">'''Calculate GPIO value from pin number'''</span> | + | <span style="font-size:medium;"><span style="color:#006400;">'''Boot Device'''</span></span> |
+ | |||
+ | In CBoot, there is bootable menu, | ||
+ | <pre>[0002.262] I> Using default boot order | ||
+ | [0002.265] I> boot-dev-order :- | ||
+ | [0002.268] I> 1.sd | ||
+ | [0002.270] I> 2.usb | ||
+ | [0002.272] I> 3.nvme | ||
+ | [0002.274] I> 4.emmc | ||
+ | [0002.276] I> 5.net | ||
+ | [0002.277] I> Hit any key to stop autoboot: 4 3 2 1 | ||
+ | </pre> | ||
+ | |||
+ | Change the boot order, you may type | ||
+ | <pre>$ setvar boot-order emmc, sd, usb, net | ||
+ | </pre> | ||
+ | |||
+ | or | ||
+ | <pre>$ setvar boot-order emmc | ||
+ | </pre> | ||
+ | |||
+ | And boot the system | ||
+ | <pre>$ boot | ||
+ | </pre> | ||
+ | |||
+ | For example, there are two of bootable devices - NVME SSD and EMMC If the NVME SSD was plugged-in, the system will always boot NVME SSD. | ||
+ | |||
+ | <span style="font-size:medium;"><span style="color:#006400;">'''Boot to Rootfs in external storage'''</span></span> | ||
+ | |||
+ | <span style="font-size:medium;"><span style="color:#006400;">'''Calculate GPIO value from pin number'''</span></span> | ||
[[:File:AIR-020-nVidia_GPIO.docx|AIR-020-nVidia_GPIO.docx]] | [[:File:AIR-020-nVidia_GPIO.docx|AIR-020-nVidia_GPIO.docx]] | ||
− | <span style="color:#006400;">'''Device PID VID'''</span> | + | <span style="font-size:medium;"><span style="color:#006400;">'''Device PID VID'''</span></span> |
Open a terminal window on your host and enter the command '''''lsusb'''''.<br/>The Jetson module is in Force Recovery mode if you see this message: | Open a terminal window on your host and enter the command '''''lsusb'''''.<br/>The Jetson module is in Force Recovery mode if you see this message: | ||
Line 172: | Line 201: | ||
[[File:Nvidia pidvid.png|RTENOTITLE]] | [[File:Nvidia pidvid.png|RTENOTITLE]] | ||
− |
Revision as of 09:36, 16 March 2022
Contents
Linux BSP Version
Ubuntu 18.04
Kernel 4.9.201
Released Image
Build Environment on Host
Currently, we adopt Docker as build environment.
You can get the latest version of advrisc/u18.04-imx8lbv1 Docker image for developing nVidia jetson projects.
Docker command:
$ docker pull advrisc/u18.04-imx8lbv1
Run Docker example
Step1 Run docker container (example)
sudo docker run -it --name jetson_linux_risc -v /home/bsp/myLinux:/home/adv/BSP:rw --privileged advrisc/u18.04-imx8lbv1:latest /bin/bash
Step2 In container, change the user. (example)
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
Install Some tools
$sudo apt-get install expect
Getting Linux Source Code
$ export GIT_SSL_NO_VERIFY=1
EPC-R7200
$ cd ~/BSP $ mkdir jetson_linux_risc $ cd jetson_linux_risc $ git config --global user.name "Your Name" $ git config --global user.email you@example.com $ ../repo/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/EPC-R7200/_git/manifests $ ../repo/repo sync
AIR-020
$ cd ~/BSP $ mkdir jetson_linux_risc $ cd jetson_linux_risc $ git config --global user.name "Your Name" $ git config --global user.email you@example.com $ ../repo/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/AIR-020/_git/manifests $ ../repo/repo sync
Build Image - AIR-020 / EPC-R7200
Build Release Image
sudo ./scripts/build_release.sh -s <SOC> -v <VERSION> Where "-v : Image version" 00001~99999 "-s : 186 - Jetson TX2 NX" " : 194 - Jetson Xavier NX" " : 210 - Jetson Nano"
Build Kernel - AIR-020 / EPC-R7200
sudo ./scripts/build_ota.sh -s <SOC> -v <VERSION>
Enter Download Mode
Press follow button + power ON, or
EPC-R7200 | AIR020 |
![]() |
![]() |
Enter following command in the device,
$ sudo reboot --force forced-recovery
Flash Image
Before flashing the image, power off the DUT, press recovery button and power on.
|
EPC-R7200 |
AIR-020 |
---|---|---|
Xavier NX |
$ cd $TOP/Linux_for_Tegra/186/ |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1 |
TX2 NX |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh -d ./kernel/dtb/tegra186-epcr7200.dtb jetson-xavier-nx-devkit-tx2-nx mmcblk0p1 or $ sudo ./flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1 |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1 |
Nano |
$ cd $TOP/Linux_for_Tegra/210/ |
$ cd $TOP/Linux_for_Tegra/210/ $ sudo ./flash.sh jetson-nano-devkit-emmc mmcblk0p1 |
Flash DTB
|
EPC-R7200 |
AIR-020 |
---|---|---|
Xavier NX |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh -r -k kernel-dtb xavier-nx-epcr7200 mmcblk0p1 |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh -r -k kernel-dtb jetson-xavier-nx-devkit-emmc mmcblk0p1 |
TX2 NX |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh -r -k kernel-dtb tx2-nx-epcr7200 mmcblk0p1 |
$ cd $TOP/Linux_for_Tegra/186/ $ sudo ./flash.sh -r -k kernel-dtb jetson-xavier-nx-devkit-tx2-nx mmcblk0p1 |
Nano | $ cd $TOP/Linux_for_Tegra/210/ $ sudo ./flash.sh -r -k DTB nano-epcr7200 mmcblk0p1 |
$ cd $TOP/Linux_for_Tegra/210/ $ sudo ./flash.sh -r -k kernel-dtb jetson-nano-devkit-emmc mmcblk0p1 |
Flash Mac Address
GBE in eeprom
$ sudo ./eeprom $SOC $mac_address
Where SOC
186 : TX2-NX 194 : XavierNX 210 : Nano
Intel I210
$ sudo -s $ BDF=`lspci | grep 210 | awk '{print $1}'` $ setpci -s $BDF COMMAND=0007
Get NIC
$./EepromAccessTool
Flash I210 address with mac_address = D4E5F6123456 ( If mac address = D4:E5:F6:12:34:56 )
$ ./EepromAccessTool -nic=<NIC> -f=Dev_Start_I210_Copper_NOMNG_8Mb_A2_3.25_0.03.hex -mac=$mac_address
Cold reboot the device.
Reference
Boot Device
In CBoot, there is bootable menu,
[0002.262] I> Using default boot order [0002.265] I> boot-dev-order :- [0002.268] I> 1.sd [0002.270] I> 2.usb [0002.272] I> 3.nvme [0002.274] I> 4.emmc [0002.276] I> 5.net [0002.277] I> Hit any key to stop autoboot: 4 3 2 1
Change the boot order, you may type
$ setvar boot-order emmc, sd, usb, net
or
$ setvar boot-order emmc
And boot the system
$ boot
For example, there are two of bootable devices - NVME SSD and EMMC If the NVME SSD was plugged-in, the system will always boot NVME SSD.
Boot to Rootfs in external storage
Calculate GPIO value from pin number
Device PID VID
Open a terminal window on your host and enter the command lsusb.
The Jetson module is in Force Recovery mode if you see this message:
Bus <bbb> Device <ddd>: ID 0955: <nnnn> Nvidia Corp.
Where:
•<bbb> is any three-digit number
•<ddd> is any three-digit number
•<nnnn> is a four-digit number that represents the type of Jetson module: