Jetpack 6: workflow 3 massflash the backup image problem with custom carrier board

Hello everyone,

I have jetson orin nano 8gb carrier board its coming with only NVMe

I used their guide for build custom BSP with jetpack 6. compilation, flashing are successful, then I am trying to create mfi just like with jetpack5
The only problem for J5 DaveYYY helped me with custom script modification to make it work with board where just NVMe drive, do I need something similar for J6? ( tried to use old scripts inside new jetpack bsp, didnt worked )

My steps with default tools from J6 BSP release

./tools/backup_restore/l4t_backup_restore.sh -b -c recomputer-orin-j401
./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 10 recomputer-orin-j401 nvme0n1p1

These commands without error created for me mfi folder with image files:

root@host:/mfi_recomputer-orin-j401/tools/kernel_flash/images/internal# ls -lah
total 120G
drwxr-xr-x 2 root root 4.0K Dec 18 11:24 .
drwxr-xr-x 3 root root 4.0K Dec 18 11:24 ..
-rw-r--r-- 1 root root    0 Dec 18 11:24 flash.cfg
-rw-r--r-- 1 root root 2.2K Dec 18 11:24 flash.idx
-rw-r--r-- 1 root root  17K Dec 18 11:15 gptbackup.img
-rw-r--r-- 1 root root  20K Dec 18 11:15 gptmbr.img
-rw-r--r-- 1 root root  64M Dec 18 11:15 nvme0n1p10_bak.img
-rw-r--r-- 1 root root  80M Dec 18 11:15 nvme0n1p11_bak.img
-rw-r--r-- 1 root root 1.0M Dec 18 11:15 nvme0n1p12_bak.img
-rw-r--r-- 1 root root  64M Dec 18 11:15 nvme0n1p13_bak.img
-rw-r--r-- 1 root root 400M Dec 18 11:15 nvme0n1p14_bak.img
-rw-r--r-- 1 root root 480M Dec 18 11:15 nvme0n1p15_bak.img
-rw-r--r-- 1 root root 118G Dec 18 11:16 nvme0n1p1_bak.img
-rw-r--r-- 1 root root 128M Dec 18 11:16 nvme0n1p2_bak.img
-rw-r--r-- 1 root root 1.0M Dec 18 11:16 nvme0n1p3_bak.img
-rw-r--r-- 1 root root  32M Dec 18 11:16 nvme0n1p4_bak.img
-rw-r--r-- 1 root root 128M Dec 18 11:16 nvme0n1p5_bak.img
-rw-r--r-- 1 root root 1.0M Dec 18 11:16 nvme0n1p6_bak.img
-rw-r--r-- 1 root root  32M Dec 18 11:16 nvme0n1p7_bak.img
-rw-r--r-- 1 root root  80M Dec 18 11:16 nvme0n1p8_bak.img
-rw-r--r-- 1 root root 1.0M Dec 18 11:16 nvme0n1p9_bak.img
-rw-r--r-- 1 root root 1.9K Dec 18 11:16 nvpartitionmap.txt
-rw-r--r-- 1 root root  64M Dec 18 11:16 QSPI0.img

After that, I am trying to flash second device with command

./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --network usb0

But its trying to use emmc, which I dont have

Waiting for target to boot-up...
Waiting for device to expose ssh ......Waiting for device to expose ssh ...Run command: flash on fc00:1:1:0::2
SSH ready
blockdev: cannot open /dev/mmcblk0boot0: No such file or directory
[ 0]: l4t_flash_from_kernel: Serial Number: 1421123009874
[ 0]: l4t_flash_from_kernel: Starting to create gpt for emmc
Active index file is /mnt/internal/flash.idx
Number of lines is 18
max_index=17
writing item=1, 1:3:primary_gpt,0,20480,gptmbr.img,20480,fixed-<reserved>-0,24cb9b0967c03aaf9043e45f1a55c5643f5f46e3
Error: Could not stat device /dev/mmcblk0 - No such file or directory.
Flash failure
Either the device cannot mount the NFS server on the host or a flash command has failed. Debug log saved to /tmp/tmp.N6A162k662. You can access the target's terminal through "sshpass -p root ssh root@fc00:1:1:0::2"
Cleaning up...

Any help are welcome

Hi

No, JP6 support massflash with NVMe.

Please try below command

./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 --massflash 1 --network usb0 | tee ~/record.txt

Also please attach the record.txt for us to review.
Thanks

Attached

record.txt (7.3 KB)

Hi,

We will verify on our end, which will take some time.
On your side, you can execute the following commands if available:

To generate the MFI package, run:

./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --external-device nvme0n1p1  --network usb0 --massflash 10 recomputer-orin-j401 nvme0n1p1 | tee ~/mfi_build.txt

Then, execute the following command:

./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 --massflash 1 --network usb0 | tee ~/record.txt

And attach again
thanks

Hi David,

Thank you for your time,

First command stop at validation stage

./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --external-device nvme0n1p1  --network usb0 --massflash 10 recomputer-orin-j401 nvme0n1p1 | tee ~/mfi_build.txt
Flashing external device requires -c option to specify device partition layout

