Flashing image to the SD card is failing

Hello Team.

I have Jetson Orin Nano CPU module and Jetson Orin Nano reference carrier board.
NVIDIA Jetson Linux 35.4.1

I want to flash image from sources to SD card, and I’ve found two methods from developer guide.

  1. Here is an example of flashing an SD card on the Jetson Orin Nano Developer Kit:
    sudo ./flash.sh jetson-orin-nano-devkit internal

This method fails:

[ 14.6251 ] MB2 version 01.00.0000
[ 14.7261 ] Flashing the device
[ 14.7313 ] tegraparser_v2 --storageinfo storage_info.bin --generategpt --pt flash.xml.bin
[ 14.7349 ] gpt_secondary_3_0.bin:
[ 14.7370 ] partition_id partition_name StartingLba EndingLba
[ 14.7382 ] 1 BCT 0 2047
[ 14.7400 ] 2 A_mb1 2048 3071
[ 14.7414 ] 3 A_psc_bl1 3072 3583
[ 14.7428 ] 4 A_MB1_BCT 3584 3839
[ 14.7448 ] 5 A_MEM_BCT 3840 4351
[ 14.7464 ] 6 A_tsec-fw 4352 6399
[ 14.7470 ] 7 A_nvdec 6400 8447
[ 14.7471 ] 8 A_mb2 8448 9471
[ 14.7471 ] 9 A_xusb-fw 9472 9983
[ 14.7471 ] 10 A_bpmp-fw 9984 13055
[ 14.7471 ] 11 A_bpmp-fw-dtb 13056 21247
[ 14.7471 ] 12 A_psc-fw 21248 22783
[ 14.7472 ] 13 A_mts-mce 22784 23807
[ 14.7472 ] 14 A_sc7 23808 24191
[ 14.7473 ] 15 A_pscrf 24192 24575
[ 14.7473 ] 16 A_mb2rf 24576 24831
[ 14.7473 ] 17 A_cpu-bootloader 24832 31999
[ 14.7473 ] 18 A_secure-os 32000 40191
[ 14.7474 ] 19 A_smm-fw 40192 44287
[ 14.7474 ] 20 A_eks 44288 44799
[ 14.7474 ] 21 A_dce-fw 44800 55039
[ 14.7474 ] 22 A_spe-fw 55040 56191
[ 14.7475 ] 23 A_rce-fw 56192 58239
[ 14.7475 ] 24 A_adsp-fw 58240 62335
[ 14.7475 ] 25 A_reserved_on_boot 62336 65023
[ 14.7476 ] 26 B_mb1 65024 66047
[ 14.7476 ] 27 B_psc_bl1 66048 66559
[ 14.7476 ] 28 B_MB1_BCT 66560 66815
[ 14.7476 ] 29 B_MEM_BCT 66816 67327
[ 14.7477 ] 30 B_tsec-fw 67328 69375
[ 14.7477 ] 31 B_nvdec 69376 71423
[ 14.7477 ] 32 B_mb2 71424 72447
[ 14.7477 ] 33 B_xusb-fw 72448 72959
[ 14.7478 ] 34 B_bpmp-fw 72960 76031
[ 14.7478 ] 35 B_bpmp-fw-dtb 76032 84223
[ 14.7478 ] 36 B_psc-fw 84224 85759
[ 14.7478 ] 37 B_mts-mce 85760 86783
[ 14.7479 ] 38 B_sc7 86784 87167
[ 14.7479 ] 39 B_pscrf 87168 87551
[ 14.7479 ] 40 B_mb2rf 87552 87807
[ 14.7480 ] 41 B_cpu-bootloader 87808 94975
[ 14.7480 ] 42 B_secure-os 94976 103167
[ 14.7480 ] 43 B_smm-fw 103168 107263
[ 14.7480 ] 44 B_eks 107264 107775
[ 14.7480 ] 45 B_dce-fw 107776 118015
[ 14.7481 ] 46 B_spe-fw 118016 119167
[ 14.7481 ] 47 B_rce-fw 119168 121215
[ 14.7481 ] 48 B_adsp-fw 121216 125311
[ 14.7481 ] 49 B_reserved_on_boot 125312 127999
[ 14.7481 ] 50 uefi_variables 128000 128511
[ 14.7482 ] 51 uefi_ftw 128512 129535
[ 14.7482 ] 52 worm 129920 130303
[ 14.7482 ] 53 BCT-boot-chain_backup 130304 130431
[ 14.7482 ] 54 reserved_partition 130432 130559
[ 14.7482 ] 55 secondary_gpt_backup 130560 130687
[ 14.7483 ] 56 B_VER 130688 130815
[ 14.7483 ] 57 A_VER 130816 130943
[ 14.7483 ] End sector for APP, expected at: 60751838, actual: 0
[ 14.7483 ]
Error: Return value 4
Command tegraparser_v2 --storageinfo storage_info.bin --generategpt --pt flash.xml.bin
Failed flashing t186ref.

  1. Jetson Orin Nano Developer Kit (SD card):
    sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1
    -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml”
    –showlogs --network usb0 jetson-orin-nano-devkit internal

