Flashing Jetson TX2 NX with Jetpack already installed

I have no problems in flashing a compiled kernel jetpack version 34.1 over to a TX2 NX on a custom carrier. My issue though is that once the flashing is done and I boot the system, it doesn’t look like the jetpack drivers and cuda are installed. When I try to install them with a terminal command eventually I run out of disk space. The only way I figured out how to do it is by moving the root folder over to an SD card.

I would much prefer if I could flash the TX2 NX with jetpack drivers and CUDA already installed. Is there a way to do this so I don’t have to install them after the SoM is flashed?

Normally if you use the SDK manager you have the option to do this, but I’m trying to just use the flash.sh script.

Instead of this you can do flashing directly on ton SD card itself where space is more.

After that when you install CUDa and related package using sudo apt-install nvidia-jetpack
Then it will get installed automatically under rootfs on the sd card itself.

I would prefer to have the OS run on the on-board emmc.

Looking to know how to have jetpack and cuda compiled with the OS, or if there’s a way to have the drivers on a host computer and install onto the SoM so less memory is used, or… if there’s a way to point the installation of the drivers to the emmc instead of current SD card?

Hi luc4,

Could you share the result of the following commands on your board?

$ cat /etc/nv_tegra_release
$ cat /etc/nv_boot_control.conf
$ lsblk

Have you referred to README_backup_restore.txt to backup from one board with all packages installed and restore them to another new board?

Where is that readme file located?

R32 (release), REVISION: 7.3, GCID: 31982016, BOARD: t186ref, EABI: aarch64, DATE: Tue Nov 22 17:32:54 UTC 2022

TNSPEC 3636-300-0001-H.0-1-0-jetson-xavier-nx-devkit-tx2-nx-mmcblk0p1
COMPATIBLE_SPEC 3636–0001–1–jetson-xavier-nx-devkit-tx2-nx-
TEGRA_CHIPID 0x18
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 1 loop
mmcblk0 179:0 0 14.7G 0 disk
├─mmcblk0p1 179:1 0 14G 0 part
├─mmcblk0p2 179:2 0 4M 0 part
├─mmcblk0p3 179:3 0 4M 0 part
├─mmcblk0p4 179:4 0 512K 0 part
├─mmcblk0p5 179:5 0 512K 0 part
├─mmcblk0p6 179:6 0 512K 0 part
├─mmcblk0p7 179:7 0 512K 0 part
├─mmcblk0p8 179:8 0 3M 0 part
├─mmcblk0p9 179:9 0 3M 0 part
├─mmcblk0p10 179:10 0 2M 0 part
├─mmcblk0p11 179:11 0 4M 0 part
├─mmcblk0p12 179:12 0 4M 0 part
├─mmcblk0p13 179:13 0 604K 0 part
├─mmcblk0p14 179:14 0 604K 0 part
├─mmcblk0p15 179:15 0 1M 0 part
├─mmcblk0p16 179:16 0 1M 0 part
├─mmcblk0p17 179:17 0 2M 0 part
├─mmcblk0p18 179:18 0 2M 0 part
├─mmcblk0p19 179:19 0 6M 0 part
├─mmcblk0p20 179:20 0 6M 0 part
├─mmcblk0p21 179:21 0 2M 0 part
├─mmcblk0p22 179:22 0 128M 0 part
├─mmcblk0p23 179:23 0 128M 0 part
├─mmcblk0p24 179:24 0 63M 0 part
├─mmcblk0p25 179:25 0 512K 0 part
├─mmcblk0p26 179:26 0 256K 0 part
├─mmcblk0p27 179:27 0 256K 0 part
├─mmcblk0p28 179:28 0 80M 0 part
├─mmcblk0p29 179:29 0 80M 0 part
├─mmcblk0p30 179:30 0 512K 0 part
├─mmcblk0p31 179:31 0 512K 0 part
├─mmcblk0p32 259:0 0 100M 0 part
└─mmcblk0p33 259:1 0 61.8M 0 part
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
mmcblk0rpmb 179:96 0 4M 0 disk
mmcblk1 179:128 0 119.1G 0 disk /mnt/sd_card
zram0 252:0 0 478.2M 0 disk [SWAP]
zram1 252:1 0 478.2M 0 disk [SWAP]
zram2 252:2 0 478.2M 0 disk [SWAP]
zram3 252:3 0 478.2M 0 disk [SWAP]

The system is currently booting from /dev/mmcblk1 found using command:

findmnt -n -o SOURCE /

Do you have <Linux_for_Tegra>/tools/backup-restore/ in your BSP package?
NVIDIA Jetson Linux Developer Guide : Flashing and Booting the Target Device | NVIDIA Docs

So, you are using R32.7.3 rather than R34.1 in your original post.

I have the tools folder but there’s no backp-restore folder in there. Checking you link you gave it seems like I can flash directly to the SD card in our system which is good, but I feel like in the end it would end up to a similar thing as transferring and changing the root folder after the OS is installed into the SoM.

Seems that way, my apologies.

Yes, you can just use flash script instead of backup/restore script.

You can also use flash script to clone/flash the APP partition only to prepare the rootfs with all required packages installed.
Please refer to To clone a Jetson device and flash part in the link I shared.