Meeting error when I flash the image to the target board (clone a Jetson device and flash)

sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1
error:
Error: Return value 3 ] 000%
Command tegradevflash_v2 --pt flash.xml.bin --create
Failed flashing t186ref.


log.txt (88.2 KB)

Hi,

How did you clone the image and put into the BSP folder?
Is is also backed up from a system running 35.4.1?

Please also dump the log:

I clone image and flash according to Flashing Support — Jetson Linux<br/>Developer Guide 34.1 documentation
I use the following command:

sudo ./flash.sh -r -k APP -G 20231215_backup.img jetson-agx-orin-devkit mmcblk0p1

sudo cp 20231215_backup.img bootloader/system.img

and then,

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

Then I came across the problem I mentioned above.

Yes, I backed up from a system running 35.4.1
I’ll dump the log later.

Btw, if the cloned partition is not the exact byte size of the default, then you might need to use the “-S <size>” parameter. What do you see for “ls -l system.img” from “Linux_for_Tegra/bootloader/”?

Hi,I used ls -l system.img and the output is like this:

-rwxr-xr-x 1 root root 24045334428 12月 18 09:19 system.img

Do you mean to use the following command to flash?

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

That size seems wrong. It isn’t divisible by 1024 (or 4096).

I am assuming that you are cloning the eMMC, and if not, then all of this will be incorrect. After logging in to the Jetson, what do you see from:
sudo blockdev --getsize64 /dev/mmcblk0p1

Generally speaking though, your example -S is correct. Do keep in mind though that I am using the raw clone, and note the sparse clone. You won’t be able to correctly check sizes on a sparse clone. If you have a sparse clone derived from a given raw clone, then you could use the raw clone for measuring the byte sizes, and the sparse clone should match that so far as flash parameters go.

I have installed minicom, but can not find the serial device, also I have powered my jetson agx orin devkit and connected it to my host PC with type-c usb cable.










Use the micro USB port, not either of the two USB-C ports.

How do I know jetson serial device number?

Plug in the micro USB cable and it will show up as /dev/ttyACM0.
I think it’s stated clearly in the tutorial I posted earlier.

The serial device log is in the attachment.
log.txt (39.3 KB)
Can you help me to solve the backup failure?

What do you have in Linux_for_Tegra/bootloader/t186ref/cfg/flash_t234_qspi_sdmmc.xml?
Did you make any changes to it?

I didn’t make any changes.

It reads as follows:

<?xml version="1.0"?>

<!--
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
#                         All rights reserved.
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.
-->

<!-- Nvidia Tegra Partition Layout Version 1.0.0 -->

