We are experiencing an issue when attempting to revoke a PKC key on our Orin Nano custom carrier board. We are using meta-tegra (L4T R36.5.0) with Yocto 5.
The br-bct.dts and br-bct-b are configured as shown below:
The keys pkc.pem, pkc1.pem, and pkc2.pem were previously burned into the fuses. The fuse configuration file used is shown below:
<genericfuse MagicId="0x45535546" version="0.1.1">
<fuse name="PublicKeyHash" size="64" value="0x---"/>
<fuse name="PkcPubkeyHash1" size="64" value="0x---"/>
<fuse name="PkcPubkeyHash2" size="64" value="0x---"/>
<fuse name="SecureBootKey" size="32" value="0x---"/>
<fuse name="OemK1" size="32" value="0x---"/>
<fuse name="OemK2" size="32" value="0x---"/>
<fuse name="OptInEnable" size="4" value="0x1"/>
<fuse name="BootSecurityInfo"size="4" value="0x3e9"/>
<fuse name="SecurityMode" size="4" value="0x1"/>
</genericfuse>
We built a tegraflash image with the modified br-bct and flashed it successfully. However, when running nv_fuse_read.sh, the output does not reflect the expected PKC revocation state:
please refer to developer guide, Revocation of the PKC Keys.
PKC key revocation is through settings in mb1_bct and fuse burned by mb2 during boot. it’s bootloader MB2 to revoke PKC keys.
We already verified the process in the other product using agx orin as PKC Key revocation not working on L4T R36.3.0. We prefer to resolve the issue in the yocto environment. Do we need to set more than TEGRA_FLASHVAR_DEV_PARAMS to revoke a pkc key?
as mentioned above, it’s bootloader MB2 to revoke PKC keys.
besides, you may not use OTA to have PKC key revocation. see-also Topic 369235, current OTA Tools does not support for R36.5 Image-based OTA update.
I don’t have much experience with Yocto,
however, please built the image in Yocto to patch the BR-BCT for adding revoke_pk_h0 = <1> to revoke the first PKC (FUSE_PUBLIC_KEY) key.
for instance, $OUT/Linux_for_Tegra/bootloader/generic/BCT/tegra234-br-bct-p3767-0000-l4t.dts
you’ll need to re-flash the board with l4t_initrd_flash.sh for the internal QSPI storage to have revocation.
Yes, i already built a image with update BR-BCT. I verified the br-bct files had the “revoke_pk_h0 = <1>”. The reflash didnt’ revoke the key. nv_fuse_read.sh returned “revoke_pk_h0: 0x00000000” after reflash. It should be set to 1 once it’s revoked.
Is there any other way to revoke a pkc without yocto?
it needs to update the bootloader, there’re two approaches.. such as re-flash the board, or an OTA/firmware capsule update.
however, there’s known bug of JP-6.2.2/r36.5 to have an OTA approach.
may I know your steps, did you specify the rootdev as internal to re-flash QSPI?
for instance,
here’s image flash command of fused Orin-NX, $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -u rsa_priv-3k.pem -v sbk.key -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --uefi-keys uefi_keys/uefi_keys.conf --uefi-enc sym_t234.key --showlogs --network usb0 jetson-orin-nano-devkit internal
We use doflash.sh to flash the image. The partition xml file has the definitions for spi and ssd. The rootfs is in SSD and it’s defined as external . Here’s the content of doflash.sh
By the way, can you cross-check the value of the BootSecurityInfo i pasted in the original posting? <genericfuse MagicId="0x45535546" version="0.1.1"> <fuse name="PublicKeyHash" size="64" value="0x---"/> <fuse name="PkcPubkeyHash1" size="64" value="0x---"/> <fuse name="PkcPubkeyHash2" size="64" value="0x---"/> <fuse name="SecureBootKey" size="32" value="0x---"/> <fuse name="OemK1" size="32" value="0x---"/> <fuse name="OemK2" size="32" value="0x---"/> <fuse name="OptInEnable" size="4" value="0x1"/> <fuse name="BootSecurityInfo"size="4" value="0x3e9"/> <fuse name="SecurityMode" size="4" value="0x1"/>
is it complete command-line?
per checking the logs with Orin Nano developer kit, it should have --dev_params tegra234-br-bct-p3767-0000-l4t.dts for loading BR-BCT while image creation.
just for confirmation, you should have all 3 PKC keys with 3072-bit RSA formats, right?
Yes it’s the full copy of the doflash.sh. The br-bct part is embedded in the br_bct_BR.bct file. Actual keys are not exposed. That’s what meta-tegra/classes-recipe/image_types_tegra.bbclass does.
As for the PKC keys, they are 3072bits RSA format.