Failed Assert during Boot (Post fuse burn)

Hello,

I’m working on implementing a secure boot environment on a Orin Nano and Orin NX, even tho I’m currently just testing on a Nano board.

To explain my setup first, I have the Nano with both an SD and NVMe as storage options. I’ve primarily flashed the SD card using the SDK manager, and the NVMe with using the l4t_flash_initrd.sh script. Both using the same Jetpack version (r36.4) and had no issues, but after I burn the SBK and Secure Boot Info I am unable to get a complete boot, instead it halts here:

��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 
E/TC:?? 00 jetson_user_key_pta_uefi_vars_auth:984 UEFI variable auth key not set ! 
E/TC:?? 00 stmm_handle_variable_authentication:894 Failed to get signed CMAC ffff0008 

ASSERT [FvbNorFlashStandaloneMm] /out/nvidia/optee_ftpm.t234-uefi/StandaloneMmOptee_RELEASE/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/VarIntCheck.c(932): ((BOOLEAN)(0==1)) 

I’ve checked similar reports (with the same error) but they seem related to UEFI updates and they don’t seem to be related to my specific process. Even if I try to flash it again (including the SBK and hash as arguments) I can’t make it work since the flashing process stops due to a “USB timeout”.

Commands used:

Flashing

sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
 --no-flash \
 --network usb0 \
 --external-device nvme0n1p1 \
 -c ./tools/kernel_flash/flash_l4t_nvme.xml \
 --massflash 1 \
 --external-only \
 -u keys/oem_rsa_priv.pem \ 
 -v keys/sbk.key  \
 --showlogs \
 --keep jetson-orin-nano-devkit external
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --showlogs

Fusing

sudo ./fskp_fuseburn.py -b -f $L4T/keys/fuse_config_nano.xml -i 63 --key-exp $L4T/keys/fskp_ak.bin $L4T/keys/fskp_ek.bin --fskpcfg $L4T/keys/fskp_conf.txt -g out/ -c 0x23 -B $L4T/custom-carrier.conf --board-spec $L4T/keys/orinnano-board-spec.txt -v 
sudo ./fskp_fuseburn.py -b -P ./out -c 0x23 -B $L4T/custom-carrier.conf --board-spec $L4T/keys/orinnano-board-spec.txt -v

Thank you.

hello daniel.rojas.m,

let me double check the fuse variables, please share the fuse.xml you’re used for fuse burning. you may omit the key content for security concerns.
besides.. please execute flash script to have fuse read, let’s double check the fuse you’ve burnt onto this module.
$ sudo ./flash.sh --read-info -u <pkc> -v <sbk> <target_conf> <rootdev>

I’ve some doubts about your flash commands, since it’s bootloader secure boot, you’ll need to flash QSPI which is belong to the internal rootfs device.
just an FYI,
here’re flash commands I used for image flashing onto SBKPKC fused Orin module.
$ 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/generic/cfg/flash_t234_qspi.xml" -u rsa_priv-3k.pem -v sbk.key --showlogs --network usb0 jetson-orin-nano-devkit internal
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only -u rsa_priv-3k.pem -v sbk.key jetson-agx-orin-devkit internal

Hello @JerryChang,

This is our fuse.xml file

<genericfuse MagicId="0x45535546" version="1.0.0">
        <fuse name="PublicKeyHash" size="64" value="0xdc6632e495c7976659a94668a98d6ba7e22a2d9438a555ec64c0c1cc59e533067bfe64f454c1f30c63ad7627fb0cfa2f556aff45818254387016745ccf7XXXXX"/>
        <fuse name="SecureBootKey" size="32" value="0xd69cf4cf25b77d7377165f283612a0f7ee84741f5e7abc313a2ddf805b7XXXXX"/>
        <fuse name="BootSecurityInfo" size="4" value="0x3e0"/>
        <fuse name="OdmId" size="8" value="0x123456789abcdef0"/>
