Clone Error: Failed to flash/read t186ref, Orin AGX 32GB

I have three Orin AGXs. I try to clone from one (machine 001) to the other two (machine 002 and machine 003), but I am having these errors:

machine 002

    .
    .
    Error: Return value 4
    Command tegradevflash_v2 --write APP /home/isi/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/bootloader/system.img
    Failed to flash/read t186ref.

machine 003

    .
    .
    [ 482.5808 ] Writing partition APP with system.img [ 62225330688 bytes ]
    [ 482.5868 ] 0000000054540204: E> NV3P_SERVER: Accessing offset 62225330688 after boundary partition size 59055800320
    [ 482.5971 ]
    [ 482.5971 ]
    Error: Return value 4
    Command tegradevflash_v2 --pt flash.xml.bin --create
    Failed flashing t186ref.
Here is entire error message for your reference (different in each machine):

  machine 002 error_clone_with_t186ref_board_002.txt (80.5 KB)

  machine 003 error_clone_with_t186ref.txt (63.3 KB)
  This one it looks like “Start flashing” started before error

My step to clone image are at the host computer:

sudo cp ~/Downloads/d-004.img system.img
sudo ./flash.sh -r -k APP t186ref jetson-agx-orin-devkit mmcblk0p1

I also tried sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1 and sudo ./flash.sh -r -k APP jetson-agx-orin-devkit mmcblk0p1.

I followed the instruction at To cloen a Jetson device and flash.

I search the forum and this is the closest one to me:
  “it turns out i had a quota limitation on my work dir and i think this caused is (although i worked in folder without this limitation). after using a different server to flash from all passed well”
  I have enough space in my root drive. Does he mentioning RAM size in my host machine? I have 32 GB in my host machine.

What did I miss?

Runtime environment:
  Host computer OS: Ubuntu 18.04
  Nvidia hardware: Orin AGX 32 GB
  SDK Manager version JetPack 5.0.2 (rev.2)

Hi,

Have you tried this?


https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/FlashingSupport.html
It’s not mentioned in the document for 35.1, so maybe you missed it.
Also, t186ref is not needed in the command; I don’t know why you are using it.

@DaveYYY, Thanks for updated document and suggestion of removing one parameter in command line. I modified the file to 0x808, and tried these two commands (separately):

sudo ./flash.sh -r -k APP jetson-agx-orin-devkit mmcblk0p1

Error message

.
.
.
[   7.6356 ] Erasing partition
[   7.6373 ] tegradevflash_v2 --erase APP
[   7.6386 ] Bootloader version 01.00.0000
[   7.6833 ] [Done]
[   8.6914 ] Writing partition
[   8.6965 ] tegradevflash_v2 --write APP /home/isi/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/bootloader/system.img
[   8.7009 ] Bootloader version 01.00.0000
[   8.7314 ] Writing partition APP with /home/isi/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/bootloader/system.img [ 62225330688 bytes ]
[   8.7330 ] 0000000054540204: E> NV3P_SERVER: Accessing offset 62225330688 after boundary partition size 62091116032
[   8.7423 ] 
[   8.7423 ] 
Error: Return value 4
Command tegradevflash_v2 --write APP /home/isi/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/bootloader/system.img
Failed to flash/read t186ref.

sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1

Error message:

.
.
.
[ 473.9479 ] [................................................] 100%
[ 473.9502 ] Writing partition A_VER with qspi_bootblob_ver.txt [ 109 bytes ]
[ 473.9603 ] [................................................] 100%
[ 473.9631 ] Writing partition master_boot_record with mbr_1_3.bin [ 512 bytes ]
[ 473.9731 ] [................................................] 100%
[ 473.9756 ] Writing partition A_kernel with boot.img [ 42057728 bytes ]
[ 473.9794 ] [................................................] 100%
[ 475.6403 ] Writing partition A_kernel-dtb with kernel_tegra234-p3701-0000-p3737-0000_with_odm.dtb [ 392950 bytes ]
[ 475.6433 ] [................................................] 100%
[ 475.6578 ] Writing partition B_kernel with boot.img [ 42057728 bytes ]
[ 475.6619 ] [................................................] 100%
[ 477.3557 ] Writing partition B_kernel-dtb with kernel_tegra234-p3701-0000-p3737-0000_with_odm.dtb [ 392950 bytes ]
[ 477.3605 ] [................................................] 100%
[ 477.3742 ] Writing partition recovery with recovery.img [ 45836288 bytes ]
[ 477.3786 ] [................................................] 100%
[ 479.2620 ] Writing partition recovery-dtb with tegra234-p3701-0000-p3737-0000.dtb.rec [ 392780 bytes ]
[ 479.2682 ] [................................................] 100%
[ 479.2843 ] Writing partition esp with esp.img [ 67108864 bytes ]
[ 479.2883 ] [................................................] 100%
[ 481.9267 ] Writing partition APP with system.img [ 62225330688 bytes ]
[ 481.9321 ] 0000000054540204: E> NV3P_SERVER: Accessing offset 62225330688 after boundary partition size 62091116032
[ 481.9422 ] 
[ 481.9423 ] 
Error: Return value 4
Command tegradevflash_v2 --pt flash.xml.bin --create
Failed flashing t186ref.

Does it looks like file size, disk size or USB transfer band width error?