<partition_layout version="01.00.0000">
    <device type="spi" instance="0" sector_size="512" num_sectors="131072" >
        <partition name="BCT" type="boot_config_table">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="A_mb1" type="mb1_bootloader">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB1FILE </filename>
            <align_boundary> 262144 </align_boundary>
        </partition>
        <partition name="A_psc_bl1" type="psc_bl1">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCBL1FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_MB1_BCT" type="mb1_boot_config_table">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 131072 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_MEM_BCT" type="mem_boot_config_table">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_tsec-fw" type="tsec_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TSECFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_nvdec" type="nvdec" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> NVHOSTNVDEC </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_mb2" type="mb2_bootloader" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB2BLFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_xusb-fw" type="xusb_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> XUSB_FW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_bpmp-fw" type="bpmp_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1572864 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> BPFFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_bpmp-fw-dtb" type="bpmp_fw_dtb" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 4194304 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> BPFDTB_FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_psc-fw" type="psc_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 786432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_mts-mce" type="mts_mce" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MCE_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_sc7" type="WB0">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 196608 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> WB0FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_pscrf" type="psc_rf" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 196608 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCRF_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_mb2rf" type="mb2rf" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 131072 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB2RF_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_cpu-bootloader" type="bootloader_stage2" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 3670016 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TBCDTB-FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_secure-os" type="tos" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 4194304 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TOSFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_smm-fw" type="data" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 2097152 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_eks" type="eks" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> EKSFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_dce-fw" type="dce_fw" oem_sign="true" compress="true" comp_algo="lz4">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 5242880 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> DCE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_spe-fw" type="spe_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 589824 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> SPEFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_rce-fw" type="rce_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> CAMERAFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_adsp-fw" type="ape_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 2097152 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> adsp-fw.bin </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="A_reserved_on_boot" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1376256 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_mb1" type="mb1_bootloader">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB1FILE </filename>
            <align_boundary> 262144 </align_boundary>
        </partition>
        <partition name="B_psc_bl1" type="psc_bl1">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCBL1FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_MB1_BCT" type="mb1_boot_config_table">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 131072 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_MEM_BCT" type="mem_boot_config_table">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_tsec-fw" type="tsec_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TSECFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_nvdec" type="nvdec" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> NVHOSTNVDEC </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_mb2" type="mb2_bootloader" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB2BLFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_xusb-fw" type="xusb_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> XUSB_FW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_bpmp-fw" type="bpmp_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1572864 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> BPFFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_bpmp-fw-dtb" type="bpmp_fw_dtb" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 4194304 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> BPFDTB_FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_psc-fw" type="psc_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 786432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_mts-mce" type="mts_mce" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MCE_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_sc7" type="WB0">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 196608 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> WB0FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_pscrf" type="psc_rf" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 196608 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> PSCRF_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_mb2rf" type="mb2rf" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 131072 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> MB2RF_IMAGE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_cpu-bootloader" type="bootloader_stage2" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 3670016 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TBCDTB-FILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_secure-os" type="tos" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 4194304 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> TOSFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_smm-fw" type="data" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 2097152 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_eks" type="eks" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> EKSFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_dce-fw" type="dce_fw" oem_sign="true" compress="true" comp_algo="lz4">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 5242880 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> DCE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_spe-fw" type="spe_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 589824 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> SPEFILE </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_rce-fw" type="rce_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1048576 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> CAMERAFW </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_adsp-fw" type="ape_fw" oem_sign="true">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 2097152 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> adsp-fw.bin </filename>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="B_reserved_on_boot" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 1376256 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="uefi_variables" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 262144 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="uefi_ftw" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="worm" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <start_location> 0x3F70000 </start_location>
            <size> 196608 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 65536 </align_boundary>
        </partition>
        <partition name="BCT-boot-chain_backup" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <start_location> 0x3FA0000 </start_location>
            <size> 65536 </size>
            <align_boundary> 65536 </align_boundary>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="reserved_partition" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 65536 </size>
            <align_boundary> 65536 </align_boundary>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="secondary_gpt_backup" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 65536 </size>
            <align_boundary> 65536 </align_boundary>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="B_VER" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <start_location> 0x3FD0000 </start_location>
            <size> 65536 </size>
            <align_boundary> 65536 </align_boundary>
            <file_system_attribute> 0 </file_system_attribute>
            <partition_attribute> 0 </partition_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> VERFILE </filename>
        </partition>
        <partition name="A_VER" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 65536 </size>
            <align_boundary> 65536 </align_boundary>
            <file_system_attribute> 0 </file_system_attribute>
            <partition_attribute> 0 </partition_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> VERFILE </filename>
        </partition>
        <partition name="secondary_gpt" type="secondary_gpt">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 0xFFFFFFFFFFFFFFFF </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
    </device>
    <device type="sdmmc_user" instance="3" sector_size="512" num_sectors="124321792" >
        <partition name="master_boot_record" type="protective_master_boot_record">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 512 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="primary_gpt" type="primary_gpt">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 19968 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="A_kernel" id="2" type="kernel">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 134217728 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> LNXFILE </filename>
        </partition>
        <partition name="A_kernel-dtb" type="kernel_dtb">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 786432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> DTB_FILE </filename>
        </partition>
        <partition name="A_reserved_on_user" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 33161216 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="B_kernel" type="kernel">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 134217728 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> LNXFILE </filename>
        </partition>
        <partition name="B_kernel-dtb" type="kernel_dtb">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 786432 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> DTB_FILE </filename>
        </partition>
        <partition name="B_reserved_on_user" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 33161216 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="RECNAME" type="kernel">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> RECSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> RECFILE </filename>
        </partition>
        <partition name="RECDTB-NAME" type="kernel_dtb">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> RECDTB-FILE </filename>
        </partition>
        <partition name="esp" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 67108864 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <filename> ESP_FILE </filename>
            <partition_type_guid> C12A7328-F81F-11D2-BA4B-00A0C93EC93B </partition_type_guid>
            <description> **Required.** EFI system partition with L4T Launcher. </description>
        </partition>
        <partition name="RECNAME_alt" type="kernel">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> RECSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="RECDTB-NAME_alt" type="kernel_dtb">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 524288 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
        <partition name="esp_alt" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 67108864 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Required.** EFI system partition for fail-safe ESP update. </description>
        </partition>
        <partition name="UDA" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 419430400 </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <align_boundary> 16384 </align_boundary>
           <description> **Required.** This partition may be mounted and used to store user
              data. </description>
        </partition>
        <partition name="reserved" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 502792192 </size> <!-- Recalculate the size if RECSIZE changed -->
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
            <description> **Required.** Reserve space in case there is any partition change
              required in the future, for example, adding new partitions or increasing size
              of some partitions. </description>
        </partition>
        <partition name="APP" id="1" type="data">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> APPSIZE </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 0x8 </allocation_attribute>
            <align_boundary> 16384 </align_boundary>
            <percent_reserved> 0 </percent_reserved>
            <unique_guid> APPUUID </unique_guid>
            <filename> APPFILE </filename>
            <description> **Required.** Contains the rootfs. This partition must be assigned
              the "1" for id as it is physically put to the end of the device, so that it
              can be accessed as the fixed known special device `/dev/mmcblk0p1`. </description>
        </partition>
        <partition name="secondary_gpt" type="secondary_gpt">
            <allocation_policy> sequential </allocation_policy>
            <filesystem_type> basic </filesystem_type>
            <size> 0xFFFFFFFFFFFFFFFF </size>
            <file_system_attribute> 0 </file_system_attribute>
            <allocation_attribute> 8 </allocation_attribute>
            <percent_reserved> 0 </percent_reserved>
        </partition>
    </device>
