- 21 Jun 2022
- 2 Minutes to read
-
Print
-
DarkLight
-
PDF
Flash step
- Updated on 21 Jun 2022
- 2 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.
- 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 'flash.sh'
$ cd <nvidia_folder>/Linux_for_Tegra/
$ ls flash.sh
flash.sh
<board> name for flash
Base on your modules, change the <board> name for script.
Xavier NX(emmc)
jetson-xavier-nx-devkit-emmc
Nano(emmc)
jetson-nano-devkit-emmc
Flash demo image
- Download demo image from Technexion ftp server
- Copy demo image to "Linux_for_Tegra/bootloader/"
And rename it into "system.img"
$ sudo cp -rv <demo_image> <nvidia_folder>/Linux_for_Tegra/bootloader/system.img
- Enter recovery mode and run:
$ sudo ./flash.sh -r <board> mmcblk0p1
DO NOT create new system.img, flash only
$sudo ./flash.sh -r <board> mmcblk0p1
Create new system.img, and flash
$ sudo ./flash.sh <board> mmcblk0p1
Create new system.img, DO NOT flash
$ sudo ./flash.sh --no-flash <board> mmcblk0p1
Backup currect image
$ sudo ./flash.sh -r -k APP -G backup.img <board> mmcblk0p1
backup.img.raw is the same result when using 'dd' command.
backup.img is the sparse image of backup.img.raw
Flash backup.img
- Copy backup.img to the folder where system.img.
And rename it into system.img.
$ sudo cp -rv backup.img bootloader/system.img
- Flash but DONOT create new system.img
$ sudo ./flash.sh -r <board> mmcblk0p1
Flash new kernel(modules)
You can only change it using file system.
(Via baseboard sd card/ USB stick)
Kernel image:
Copy from:
<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/Image
to device:
/boot/
Kernel Modules:
Copy from
<nvidia_folder>/Linux_for_Tegra/sources/kernel/modules/lib/
to device:
/lib/
Update device tree/ overlay
You can only change it using file system.
(Via baseboard sd card/ USB stick)
From:
<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/dts/<target>.dtb
<nvidia_folder>/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/dts/<target>.dtbo
to device:
/boot/<target>.dtb
/boot/<target>.dtbo
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
Change default overlay
on device:
$ vi /boot/extlinux/extlinux.conf
LABEL primary
MENU LABEL primary kernel
+ FDTOVERLAYS /boot/<target_overlay>.dtbo
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
Support Overlay Table (WIP)
board baseboard |
overlay function | overlay_name name (WIP) |
default overlay_name |
---|---|---|---|
Xavier-NX TEK3-NVJETSON |
VIZIONLINK-1 with TEVI-OV5640 VIZIONLINK-1 with TEVI-AR0144 VIZIONLINK-1 with TEVI-AR0234 |
ov5640 ar0144 ar0234 |
no_overlay |
Nano TEK3-NVJETSON |
VIZIONLINK-1 with TEVI-OV5640 VIZIONLINK-1 with TEVI-AR0144 VIZIONLINK-1 with TEVI-AR0234 |
ov5640 ar0144 ar0234 |
no_overlay |
Xavier-NX TEK8-NVJETSON |
VIZIONLINK-4 with TEVI-OV5640 VIZIONLINK-4 with TEVI-AR0144 VIZIONLINK-4 with TEVI-AR0234 |
ov5640 ar0144 ar0234 |
no_overlay |
Flash new pinmux image
Edit the xlsm pinmux file via windows environment.
<nvidia_folder>/Linux_for_Tegra/TEK*-NVJETSON_*_pinmux/*.xlsm
If done, click the above Macro(Generate DT file) to generate pinmux file.
A) For Xavier NX
-
Type the <name> twice.
{height="" width=""}
You will see this result.
-
Convert into cfg files using Jetpack script.
# Copy files to script location
$ cp -rv tegra19x-<name>-pinmux.dtsi <nvidia_folder>/Linux_for_Tegra/kernel/pinmux/t19x/
$ cp -rv tegra19x-<name>-gpio-default.dtsi <nvidia_folder>/Linux_for_Tegra/kernel/pinmux/t19x/
$ cp -rv tegra19x-<name>-padvoltage-default.dtsi <nvidia_folder>/Linux_for_Tegra/kernel/pinmux/t19x/
# Generation cfg file
$ cd <nvidia_folder>/Linux_for_Tegra/kernel/pinmux/t19x/
$ python pinmux-dts2cfg.py --pinmux addr_info.txt gpio_addr_info.txt por_val.txt \
tegra19x-<name>-pinmux.dtsi tegra19x-<name>-gpio-default.dtsi \
1.0 > TEST_tegra19x-mb1-pinmux-p3668-a01.cfg
- Copy cfg files to flash location
$ sudo cp -rp TEST_tegra19x-mb1-pinmux-p3668-a01.cfg <nvidia_folder>/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p3668-a01.cfg
- Flash 'MB1_BCT' partition(pinmux partition).
$ sudo ./flash.sh -k MB1_BCT jetson-xavier-nx-devkit-emmc mmcblk0p1
B) For Nano
- Type the <name>.
You will see this result.
{height="" width=""}
2) Copy files to device-tree location(For example: TEK3-NVJETSON)
$ sudo cp -rp tegra210-tek3-gpio-default.dtsi <nvidia_folder>/Linux_for_Tegra/sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-tek3-nvjetson-a1-gpio-default.dtsi
$ sudo cp -rp tegra210-tek3-pinmux.dtsi <nvidia_folder>/Linux_for_Tegra/sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-tek3-nvjetson-a1-pinmux.dtsi
- Re-compile and flash new device-tree.