</genericfuse>

If I try to read the fuses with your command I get this:

###############################################################################
# L4T BSP Information:
# R36 , REVISION: 4.4
# User release: 0.0
###############################################################################
ECID is 0xA0012344705E020040000000110280C0
# Target Board Information:
# Name: jetson-orin-nano-devkit, Board Family: generic, SoC: Tegra 234, 
# OpMode: production, Boot Authentication: NS, 
# Disk encryption: disabled ,
###############################################################################
Error: either RSA key file and/or SBK key file are provided for none SBK and PKC protected target board.

Instead, if I just remove the -v/-u arguments I can read them:

==== Fuse Info (/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/fuse_t234.bin) ====
PublicKeyHash: dc6632e495c7976659a94668a98d6ba7e22a2d9438a555ec64c0c1cc59e533067bfe64f454c1f30c63ad7627fb0cfa2f556aff45818254387016745ccf7XXXXX
PkcPubkeyHash1: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
PkcPubkeyHash2: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
BootSecurityInfo: 000003e0
ArmJtagDisable: 00000000
SecurityMode: 00000000
SwReserved: 00000000
DebugAuthentication: 00000000
OdmInfo: 00000000
OdmId: 123456789abcdef0
OdmLock: 00000000
ReservedOdm0: 00000000
ReservedOdm1: 00000000
ReservedOdm2: 00000000
ReservedOdm3: 00000000
ReservedOdm4: 00000000
ReservedOdm5: 00000000
ReservedOdm6: 00000000
ReservedOdm7: 00000000
Sku: 000000d5
Uid: c08002110000004000025e7004000000
OptEmcDisable: 0000000c

hello daniel.rojas.m,

here’s the problem.

FUSE_BOOT_SECURITY_INFO_0 is crucial fuse variable, it’s hardware for checking this to understand the secureboot authentication scheme.
please refer to Jetson Orin Fuse Specification.
let me re-cap as below..

FUSE_BOOT_SECURITY_INFO_0

Bits interpreted by boot software with following mapping:
Bits [2:0] mapped to Secure Boot Authentication Scheme,
where:
000b: SHA2-512 Hash (not recommended)
001b: 3072-bit RSA
010b: ECDSA P-256 Curve
011b: ECDSA P-521-Curve
100b: Ed25519
101b:XMSS – no Pre Hashing
Bit [3] secure boot encryption scheme (SBK) enable
...

hence..
you must program bit[2:0] according to your PKC key types,
you must enable bit[3] due to you’ve SBK keys fused onto your module.

please refer to Burn Fuses with the Fuse Configuration file.
let’s try burn the board again with additional fuse variable to resolve it.
please do bitwise logically OR with your BootSecurityInfo and 0x3E0.
for instance,

<genericfuse MagicId="0x45535546" version="1.0.0">
        <fuse name="BootSecurityInfo" size="4" value="0xXXX"/>
</genericfuse>

note,
you should omit PKC/SBK key to refuse this target since this target now recognize as non-secure borad.
i.e. $ sudo ./odmfuse.sh -X <fuse_config> -i 0x23 <target_config>

Hello Jerry,

Thank you for the pointer, it does help a lot. I fused the Boot Security Info value again enabling both SBK and RSA 3K thus it changed as 3e0 → 3e9. After that, It behaves differently; now it asks me to include the PEM and SBK values when reading the fuses:

$ sudo ./flash.sh --read-info jetson-orin-nano-devkit external
###############################################################################
# L4T BSP Information:
# R36 , REVISION: 4.4
# User release: 0.0
###############################################################################
ECID is 0xA9012344705E020040000000110280C0
# Target Board Information:
# Name: jetson-orin-nano-devkit, Board Family: generic, SoC: Tegra 234, 
# OpMode: production, Boot Authentication: SBKPKC, 
# Disk encryption: disabled ,
###############################################################################
Error: Either RSA key file and/or SBK key file is not provided for SBK and PKC protected target board.

