- 06 May 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
Flash Step
- Updated on 06 May 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
Enter Recovery mode
When it comes to using 'flash.sh', make sure you enter the Recovery mode first.
- Connect to computer via M-USB1.
- Plug the storage you want to flash system image.
- Press 'Recovery' button and 'Reset' button at the same time.
- Release 'Reset' button.
- Relesee 'Recovery' button.
- Check wether the device is connected.
$ lsusb
Bus 001 Device 012: ID 0955:7e19 NVIDIA Corp. APX
Flash command
Please flash using Nvidia script for ORIN series
$ cd <nvidia_folder>/Linux_for_Tegra/
$ ls ./tools/kernel_flash/l4t_initrd_flash.sh
./tools/kernel_flash/l4t_initrd_flash.sh
Base on your modules, select the <board name>
for script.
Product name | <board name> | Boot device |
---|---|---|
TEK6100-ORIN-NX | tn-tek6100-orin | NVMe/ USB |
TEK6070-ORIN-NX | tn-tek6070-orin | NVMe/ USB |
TEK6040-ORIN-NANO | tn-tek6040-orin | NVMe/ USB |
TEK6020-ORIN-NANO | tn-tek6020-orin | NVMe/ USB |
VLS3-ORIN-EVK-VLS3 | tn-vls3-orin-evk-tevs | SD |
RPI22-TEVS | tn-tev-rpi22-tevs | SD |
RPI22-TEVI | tn-tev-rpi22-tevi | SD |
Base on your condition, select the <storage name>
for script.
Boot device | <storage name> |
---|---|
NVMe | nvme0n1p1 |
USB | sda1 |
SD | mmcblk1p1 |
When using USB boot, make sure there is only one USB storage connected to device.
In each boot stage, USB storage number(/dev/sdX) is not the same.
Leads to boot failed.
Flash demo image
- Download TechNexion TEK-ORIN products demo image from HERE
- Download Jetson ORIN NANO EVK demo image from HERE
Make sure you download the image with the boot device you need.
- Download TechNexion TEK-ORIN products demo image from HERE
Unzip the file
Connect the storage to computer and flash to block device
$ lsblk
$ sudo bmaptool copy <FILE.bz2> /dev/<BLOCK_DEVICE>
You can use something like 'SSD Enclosure Adapter' to transform SSD to USB block device.
- Plug the storage back to device and boot.
Make sure you select the right boot device in NVIDIA UEFI stage.
DO NOT create new
system.img
, flash only
You can follow section: Create new system.img, DO NOT flash to create system.img.
When you prepare Jetpack, download script will create system.img
,
you can flash into device directly.
# --flash-only
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
--external-device <storage name> -c tools/kernel_flash/flash_l4t_external.xml \
-p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
--showlogs --flash-only --network usb0 <board name> internal
--flash-only
limitationJetpack will storage the command that you previous create system image
in bootloader/flashcmd.txt
ex1: TEK6100-ORIN-NX: NVMe boot
./tegraflash.py ...
--bins bpmp_fw bpmp_t234-TE990M-A1_prod_sigheader.bin.encrypt;
bpmp_fw_dtb tegra234-bpmp-3767-0000-a02-3509-a02_with_odm_sigheader.dtb.encrypt;
kernel_dtb tegra234-p3767-0000-tek-orin-a1.dtb"
--ramcode 0
ex2: TEK6040-ORIN-NANO: NVMe boot
./tegraflash.py ...
--bins bpmp_fw bpmp_t234-TE950M-A1_prod_sigheader.bin.encrypt;
bpmp_fw_dtb tegra234-bpmp-3767-0003-3509-a02_with_odm_sigheader.dtb.encrypt;
kernel_dtb tegra234-p3767-0003-tek-orin-a1.dtb"
--ramcode 2
Most of the differences can be found in their board conf file.
In conclusion, when running --flash-only
command, if the <storage name>
or <board name>
is not match the previous created one, flash script will be terminated.
When any of them changes, need to create system.img
again.
Or you can just create new Jetpack with different system image command.
Create new
system.img
, and flash
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
--external-device <storage name> -c tools/kernel_flash/flash_l4t_external.xml \
-p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
--showlogs --network usb0 <board name> internal
Create new system.img, DO NOT flash
# --no-flash
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
--external-device <storage name> -c tools/kernel_flash/flash_l4t_external.xml \
-p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
--showlogs --no-flash --network usb0 <board name> internal
You can flash to device follow by section:DO NOT create new system.img, flash only.
Backup and restore currect device image
Download backup/ restore script of Jetpack R35.4.1.
Use it to replace the files in Linux_for_Tegra/tools/backup_restore/
.
backup
# -b: jetson-orin-nano-devkit for EVK
# jetson-orin-nano-devkit-nvme for TEK-ORIN series
# -e: mmcblk1p1 for ORIN-EVK
# nvme0n1 for TEK-ORIN series
$ sudo ./tools/backup_restore/l4t_backup_restore.sh -e <storage name> -b <board name>
restore
# -b: jetson-orin-nano-devkit for EVK
# jetson-orin-nano-devkit-nvme for TEK-ORIN series
# -e: mmcblk1p1 for ORIN-EVK
# nvme0n1 for TEK-ORIN series
$ sudo ./tools/backup_restore/l4t_backup_restore.sh -e <storage name> -r <board name>
When you restore image to device, script will check if the <board name>
and <storage name>
, if is not match, flash script will be terminated.
Also, script will be terminated If the storage size is slightly smaller than backup image.
This might happend if you want to copy the backup image to other device, since every NVMe/ SD size will not always be the same.
Create raw disk image (can be dd into storage)
Download script has the tweaked disk image creator ready.
$ ls tools/jetson-disk-image-creator.sh
tools/jetson-disk-image-creator.sh
# -o: output file name
# -b: board conf name
# TEK6100-ORIN-NX/ TEK6040-ORIN-NANO ...
# -d: Boot device name
# NVMe/ USB/ SD
$ sudo ./tools/jetson-disk-image-creator.sh \
-o <image_name>.img -b <board name> -d <Boot device>
ex1: TEK6100-ORIN-NX with NVMe boot
$ sudo ./tools/jetson-disk-image-creator.sh \
-o TEK6020-ORIN-NANO_20240504_NVMe_disk.img \
-b tn-tek6020-orin-nano -d NVMe
ex2: VLS3-ORIN-EVK with SD boot
$ sudo ./tools/jetson-disk-image-creator.sh \
-o VLS3-ORIN-EVK-VLS3_20240504_SD_disk.img \
-b tn-vls3-orin-evk-vls3 -d SD
Now you can deploy the image into you device follow section: Flash demo image .
Flash new pinmux image
0) Edit the xlsm pinmux file via windows environment.
<nvidia_folder>/Linux_for_Tegra/sources/TEK-ORIN_Orin-Nano_pinmux/Jetson_Orin_NX_series_and_Orin_Nano_series_Pinmux_Config_Template.xlsm
Download xlsm pinmux file from NVIDIA server.
Use the scroll bar right to select the pinmux of the cell(pin).
You should work on +HDMI A03
sheet, there are slightly different between them.
If done, click the above Macro(Generate DT file) to generate pinmux file.
1) Type the <name> twice.
tek-orin-a1 for TEK-ORIN series
You will see this result.
2) Copy generated dtsi to bootloader/
folder
$ sudo cp -rp Orin-tek-orin-a1-gpio-default.dtsi Linux_for_Tegra/bootloader/
$ sudo cp -rp Orin-tek-orin-a1-pinmux.dtsi Linux_for_Tegra/bootloader/t186ref/BCT/
4) Update NVIDIA QSPI for pinmux
follow the 'Create and flash new QSPI image only'.
Create and flash new QSPI image only
Just remove --external-device
option
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
-p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
--showlogs --network usb0 <board name> internal
this also support the --no-flash
and --flash-only
option
Which means you can only use
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
-p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
--showlogs --flash-only --network usb0 <board name> internal
til next create image cammand.
Those only update by file system
You may want to see this article before you changing files.
Those part below can't be changed by flash.sh.
Need to change the file by:
- ssh (scp)
- USB stick
Update new kernel Image
Copy from:
<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-5.10/arch/arm64/boot/Image
to device:
/boot/
Update new kernel modules
Copy from
<nvidia_folder>/Linux_for_Tegra/sources/kernel/modules/lib/
to device:
/lib/
Update device tree
From:
<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-5.10/arch/arm64/boot/dts/<target>.dtb
to device:
/boot/<target>.dtb
Change default device-tree
On device:
$ vi /boot/extlinux/extlinux.conf
LABEL primary
MENU LABEL primary kernel
+ FDT /boot/<target>.dtb
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0