Added -c tools/kernel_flash/flash_l4t_t234_nvme.xml
Where flash_l4t_t234_nvme.xml custom file from Seeed (xml not allowed to upload, changed to txt)
flash_l4t_t234_nvme.xml.txt (8.8 KB)

./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml  --network usb0 --massflash 10 recomputer-orin-j401 nvme0n1p1 | tee ~/mfi_build.txt

mfi build seems fine
mfi_build.txt (18.9 MB)

But when I try to flash, still problem
Error: Could not stat device /dev/mmcblk0 - No such file or directory.
record_v2.txt (8.2 KB)

Thank you,
Max

HI David,

Is there any updates from your side?

Regards,
Max

Hi,

Testing is still in progress.
One question to confirm.

  • What is your NVMe size?

Thanks

Hi David,

Thank you for update, 120G, list of partitions just in case

NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0    16M  1 loop
zram0        251:0    0   1.2G  0 disk [SWAP]
zram1        251:1    0   1.2G  0 disk [SWAP]
zram2        251:2    0   1.2G  0 disk [SWAP]
zram3        251:3    0   1.2G  0 disk [SWAP]
zram4        251:4    0   1.2G  0 disk [SWAP]
zram5        251:5    0   1.2G  0 disk [SWAP]
nvme0n1      259:0    0 119.2G  0 disk
├─nvme0n1p1  259:1    0   118G  0 part /
├─nvme0n1p2  259:2    0   128M  0 part
├─nvme0n1p3  259:3    0   768K  0 part
├─nvme0n1p4  259:4    0  31.6M  0 part
├─nvme0n1p5  259:5    0   128M  0 part
├─nvme0n1p6  259:6    0   768K  0 part
├─nvme0n1p7  259:7    0  31.6M  0 part
├─nvme0n1p8  259:8    0    80M  0 part
├─nvme0n1p9  259:9    0   512K  0 part
├─nvme0n1p10 259:10   0   300M  0 part
├─nvme0n1p11 259:11   0    64M  0 part
├─nvme0n1p12 259:12   0    80M  0 part
├─nvme0n1p13 259:13   0   512K  0 part
├─nvme0n1p14 259:14   0    64M  0 part
└─nvme0n1p15 259:15   0   400M  0 part

Have a nice day,
Max

Could you execute below commands and share the result with us?

sudo fdisk -l /dev/nvme0n1

Thanks

Sure

Disk /dev/nvme0n1: 119.25 GiB, 128035676160 bytes, 250069680 sectors
Disk model: FORESEE XP1000F128G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6862803F-AFE7-497B-B0CD-45219CAD6D48

Device            Start       End   Sectors  Size Type
/dev/nvme0n1p1  2682408 250069639 247387232  118G Microsoft basic data
/dev/nvme0n1p2       40    262183    262144  128M Microsoft basic data
/dev/nvme0n1p3   262184    263719      1536  768K Microsoft basic data
/dev/nvme0n1p4   263720    328487     64768 31.6M Microsoft basic data
/dev/nvme0n1p5   328488    590631    262144  128M Microsoft basic data
/dev/nvme0n1p6   590632    592167      1536  768K Microsoft basic data
/dev/nvme0n1p7   592168    656935     64768 31.6M Microsoft basic data
/dev/nvme0n1p8   656936    820775    163840   80M Microsoft basic data
/dev/nvme0n1p9   820776    821799      1024  512K Microsoft basic data
/dev/nvme0n1p10  821800   1436199    614400  300M Microsoft basic data
/dev/nvme0n1p11 1436200   1567271    131072   64M EFI System
/dev/nvme0n1p12 1567272   1731111    163840   80M Microsoft basic data
/dev/nvme0n1p13 1731112   1732135      1024  512K Microsoft basic data
/dev/nvme0n1p14 1732136   1863207    131072   64M Microsoft basic data
/dev/nvme0n1p15 1863208   2682407    819200  400M Microsoft basic data

Partition table entries are not in disk order.

Thats the same device type only with J5.1.3 installed on it, for the moment dont have access to running J6, if necessary can try to arrange that

Hi

Thank you for your patience. We have verified that the massflash backup script functions correctly in Jetpack 6.1. Below are the commands we executed:

sudo ./tools/backup_restore/l4t_backup_restore.sh -b -c jetson-orin-nano-devkit

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 jetson-orin-nano-devkit  internal 

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --network usb0

Thanks

Hi David,

Thanks you for an update, I will try to test these commands asap.
One question, is this means what in 6.0 there is some bug in scripts? As my device only support J6.0 at the moment, should I overwrite scripts in my BSP with J6.0 from J6.1?

Happy New Year,
Max

1 Like

Hi Max,

There are no bugs in JP 6.0; the difference in JP 6.1 is the addition of NVMe support. You could try replacing the JP 6.0 files with those from JP 6.1.

# under the Linux_for_Tegra/tools
backup_restore/l4t_backup_restore.func 
backup_restore/l4t_backup_restore.sh
backup_restore/nvbackup_partitions.sh 
backup_restore/nvrestore_partitions.sh 
kernel_flash/l4t_flash_from_kernel.sh 

Thanks

1 Like

Hi David,

Thank you very much for help, everything is working as expected using your command

All the best,
Max

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.