After I include them:

$ sudo ./flash.sh --read-info -u keys/oem_rsa_priv.pem -v keys/sbk.key jetson-orin-nano-devkit external
###############################################################################
# L4T BSP Information:
# R36 , REVISION: 4.4
# User release: 0.0
###############################################################################
ECID is 0xA9012344705E020040000000110280C0
# Target Board Information:
# Name: jetson-orin-nano-devkit, Board Family: generic, SoC: Tegra 234, 
# OpMode: production, Boot Authentication: SBKPKC, 
# Disk encryption: disabled ,
###############################################################################
copying device_config(/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-device-p3767-0000.dts)... done.
copying misc_config(/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-misc-p3767-0000.dts)... done.
copying emc_fuse_dev_params(/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-br-bct-diag-boot.dts)... done.
copying minratchet_config(/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-ratchet-p3767-0000.dts)... done.
Existing emcfuse(/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/fuse_t234.xml) reused.
./tegraflash.py --chip "0x23" --applet "/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/mb1_t234_prod.bin" --skipuid --cfg readinfo_t234_min_prod.xml --dev_params tegra234-br-bct-diag-boot.dts --device_config tegra234-mb1-bct-device-p3767-0000.dts --misc_config tegra234-mb1-bct-misc-p3767-0000.dts --bins "mb2_applet applet_t234.bin" --key "/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/oem_rsa_priv.pem" --encrypt_key "/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/sbk.key" --minratchet_config tegra234-mb1-bct-ratchet-p3767-0000.dts --cmd "readfuses fuse_t234.bin fuse_t234.xml; dump eeprom cvm cvm.bin; dump try_custinfo custinfo_out.bin; reboot recovery" 
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.0118 ] Reading fuses
[   0.0138 ] tegrasign_v3.py --key /home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/oem_rsa_priv.pem --getmode mode.txt
[   0.0172 ] Key size is 512 bytes
[   0.0181 ] WARNING: Can't generate ECKey from EVPKey
[   0.0191 ] ERROR: /home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/oem_rsa_priv.pem key not match ED25519 key type
[   0.0191 ] Warning: /home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/oem_rsa_priv.pem is not valid ed25519 key in Open SSL format
[   0.0191 ] Warning: Can not extract key from /home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/keys/oem_rsa_priv.pem
[   0.0192 ] Invalid key format
[   0.0192 ] ********* Error. Quitting. *********
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (2.2.3) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "./tegraflash.py", line 1462, in <module>
    tegraflash_run_commands()
  File "./tegraflash.py", line 1279, in tegraflash_run_commands
    interpreter.onecmd(command)
  File "/usr/lib/python3.8/cmd.py", line 217, in onecmd
    return func(arg)
  File "./tegraflash.py", line 995, in do_readfuses
    self.chip_inst.tegraflash_readfuses(exports, args)
  File "/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 2511, in tegraflash_readfuses
    self.tegraflash_get_key_mode()
  File "/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py", line 3535, in tegraflash_get_key_mode
    with open('mode.txt') as mode_file:
FileNotFoundError: [Errno 2] No such file or directory: 'mode.txt'
Reading board information failed.

Additionally, I tried booting the board normally but I don’t see the fan moving and no serial log either.

hello daniel.rojas.m,

let me double check what’s your PKC key types?
it should be 3072-bit RSA since you’ve BOOT_SECURITY_INFO[2:0]=001b, right?

the follow code show the key mismatch.

please double check you’ve using the identical key for fuse reading and image flashing.

Hello Jerry,

I think that’s definitely a huge part of the issue. I verified and the key we were burning is a RSA 4K not 3K. Regardless, I tried on another board with a confirmed RSA 3k key. This are the fuses:

==== Fuse Info (/home/drojas/nvidia/nvidia_sdk/JetPack_6.2.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/fuse_t234.bin) ====
PublicKeyHash: 39ee05941bf061220d56a682616ebf44c8a47d24e38e797ffd47de2c6462c194744e93e9e0192b22e49ee2f4ce2457e8fac6bfaee30c004262c7c13aa9323080
PkcPubkeyHash1: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
PkcPubkeyHash2: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
BootSecurityInfo: 000003e9
ArmJtagDisable: 00000000
SecurityMode: 00000000
SwReserved: 00000000
DebugAuthentication: 00000000
OdmInfo: 00000000
OdmId: 0000000000000000
OdmLock: 00000000
ReservedOdm0: 00000000
ReservedOdm1: 00000000
ReservedOdm2: 00000000
ReservedOdm3: 00000000
ReservedOdm4: 00000000
ReservedOdm5: 00000000
ReservedOdm6: 00000000
ReservedOdm7: 00000000
Sku: 000000d5
Uid: c08100160000008823015e7004000000
OptEmcDisable: 0000000c

and got to flash fully:

00:01:44.653 - Info: Successfully flashed the external device.

after a while it reboots the target

0:04:19.013 - Info: Successfully flashed the QSPI.
00:04:19.018 - Info: Flashing success
Flash is successful
Reboot device
Cleaning up...
Log is saved to Linux_for_Tegra/initrdlog/flash_3-1_0_20260427-113140.log

and here I have another issue: The fan isn’t working, there is no serial output or image on the display.

you should have separate forum thread for tracking.

all right, it looks there’s no way back.
please aware that fuse burning operations are high-risk because they cannot be reversed.

Hello @JerryChang,

I went back and tried a clean setup with a different board (Orin NX) with a correct PKC, SBK and Secure Boot Info:

This is my fuse config:

<genericfuse MagicId="0x45535546" version="1.0.0">
	<fuse name="PublicKeyHash" size="64" value="0x70de3e0a4f1f323560193ce9365928a175158512c559aa2b877f91ae5dcb5a97ef85d0fad91f136ae6bfbd85bc80501c41c7de046171394b4d51c33cdf1f4b3a"/>
	<fuse name="SecureBootKey" size="32" value="0x5a0294d31807003f82b34581d98740c877573a2351f562ff491b01ae7162fc0b"/>
	<fuse name="BootSecurityInfo" size="4" value="0x3e9"/>
	<fuse name="OemK1" size="32" value="0x326bb285bf192ccc1bd77495c4fe32c78504dea9c1840ed8988e75cec63ca6b1"/>
	<fuse name="OdmId" size="8" value="0x123456789abcdef0"/>
</genericfuse>

Then I flash internal and external targets, including secure uefi keys:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --showlogs -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --uefi-keys clean-keys/uefi_keys/uefi_keys.conf  --no-flash --network usb0 -v clean-keys/sbk/sbk.key -u clean-keys/pkc/rsa_priv_pkc.pem  jetson-orin-nano-devkit internal

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --network usb0 --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --external-only --showlogs --keep --append -u clean-keys/pkc/rsa_priv_pkc.pem -v clean-keys/sbk/sbk.key jetson-orin-nano-devkit external

When it is done, the target reboots and stops at the same assert error:

��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
E/TC:?? 00 jetson_user_key_pta_uefi_vars_auth:984 UEFI variable auth key not set !
E/TC:?? 00 stmm_handle_variable_authentication:894 Failed to get signed CMAC ffff0008

ASSERT [FvbNorFlashStandaloneMm] /out/nvidia/optee_ftpm.t234-uefi/StandaloneMmOptee_RELEASE/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/VarIntCheck.c(932): ((BOOLEAN)(0==1))

Initially both the Boot Info and PKC were incorrect, yet now that they are fixed the error persists.

Thanks.

hello daniel.rojas.m,

it’s not PKC/SBK issue, it’s passed MB1/MB2 but an error with UEFI.

let’s have a new thread for following up.