J4012 Flashing issues

Hi,
I am running into trouble when trying to reflash my board and I was looking for some assistance.
The board I am flashing is a J4012 nvidia jetson board.
I am following this guide: J401 carrier Board Flash JetPack | Seeed Studio Wiki
For reference the host linux machine is another j4012 running 20.04:

orin_nx@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

I believe I have put the system I want to flash into recovery mode as Bus 001 Device 009: ID 0955:7323 NVIDIA Corp. shows up:

orin_nx@ubuntu:~$ lsusb  
Bus 002 Device 005: ID 05e3:0749 Genesys Logic, Inc.  
Bus 002 Device 004: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter  
Bus 002 Device 003: ID 05e3:0626 Genesys Logic, Inc.  
Bus 002 Device 002: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub  
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. Hub  
Bus 001 Device 004: ID 2357:010c TP-Link TL-WN722N v2  
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub  
Bus 001 Device 009: ID 0955:7323 NVIDIA Corp.  
Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I am trying to flash JP5.1.1 onto the system.
I run into a problem at step 4 when actually trying to flash the board. It seems to fail when entering RCM boot.
Here is a snippet:

Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands


 Entering RCM boot

[   0.0681 ] mb1_t234_prod_aligned_sigheader.bin.encrypt filename is from --mb1_bin
[   0.0681 ] psc_bl1_t234_prod_aligned_sigheader.bin.encrypt filename is from --psc_bl1_bin
[   0.0681 ] rcm boot with presigned binaries
[   0.0704 ] tegrarcm_v2 --instance 1-2.1 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Error: Return value 8
Command tegrarcm_v2 --instance 1-2.1 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Cleaning up...

Command used for flashing:

 sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
>   -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \
>   --showlogs --network usb0 p3509-a02+p3767-0000 internal

I have the full output saved but i cant seem to upload a text file and the whole output is too big for me to directly put it in. Here is the part of the end of the output. If you need the whole output please let me know how I can post it.

Using bpmp-dtb concatenated with odmdata in blob for t23x
./tegraflash.py --bl uefi_jetson_with_dtb_sigheader.bin.encrypt --bct br_bct_BR.bct --securedev  --bldtb tegra234-p3767-0000-p3509-a02.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --cmd "rcmboot"  --cfg secureflash.xml --chip 0x23 --mb1_bct mb1_bct_MB1_sigheader.bct.encrypt --mem_bct mem_rcm_sigheader.bct.encrypt --mb1_cold_boot_bct mb1_cold_boot_bct_MB1_sigheader.bct.encrypt --mb1_bin mb1_t234_prod_aligned_sigheader.bin.encrypt --psc_bl1_bin psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --mem_bct_cold_boot mem_coldboot_sigheader.bct.encrypt  --bins "psc_fw pscfw_t234_prod_sigheader.bin.encrypt; mts_mce mce_flash_o10_cr_prod_sigheader.bin.encrypt; mb2_applet applet_t234_sigheader.bin.encrypt; mb2_bootloader mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt; xusb_fw xusb_t234_prod_sigheader.bin.encrypt; dce_fw display-t234-dce_sigheader.bin.encrypt; nvdec nvdec_t234_prod_sigheader.fw.encrypt; bpmp_fw bpmp_t234-TE990M-A1_prod_sigheader.bin.encrypt; bpmp_fw_dtb tegra234-bpmp-3767-0000-a02-3509-a02_with_odm_sigheader.dtb.encrypt; sce_fw camera-rtcpu-sce_sigheader.img.encrypt; rce_fw camera-rtcpu-t234-rce_sigheader.img.encrypt; ape_fw adsp-fw_sigheader.bin.encrypt; spe_fw spe_t234_sigheader.bin.encrypt; tos tos-optee_t234_sigheader.img.encrypt; eks eks_t234_sigheader.img.encrypt; kernel boot.img; kernel_dtb tegra234-p3767-0000-p3509-a02.dtb"    --secondary_gpt_backup  --bct_backup  --boot_chain A
saving flash command in flashcmd.txt

*** no-flash flag enabled. Exiting now... ***

User can run above saved command in factory environment without
providing pkc and sbk keys to flash a device

Example:

    $ cd bootloader
    $ sudo bash ./flashcmd.txt

