Hi,
this is a follow-up to my previous thread:
https://forums.developer.nvidia.com/t/accessing-ftpm-helper-from-a-trusted-application-on-jetson/344657/27
In that thread, my fuse XML was confirmed as correct, and I was told to re-generate the EKS image (eks_t234.img) with my own keys using the EKB tools before flashing. I’ve done that, but fTPM still doesn’t come up.
Platform
-
Board: Jetson Orin Nano Dev Kit
-
JetPack / L4T: 6.2 (36.x)
-
Secure Boot: enabled, board fused (SBK + PKC, plus Kdk0/OemK1 etc. for fTPM)
-
Root/UDA: LUKS-encrypted, system boots fine
-
TEE: OP-TEE from
nvidia-jetson-optee-source -
fTPM: Microsoft fTPM in OP-TEE, Linux driver
tpm_ftpm_tee
On the device:
tr -d '\0' < /proc/device-tree/firmware/ftpm/status
# -> "okay"
ls -l /lib/optee_armtz | egrep 'bc50d971|ftpm'
# bc50d971-d4c9-42c4-82cb-343fb7f37896.ta
So the DT node is okay and the TA with the expected UUID is present.
What I did for EKS/EKB
On the host I followed NVIDIA’s “Tool for EKB Generation” flow (offline provisioning):
- KDK generation
./kdk_gen.py --oem_id 0x00000102 --sn 0x0000000100000001 --num_devices 1
→ ftpm_kdk/kdk_db_0102-0000000100000001-1.csv
- ODM EKB (offline)
python3 odm_ekb_gen.py \
--kdk_db ./ftpm_kdk/kdk_db_0102-0000000100000001-1.csv \
--prov_mode offline
→ odm_out/ftpm_eks_0102-0000000100000001.img + EK CSRs / certificates
- OEM EKB
python3 oem_ekb_gen.py \
-oem_k1_key oem_keys/oem_k1.key \
-in_sym_key oem_keys/sym_t234.key \
-in_sym_key2 oem_keys/sym2_t234.key \
-in_auth_key oem_keys/auth_t234.key \
-in_ftpm_odm_ekb odm_out
→ oem_out/eks_0102-0000000100000001.img
→ oem_out/signed/eks_0102-0000000100000001_sigheader_encrypt.img.signed
- Integration into L4T
cd Linux_for_Tegra
sudo mkdir -p tools/kernel_flash/images/internal/ekb_db
sudo cp \
/path/to/optee/samples/ftpm-helper/host/tool/oem_out/signed/eks_0102-0000000100000001_sigheader_encrypt.img.signed \
tools/kernel_flash/images/internal/ekb_db/
Then I re-generated QSPI/initrd images with l4t_initrd_flash.sh and reflashed. Secure Boot and disk encryption still work as expected.
Current problem on the board
When I try to load the fTPM driver:
sudo modprobe tpm_ftpm_tee
dmesg | grep -i ftpm | tail -n 10
I get:
I/TC: WARNING (insecure configuration): Failed to commit dirh counter 2
E/LD: init_elf:493 sys_open_ta_bin(bc50d971-d4c9-42c4-82cb-343fb7f37896)
E/TC:?? 00 ldelf_init_with_ldelf:152 ldelf failed with res: 0xffff0008
[ 41.827604] ftpm-tee firmware:ftpm: ftpm_tee_probe: tee_client_open_session failed, err=ffff0008
[ 41.827657] ftpm-tee: probe of firmware:ftpm failed with error -22
And:
ls -l /dev/tpm*
# -> No such file or directory
So:
-
DT node
firmware/ftpmis"okay", -
fTPM TA with UUID
bc50d971-d4c9-42c4-82cb-343fb7f37896is present in/lib/optee_armtz, -
but OP-TEE (
ldelf) fails to load it withTEE_ERROR_ITEM_NOT_FOUND (0xffff0008)duringtpm_ftpm_teeprobe.
Questions
-
EKS/EKB integration on Orin Nano
Is it sufficient to copy
eks_0102-0000000100000001_sigheader_encrypt.img.signed
intotools/kernel_flash/images/internal/ekb_db/and reflash, or doesMB2/OP-TEE expect a specific filename (e.g.eks_t234.img) or configuration so that this EKS is actually used for fTPM? -
Root cause for
0xffff0008when loading fTPM TA
Given that the DT node isokayand the TA file exists: what are typical reasons on T234/Orin Nano whyldelfwould still returnTEE_ERROR_ITEM_NOT_FOUNDfor the fTPM TA? -
Tool / CSR compatibility
I had to adjust the Python CSR helper (ftpm_ek_csr.py) slightly to satisfy currentasn1crypto/oscrypto(mainly aroundsubjectAltNameandextension_requeststructure). Could a malformed EK CSR / EK cert / EKS structure cause this early TA-load error, or would that normally only fail later inside the TA logic?
Any hints on how to verify that my new EKS image is really being consumed by the boot chain and OP-TEE would be very helpful.
Thanks,
Niklas
