I am working on secure boot . After burning the fuses, I built the image offline using --no-flash option. However, during flashing, it failed with the following error message:
I/TC: Non-secure external DT found
I/TC: OP-TEE version: 4.2 (gcc version 13.3.0 (GCC)) #1 Sun Jan 5 04:49:34 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: Test OEM keys are being used. This is insecure for shipping products!
E/TC:00 00 ekb_extraction_process:404 Tried all EKB_RKs but still can't extract the EKB image.
E/TC:00 00 jetson_user_key_pta_init:1154 jetson_user_key_pta_init: Failed (ffff000f).
E/TC:00 00 call_initcalls:43 Initcall __text_start + 0x0016b110 failed
I/TC: Primary CPU switching to normal world boot
��
Jetson UEFI firmware (version v36.4.0 built on 2024-10-01T15:28:28+00:00)
��I/TC: Reserved shared memory is disabled
I/TC: Dynamic shared memory is enabled
I/TC: Normal World virtualization support is disabled
I/TC: Asynchronous notifications are disabled
I/TC: WARNING: Test UEFI variable auth key is being used !
I/TC: WARNING: UEFI variable protection is not fully enabled !
��
��[ 5.875499] Camera-FW on t234-rce-safe started
TCU early console enabled.
��
Here’s what I did
Burn fuses on my AGX Orin using odmfuse.sh -X fuse_config.xml -i 0x23 jetson-agx-orin-devkit
Run build with --no-flash option and provided signing private key and SBK using -u and -v option respectively.
Run following command to flash
./tegraflash.py --bl uefi_jetson_with_dtb_aligned_blob_w_bin_sigheader_encrypt.bin.signed --bct br_bct_BR.bct --applet rcm_2_signed.rcm --applet_softfuse rcm_1_signed.rcm --cmd "secureflash;reboot" --cfg secureflash.xml --chip 0x23 --mb1_bct mb1_bct_MB1_sigheader_encrypt.bct.signed --mem_bct mem_rcm_sigheader_encrypt.bct.signed --mb1_cold_boot_bct mb1_cold_boot_bct_MB1_sigheader_encrypt.bct.signed --mb1_bin mb1_t234_prod_aligned_sigheader_encrypt.bin.signed --psc_bl1_bin psc_bl1_t234_prod_aligned_sigheader_encrypt.bin.signed --mem_bct_cold_boot mem_coldboot_aligned_sigheader_encrypt.bct.signed --bins "psc_fw pscfw_t234_prod_sigheader_encrypt.bin.signed; mts_mce mce_flash_o10_cr_prod_sigheader_encrypt.bin.signed; mb2_applet applet_t234_sigheader_encrypt.bin.signed; mb2_bootloader mb2_t234_with_mb2_bct_MB2_sigheader_encrypt.bin.signed; xusb_fw xusb_t234_prod_sigheader_encrypt.bin.signed; pva_fw nvpva_020_sigheader_encrypt.fw.signed; dce_fw display-t234-dce_sigheader_encrypt.bin.signed; nvdec nvdec_t234_prod_sigheader_encrypt.fw.signed; bpmp_fw bpmp_t234-TE990M-A1_prod_sigheader_encrypt.bin.signed; bpmp_fw_dtb tegra234-bpmp-3701-0005-3737-0000_with_odm_sigheader_encrypt.dtb.signed; rce_fw camera-rtcpu-t234-rce_sigheader_encrypt.img.signed; ape_fw adsp-fw_sigheader_encrypt.bin.signed; spe_fw spe_t234_sigheader_encrypt.bin.signed; tsec_fw tsec_t234_sigheader_encrypt.bin.signed; tos tos-optee_t234_sigheader_encrypt.img.signed; eks eks_sigheader_encrypt.img.signed" --bct_backup
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
[ 0.0985 ] Parsing partition layout
[ 0.1044 ] tegraparser_v2 --pt secureflash.xml.tmp
[ 0.1099 ] Parsing partition layout
[ 0.1114 ] tegraparser_v2 --pt secureflash.xml.tmp
[ 0.1134 ] mb1_t234_prod_aligned_sigheader_encrypt.bin.signed filename is from --mb1_bin
[ 0.1134 ] psc_bl1_t234_prod_aligned_sigheader_encrypt.bin.signed filename is from --psc_bl1_bin
[ 0.1134 ] Boot Rom communication
[ 0.1142 ] tegrarcm_v2 --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.1158 ] BR_CID: 0x89012344705DE7E08400000015010280
[ 0.1167 ] Sending bct_br
[ 0.1169 ] Sending mb1
[ 0.1221 ] ERROR: might be timeout in USB write.
[ 0.1221 ]
Error: Return value 3
Command tegrarcm_v2 --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
The error seems to indicate that something’s wrong with the EKB image? So I tried regenerating the EKB again and flashing but still getting the same error.
Another weird thing I noticed is that the EKB image seems to be non-deterministic (as in given the exact same inputs, the output generated is different every time and I confirmed this by comparing the hashes).
is the target bootable? please try running the script file to read fuses for confirmation.
for instance $ sudo nv_fuse_read.sh
please see-also Jetson AGX Orin FAQ to disable autosuspend on host PC regrading to this failure, ERROR: might be timeout in USB write.
for instance, $ sudo -s $ echo -1 > /sys/module/usbcore/parameters/autosuspend
Because the PKC/SBK fuses have been burned, I had to pass in the keys when running odmfuse.shand surprisingly it failed as well. The device rebooted and spitted out similar error messages as before.
Any suggestions on how I might recover the device? The device still boots up but seems like I can’t do any flashing.
��NOTICE: BL31: v2.8(release):l4t-r36.4.0
NOTICE: BL31: Built : 2025-01-05 04:05:10
I/TC:
I/TC: Non-secure external DT found
I/TC: OP-TEE version: 4.2 (gcc version 13.3.0 (GCC)) #1 Sun Jan 5 04:49:34 UTC 2025 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: Test OEM keys are being used. This is insecure for shipping products!
E/TC:00 00 ekb_extraction_process:404 Tried all EKB_RKs but still can't extract the EKB image.
E/TC:00 00 jetson_user_key_pta_init:1154 jetson_user_key_pta_init: Failed (ffff000f).
E/TC:00 00 call_initcalls:43 Initcall __text_start + 0x0016b110 failed
I/TC: Primary CPU switching to normal world boot
��
I think this line is because of I do not have UEFI secure boot enabled yet. I was able to flash/boot into new OS after setting bit 9 in FUSE_BOOT_SECURITY_INFO_0