My image file size is 58 GB (62225330688). Is there any other I have to check or try?

I realized “r” option reusing the “system.img” (may be still the one I copied in “bootloader” folder).

To make sure the IMG file I want to use, so I did again with:
sudo ./flash.sh --no-flash --no-systemming jetson-agx-orin-devkit mmcblk0p1
and then
sudo ./flash.sh -k APP --image /home/ccho/Downloads/d-004.img jetson-agx-orin-devkit mmcblk0p1

It still gave me the same error.

I will try with different host machine.

Hi,

Are you sure all these devices have exactly the same disk size?
Maybe they are of different SKUs and are using different eMMC chips, which makes the cloned image incompatible.

@DaveYYY Thanks for suggestion.
We are comparing SKU, eMMC, disk size. Would different JetPack version a factor as well?

YES.
For example, you cannot restore a image cloned from a 5.1.2 device to a 5.1.1 device.

@DaveYYY Thanks for continous support. I compared the host computer OS and Jetpack version. The Ubuntu 22 OS used on the Image file generation, so I am using Ubuntu 22 OS. Now I am having this error
:

.
.
.
[  10.3674 ] completed
[  11.3704 ] tegrarcm_v2 --chip 0x23 0 --ismb2applet
[  11.4038 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[  11.4043 ] MB2 version 01.00.0000
[  11.4521 ] Erasing partition
[  11.4537 ] tegradevflash_v2 --erase APP
[  11.4550 ] Bootloader version 01.00.0000
[  11.5041 ] [Done]
[  12.5215 ] Writing partition
[  12.5230 ] tegradevflash_v2 --write APP /home/lab/Downloads/d-004.img
[  12.5242 ] Bootloader version 01.00.0000
[  12.5554 ] Writing partition APP with /home/lab/Downloads/d-004.img [ 62225330688 bytes ]
[  12.5561 ] 0000000054540204: E> NV3P_SERVER: Accessing offset 62225330688 after boundary partition size 62091116032
[  12.5673 ] 
[  12.5673 ] 
Error: Return value 4
Command tegradevflash_v2 --write APP /home/lab/Downloads/d-004.img
Failed to flash/read generic.

My computer has the USB 3.0 port, and I tried two different USB C to USB cable.

Can you please run sudo fdisk -l on the device where the image is generated, and where the image is restored? I believe they are of different size because we have multiple sources of the eMMC chip.

Anyway, you should use the backup/restore tool located in Linux_for_Tegra/tools/backup_restore instead. flash.sh clones the image with dd, and everything including the partition table is copied 1:1, whereas the backup/restore tool will format all partitions again, and use tar to extract the image, so disk size should not matter under such usecases.

@DaveYYY Thanks for different way.

Regarding, sudo fdisk -l at the host computer, it looks like not showing connected Orin device.

We tried to back and restore, but we failed in the both machines (002, 003). Here are errors (different in each board)


004 → 002

Error message: “vrestore_partitions.sh: Use the default nvpartitionmap.txt as the index file.
partx: specified range <1:0> does not make sense”

002 labeled: Model: P3737, 699-13737-0000-500 B. I also believe it is 32 GB.


004 (backup) → 003 (restore)

Error message: “nvrestore_partitions.sh: You are trying to flash images from a board model that does not
match the current board you’re flashing onto.” (entire terminal output is at “error_restore_d_003.txt” for reference)

003 labeled Model: P3737, 699-13737-0000-500 D. I believe that she is 32 GB.


When I see the TXT file (“nvpartitonmap.txt”) from 004, it looks like D-004 looks like “board_spec,3701-500-0000-K.0-1-1-jetson-agx-orin-devkit-”

As you mentioned, hardware are actually different (3737 D, B vs. 3701 K)

So cloning isn’t possible, right?

I mean run this on the device, not the host PC.

YES.
Please try the tool I mentioned.

@DaveYYY
Thanks for clarification. To run fdiskat dev board, I have to flush clean them (currently not able to log in because cloning hanging).

Yes, the post on January 23 was by using the backup/restore tool at “Linux_for_Tegra/tools/backup_restore” folder. I enclosed entire Terminal output of unit 003 of the command line:
error_restore_d_003.txt (70.1 KB)

Regarding the backup/restore tool, do you mean, I could clone the board using the tool, even there is size difference between them?

# This block will check to make sure the model of the target board matches the
# model of the board the images came from.
for value in $(grep -v -e '(^ *$|^#)' < "${FILE_NAME}"); do
	declare -a FIELDS
	for part in {1..6}; do
		FIELDS[part]=$(echo "$value" | awk -F, -v part=${part} '{print $part}')
	done
	if [ "${FIELDS[1]}" = 'board_spec' ]; then
		set_board_spec
		if [[ "${FIELDS[2]}" == "${BOARD_SPEC}" ]]; then
			BOARD_MATCH=true
		fi
	fi
done
if [ ${BOARD_MATCH} = false ]; then
	echo "${SCRIPT_NAME}: You are trying to flash images from a board model that does not"
	echo "match the current board you're flashing onto."
	exit 1
fi

Comment out this section in Linux_for_Tegra/tools/backup_restore/nvrestore_partitions.sh and try again. It’s not guaranteed to work but you may give it a try.

@DaveYYY Thanks for another method.

Currently, task is holding. I will share the result of this way later.

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