ERROR: might be timeout in USB write. with secure boot

I’m trying to flash my orin nx 8Gb with L4T 36.4.3.

sudo tools/kernel_flash/l4t_initrd_flash.sh \
     -u ecp521.pem \
     -v sbk.key \
jetson-orin-nano-devkit-nvme nvme0n1p1

and I get

 Entering RCM boot

[   0.0186 ] mb1_t234_prod_aligned_sigheader_encrypt.bin.signed filename is from --mb1_bin
[   0.0186 ] psc_bl1_t234_prod_aligned_sigheader_encrypt.bin.signed filename is from --psc_bl1_bin
[   0.0186 ] rcm boot with presigned binaries
[   0.0189 ] tegrarcm_v2 --instance 1-8 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader_encrypt.bin.signed --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader_encrypt.bin.signed --download bct_mb1 mb1_bct_MB1_sigheader_encrypt.bct.signed
[   0.0191 ] BR_CID: 0xE9012344705DF15E200000000A008240
[   0.0273 ] Sending bct_br
[   0.0345 ] Sending mb1
[   0.0349 ] ERROR: might be timeout in USB write.

i’m generating my pem/public key with

openssl ecparam -name secp521r1 -genkey -noout -out ecp521.pem
PKCS_KEY_XML_HASH=$(./tegrasign_v3.py \
        --pubkeyhash ecp521.pubkey ecp521.hash \
        --key ecp521.pem | \
        grep "tegra-fuse format" | awk '{print $NF}')
echo "PublicKeyHash to paste into fuse.xml: $PKCS_KEY_XML_HASH"

and my sbk.key with

SBK_0=$(openssl rand -hex 4)
SBK_1=$(openssl rand -hex 4)
SBK_2=$(openssl rand -hex 4)
SBK_3=$(openssl rand -hex 4)
SBK_4=$(openssl rand -hex 4)
SBK_5=$(openssl rand -hex 4)
SBK_6=$(openssl rand -hex 4)
SBK_7=$(openssl rand -hex 4)
export SBK_KEY=$(echo "0x${SBK_0} 0x${SBK_1} 0x${SBK_2} 0x${SBK_3} 0x${SBK_4} 0x${SBK_5} 0x${SBK_6} 0x${SBK_7}")
SBK_KEY_XML="0x${SBK_0}${SBK_1}${SBK_2}${SBK_3}${SBK_4}${SBK_5}${SBK_6}${SBK_7}"
echo "${SBK_KEY}" > sbk.key

and my fuse.xml with

echo "<genericfuse MagicId=\"0x45535546\" version=\"1.0.0\">" > fuse.xml
echo "  <fuse name=\"PublicKeyHash\" size=\"64\" value=\"${PKCS_KEY_XML_HASH}\"/>" >> fuse.xml
echo "  <fuse name=\"SecureBootKey\" size=\"32\" value=\"${SBK_KEY_XML}\"/>" >> fuse.xml
echo "  <fuse name=\"BootSecurityInfo\" size=\"4\" value=\"0x209\"/>" >> fuse.xml
echo "  <fuse name=\"SecurityMode\" size=\"4\" value=\"0x1\"/>" >> fuse.xml
echo "</genericfuse>" >> fuse.xml

hello bike_works,

did you try below to disable autosuspend on host PC?
for instance,
$ sudo -s
$ echo -1 > /sys/module/usbcore/parameters/autosuspend

BTW,
please also refer to below, which we’ve confirmed by burning fuses (flash and boot-up successfully) with Orin-NX-8GB.
here’re our steps for your reference,
(1) $ sudo ./odmfuse.sh -X fuses.xml -i 0x23 jetson-orin-nano-devkit
(2) $ sudo ADDITIONAL_DTB_OVERLAY_OPT="BootOrderNvme.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" -u rsa_priv-3k.pem -v sbk.key --showlogs --network usb0 jetson-orin-nano-devkit internal
(3) $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only -u rsa_priv-3k.pem -v sbk.key jetson-agx-orin-devkit internal

you may refer to developer guide, To Flash the Jetson Developer Kit Operating Software for the sample flash command-line.

@JerryChang thanks for the notes. I still get the same timeout. The autosuspend was already set. I don’t think it’s actually a USB issue as flashing board works fine before I burn fuses and try to flash with keys.

I see you are using rsa for your private key instead of ecp. Can you show me how you are generating your fuses.xml file and your sbk.key and rsa_priv-3k.pem? I feel I must be creating the keys incorrectly.

hello bike_works,

you may see-also developer guide, Generate A PKC Key Pair, and Prepare an SBK key.