Save initrd flashing command parameters to /home/orin_nx/Downloads/Linux_for_Tegra/tools/kernel_flash/initrdflashparam.txt
/tmp/tmp.383c8yYZDh /home/orin_nx/Downloads/Linux_for_Tegra
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
/tmp/tmp.383c8yYZDh/initrd /tmp/tmp.383c8yYZDh /home/orin_nx/Downloads/Linux_for_Tegra
56174 blocks
83147 blocks
/tmp/tmp.383c8yYZDh /home/orin_nx/Downloads/Linux_for_Tegra
flashimg0=boot0.img
/home/orin_nx/Downloads/Linux_for_Tegra
Success
Cleaning up...
Finish generating flash package.
/home/orin_nx/Downloads/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --network usb0 --usb-instance 1-2.1 --device-instance 0 --flash-only --external-device nvme0n1p1 -c "tools/kernel_flash/flash_l4t_external.xml" --network usb0 p3509-a02+p3767-0000 internal
**********************************************
*                                            *
*  Step 1: Build the flashing environment    *
*                                            *
**********************************************
Create flash environment 0
/home/orin_nx/Downloads/Linux_for_Tegra/bootloader /home/orin_nx/Downloads/Linux_for_Tegra
/home/orin_nx/Downloads/Linux_for_Tegra
Finish creating flash environment 0.
****************************************************
*                                                  *
*  Step 2: Boot the device with flash initrd image *
*                                                  *
****************************************************
/home/orin_nx/Downloads/Linux_for_Tegra/temp_initrdflash/bootloader0 /home/orin_nx/Downloads/Linux_for_Tegra
./tegraflash.py --bl uefi_jetson_with_dtb_sigheader.bin.encrypt --bct br_bct_BR.bct --securedev  --bldtb tegra234-p3767-0000-p3509-a02.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --cmd "rcmboot"  --cfg secureflash.xml --chip 0x23 --mb1_bct mb1_bct_MB1_sigheader.bct.encrypt --mem_bct mem_rcm_sigheader.bct.encrypt --mb1_cold_boot_bct mb1_cold_boot_bct_MB1_sigheader.bct.encrypt --mb1_bin mb1_t234_prod_aligned_sigheader.bin.encrypt --psc_bl1_bin psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --mem_bct_cold_boot mem_coldboot_sigheader.bct.encrypt  --bins "psc_fw pscfw_t234_prod_sigheader.bin.encrypt; mts_mce mce_flash_o10_cr_prod_sigheader.bin.encrypt; mb2_applet applet_t234_sigheader.bin.encrypt; mb2_bootloader mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt; xusb_fw xusb_t234_prod_sigheader.bin.encrypt; dce_fw display-t234-dce_sigheader.bin.encrypt; nvdec nvdec_t234_prod_sigheader.fw.encrypt; bpmp_fw bpmp_t234-TE990M-A1_prod_sigheader.bin.encrypt; bpmp_fw_dtb tegra234-bpmp-3767-0000-a02-3509-a02_with_odm_sigheader.dtb.encrypt; sce_fw camera-rtcpu-sce_sigheader.img.encrypt; rce_fw camera-rtcpu-t234-rce_sigheader.img.encrypt; ape_fw adsp-fw_sigheader.bin.encrypt; spe_fw spe_t234_sigheader.bin.encrypt; tos tos-optee_t234_sigheader.img.encrypt; eks eks_t234_sigheader.img.encrypt; kernel boot0.img; kernel_dtb tegra234-p3767-0000-p3509-a02.dtb"    --secondary_gpt_backup  --bct_backup  --boot_chain A  --instance 1-2.1
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands


 Entering RCM boot

[   0.0681 ] mb1_t234_prod_aligned_sigheader.bin.encrypt filename is from --mb1_bin
[   0.0681 ] psc_bl1_t234_prod_aligned_sigheader.bin.encrypt filename is from --psc_bl1_bin
[   0.0681 ] rcm boot with presigned binaries
[   0.0704 ] tegrarcm_v2 --instance 1-2.1 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Error: Return value 8
Command tegrarcm_v2 --instance 1-2.1 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
Cleaning up...

I’m unsure what to do to fix this. Any help is appreciated and please let me know if you need more info.
Thank you!

Sorry for the waiting. Do you mean by this statement that you are using the J4012 as a linux host?
You need to use x86 linux Ubuntu20.04 hosts, not arm

That seemed to be the problem! I did not realize it needed to be x86. I recommend specifying that in the guide Flash Jetpack | Seeed Studio Wiki so its more explicit. Thank you for the help! :slight_smile:

1 Like

Thanks for your feedback, we’ll add this section to the wiki later!