</partition_layout>

Then what do you get with sudo fdisk -l on the device?
Would it make any difference with:

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

instead of just:

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

?

sudo fdisk -l.txt (3.4 KB)

I mean on the Jetson device, not your host PC.

But after I used flash.sh script to flash my device, my jetson device system was gone

Oh, that’s right.
Then can you please flash a new system into it, and check what I advised earlier?
Would be better if you can also attach the flashing log.

Indeed, this is the new system I flashed because I was facing issues with nv_tegra_release version # R34.1.1 that couldn’t be resolved (Failed to sparse the raw to img due to the size of system.img.raw is not mulple of 4096). Therefore, I re-flashed the new system based on nv_tegra_release version # R35.4.1.

This is what we have on one of our running system:

Disk /dev/mmcblk0: 59.29 GiB, 63652757504 bytes, 124321792 sectors
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: 10662CD9-133F-475E-AEC6-084D12296D1D

Device            Start       End   Sectors   Size Type
/dev/mmcblk0p1  3050048 124320319 121270272  57.8G Microsoft basic data
/dev/mmcblk0p2       40    262183    262144   128M Microsoft basic data
/dev/mmcblk0p3   262184    263719      1536   768K Microsoft basic data
/dev/mmcblk0p4   263720    328487     64768  31.6M Microsoft basic data
/dev/mmcblk0p5   328488    590631    262144   128M Microsoft basic data
/dev/mmcblk0p6   590632    592167      1536   768K Microsoft basic data
/dev/mmcblk0p7   592168    656935     64768  31.6M Microsoft basic data
/dev/mmcblk0p8   656936    820775    163840    80M Microsoft basic data
/dev/mmcblk0p9   820776    821799      1024   512K Microsoft basic data
/dev/mmcblk0p10  821800    952871    131072    64M EFI System
/dev/mmcblk0p11  952872   1116711    163840    80M Microsoft basic data
/dev/mmcblk0p12 1116712   1117735      1024   512K Microsoft basic data
/dev/mmcblk0p13 1117736   1248807    131072    64M Microsoft basic data
/dev/mmcblk0p14 1248832   2068031    819200   400M Microsoft basic data
/dev/mmcblk0p15 2068032   3050047    982016 479.5M Microsoft basic data

, and as you can see, 121270272 is a multiple of 4096, so that’s way I need you to provide such information.