This method fails too:

Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for device to expose ssh …RTNETLINK answers: File exists
RTNETLINK answers: File exists
…RTNETLINK answers: File exists
RTNETLINK answers: File exists
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: Starting to create gpt for emmc
Active index file is /mnt/internal/flash.idx
Number of lines is 58
max_index=57
[ 4]: l4t_flash_from_kernel: Successfully create gpt for emmc
[ 4]: l4t_flash_from_kernel: Starting to create gpt for external device
Active index file is /mnt/external/flash.idx
Number of lines is 17
max_index=16
writing item=1, 9:0:primary_gpt, 512, 19968, gpt_primary_9_0.bin, 16896, fixed--0, fe748843591648f5359fec568f4b4e2450b4c36f
Writing primary_gpt partition with gpt_primary_9_0.bin
Offset is not aligned to K Bytes, no optimization is applied
dd if=/mnt/external/gpt_primary_9_0.bin of=/dev/mmcblk1 bs=1 skip=0 seek=512 count=16896
16896+0 records in
16896+0 records out
16896 bytes (17 kB, 16 KiB) copied, 0.0577961 s, 292 kB/s
Writing primary_gpt partition done
Error: Invalid argument during seek for read on /dev/mmcblk1
[ 18]: l4t_flash_from_kernel: Error: partprobe failed. This indicates that:

  • the xml indicates the gpt is larger than the device storage
  • the xml might be invalid
  • the device might have a problem.
    Please make correction.
    Flash failure
    Cleaning up…

Why these two methods from developer guide don’t work, and what is solution for writing image to the SD card?

How large is the SD card?

Size of SD card is 32GB.

Get a 64GB or larger one. We don’t support 32GB.

Thank you for hint.

I took 64GB SD card.

This method ( sudo ./flash.sh jetson-orin-nano-devkit internal) works.

But another method fails.
I run this command from developer guide:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1
-c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml”
–showlogs --network usb0 jetson-orin-nano-devkit internal

And get such error

In general, I can flash image by previous method, but for my general knowledge, could you advise, why does this method fail?

P.S. In developer guide, it is not mentioned, that SD card should be 64GB or larger.

The USB device mode did not come up, so maybe some issue with either the USB cable or the port.

I noticed ending in a bash shell. The device was never able to find the root filesystem, so the target cannot boot (USB would not have succeeded). Note that the internal method looks for rootfs differently than does the initrd flash. The initrd would not have had the correct parameters, which in turn might be part of the flash process. It could also be something like lacking the driver to the external device in the boot stages (that’s just a contrived example, but it points out that things must be available in boot stage, and sometimes the initrd is the adapter, and that things like drivers can either be directly in boot stages, or in the initrd).

1 Like

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