Backup_restore image ftpm issue

Hi NV,

I am using a customized AGX Thor board with JP7.2 and am currently testing the backup and restore image functionality.

Following the same procedure I previously used with the JP6 Orin platform, I backed up the image as follows:

After putting the Golden Sample image into recovery mode, I ran:

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b jetson-agx-thor-devkit

After the process completed, I found nvme0n1p1.tar.zst under Linux_for_tegra/tools/backup_restore/images/. There were no errors reported during the backup process.

Then I transferred nvme0n1p1.tar.zst to another system and used it together with the BSP to replace the rootfs contents, with the goal of reproducing the Golden Sample image on other systems.

Flash command as below:
sudo ./l4t_initrd_flash.sh --erase-all jetson-agx-thor-devkit internal

However, I am now encountering an issue when flashing the Golden Sample image on another system: fTPM reports errors and cannot be used properly.

For testing, I am currently using eltt2 to read the fTPM information and perform the fTPM self-test.

sudo ./eltt2 -gc

TPM capability information of fixed properties:
=========================================================
TPM_PT_FAMILY_INDICATOR:        2.0
TPM_PT_LEVEL:                   0
TPM_PT_REVISION:                184
TPM_PT_DAY_OF_YEAR:             79
TPM_PT_YEAR:                    2025
TPM_PT_MANUFACTURER:            XYZ
TPM_PT_VENDOR_STRING:           xCG fTPM
TPM_PT_VENDOR_TPM_TYPE:         1
TPM_PT_FIRMWARE_VERSION:        8228.293.4608.0

TPM_PT_MEMORY:
=========================================================
Shared RAM:                     0 CLEAR
Shared NV:                      1 SET
Object Copied To Ram:           1 SET


Clock info:
=========================================================
Time since the last TPM_Init:
1503317 ms  =  0 y, 0 d, 0 h, 25 min, 3 s, 317 ms

Time during which the TPM has been powered:
14730923 ms  =  0 y, 0 d, 4 h, 5 min, 30 s, 923 ms

TPM Reset since the last TPM2_Clear:            6
Number of times that TPM2_Shutdown:             0
Safe:                                           1 = Yes
sudo ./eltt2 -t full

Successfully tested. Works as expected.

Since this is my first time working with fTPM, I am still not very familiar with its and currently investigating it.

So could the backup_restore image contain any fTPM-related data or information that is system-specific and therefore cause fTPM to fail when the image is restored or flashed onto another system?

When I restored the original Golden Sample image to the original system using nvme0n1p1.tar.zst, fTPM worked normally. The dmesg output is as follows:
ftpm_success_dmesg.txt (130.0 KB)

When I flashed the Golden Sample image to another system, fTPM reported error messages and I was unable to perform the test using eltt2. The dmesg output is as follows:
ftpm_fail_dmesg.txt (130.3 KB)

Thanks!!

hello SamM11,

Thor derives the fTPM seed from device-unique hardware information, and the EKB contains per-device provisioning properties.
Therefore, secure storage created on device A is not valid on device B.

BTW, there’re some issue with JP-7.2 backup/restore.
please see-also Topic 376068 to apply the patch.

you may give it a try with below approach.
(1) Clone the OS, applications, and configuration, but do not include initialized /var/lib/tee contents in the deployable golden rootfs.
(2) Flash using the target’s correct custom-board configuration and the same BSP/partition layout.
(3) Provision fTPM separately on every device using its own fuse/EKB identity.
(4) Let JetPack’s automatic provisioning run on first boot. It requires the fuseblob, a matching EKB, and an unprovisioned fTPM. see-also.. Device-Side Operations — NVIDIA Jetson Linux Developer Guide

Hi @JerryChang ,

Thanks for reply,

(a) Thor derives the fTPM seed from device-unique hardware information, and the EKB contains per-device provisioning properties. Therefore, secure storage created on device A is not valid on device B.

→ Okay, I understand. Thank you for the explanation.

(b) BTW, there’re some issue with JP-7.2 backup/restore. please see-also Topic 376068 to apply the patch.

→ I noticed this issue and have already applied the patch to my current BSP. Thank you for the reminder.

(c) you may give it a try with below approach.

  1. Clone the OS, applications, and configuration, but do not include initialized /var/lib/tee contents in the deployable golden rootfs.
  2. Flash using the target’s correct custom-board configuration and the same BSP/partition layout.
  3. Provision fTPM separately on every device using its own fuse/EKB identity.
  4. Let JetPack’s automatic provisioning run on first boot. It requires the fuseblob, a matching EKB, and an unprovisioned fTPM. see-also.. Device-Side Operations — NVIDIA Jetson Linux Developer Guide

→ Okay, understood. I will give a try.

I would also like to ask whether anyone has encountered a similar fTPM issue before.

Based on my previous experience porting TPM (SLB9670 and SLB9672) and communicate via SPI, that I did not face the issue of the TPM becoming unusable when using a backup_restore image.

I believe this may be the fundamental differences between fTPM and dTPM.

Thanks!!

Hi @JerryChang ,

Thank you for the suggestion. After trying your recommended approach—specifically “do not include initialized /var/lib/tee contents in the deployable golden rootfs”—it successfully resolved the fTPM issue we encountered when flashing the golden rootfs image across different systems. Thank you very much for your assistance!

Thanks!!