Skip to content

Enable RPMB-base firmware stack with OP-TEE/fTPM/StMM for QEMU ARM64

Jan Kiszka cip-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19linux-cip: Update cip-kernel-config revisionrecipes-kernel/linux/cip-kernel-config.inc+1 -10 replies
2/19Update isar revisionkas-cip.yml+1 -10 replies
3/19qemu-arm64: Add recipe for optee-ftpmrecipes-bsp/optee-ftpm/optee-ftpm-qemu-arm64_4.8+v1.62r1-48-ge9fc7b8.bb+30 -00 replies
4/19qemu-arm64: Add optee-os 4.8.0recipes-bsp/optee-os/optee-os-qemu-arm64_4.8.0.bb recipes-bsp/optee-os/optee-os-qemu-arm64_4.8.0.inc recipes-bsp/optee-os/optee-os-qemu.inc +1 more+90 -00 replies
5/19qemu-arm64: Add recipe for TF-Arecipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.13.0.bb+40 -00 replies
6/19u-boot: Add patch to fix sporadic build failuresrecipes-bsp/u-boot/files/0001-tools-Do-not-generate-logo-when-cross-building.patch recipes-bsp/u-boot/u-boot-common-2025.07.inc+34 -00 replies
7/19u-boot: Relocate or drop secure boot unrelated config switchesrecipes-bsp/u-boot/files/qemu-extra.cfg recipes-bsp/u-boot/files/secure-boot.cfg recipes-bsp/u-boot/u-boot-qemu-common.inc+10 -40 replies
8/19u-boot-qemu: Add patches and config switch needed for eMMC bootrecipes-bsp/u-boot/files/0001-Kconfig-Convert-SYS_EARLY_PCI_INIT-to-Kconfig.patch recipes-bsp/u-boot/files/0002-qemu_arm-Select-CONFIG_SYS_EARLY_PCI_INIT.patch recipes-bsp/u-boot/files/qemu-extra.cfg +1 more+74 -00 replies
9/19u-boot: Prepare for different build dependency without built-in UEFI keysrecipes-bsp/u-boot/u-boot-common-2025.07.inc+11 -50 replies
10/19u-boot: Add optional support for fTPM/StMMrecipes-bsp/u-boot/files/0003-test-Fix-optee-unit-test.patch recipes-bsp/u-boot/files/ftpm-stmm.cfg recipes-bsp/u-boot/files/secure-boot.cfg +1 more+152 -10 replies
11/19cip-core-initramfs: Add initramfs-tee-ftpm-hook when neededconf/distro/cip-core-common.inc recipes-initramfs/cip-core-initramfs/cip-core-initramfs.bb+3 -00 replies
12/19Add class to generate eMMC image for QEMUclasses/qemu-emmc.bbclass conf/layer.conf conf/machine/qemu-arm64.conf+48 -40 replies
13/19qemu-arm64: Switch firmware provider to TF-A in fTPM/StMM modekas/opt/ebg-swu.yml recipes-bsp/u-boot/u-boot-qemu-common.inc+9 -20 replies
14/19customizations: Install efitools in secure boot moderecipes-core/customizations/customizations.bb+3 -10 replies
15/19kas: Add option for fTPM/StMM firmware modeKconfig kas/opt/ftpm-stmm.yml+35 -00 replies
16/19start-qemu: Indention fixesstart-qemu.sh+8 -80 replies
17/19start-qemu: Factor out -drive parameter in UEFI boot modestart-qemu.sh+4 -40 replies
18/19start-qemu: Add support for qemu-arm64 fTPM/StMM modestart-qemu.sh+31 -170 replies
19/19linux-cip: Disable CONFIG_HW_RANDOM_TPM in QEMUrecipes-kernel/linux/cip-kernel-config.inc recipes-kernel/linux/files/no-tpm-hwrng.cfg+4 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [isar-cip-core][PATCH 00/19] Enable RPMB-base firmware stack with OP-TEE/fTPM/StMM for QEMU ARM64

While waiting for [1] to be merged into QEMU upstream, already enable the qemu-arm64 target to make use of the RPMB emulation. We keep this optional, though, not only because of its dependency on special QEMU at this stage. We still need to support discrete TPM emulation for older kernels.

Debugging the stack has revealed several issues. Most of them are fixed now, but one is still under discussion [2]. This series addresses it by disabling the hardware random number generator of the TPM for all CIP kernels.

Jan

[1] https://patchwork.kernel.org/project/qemu-devel/list/?series=1012864
[2] https://lore.kernel.org/lkml/[email protected]/

Jan Kiszka (19):
linux-cip: Update cip-kernel-config revision
Update isar revision
qemu-arm64: Add recipe for optee-ftpm
qemu-arm64: Add optee-os 4.8.0
qemu-arm64: Add recipe for TF-A
u-boot: Add patch to fix sporadic build failures
u-boot: Relocate or drop secure boot unrelated config switches
u-boot-qemu: Add patches and config switch needed for eMMC boot
u-boot: Prepare for different build dependency without built-in UEFI
keys
u-boot: Add optional support for fTPM/StMM
cip-core-initramfs: Add initramfs-tee-ftpm-hook when needed Add class to generate eMMC image for QEMU
qemu-arm64: Switch firmware provider to TF-A in fTPM/StMM mode
customizations: Install efitools in secure boot mode
kas: Add option for fTPM/StMM firmware mode
start-qemu: Indention fixes
start-qemu: Factor out -drive parameter in UEFI boot mode
start-qemu: Add support for qemu-arm64 fTPM/StMM mode
linux-cip: Disable CONFIG_HW_RANDOM_TPM in QEMU

 Kconfig                                       |  19 +++
 classes/qemu-emmc.bbclass                     |  43 ++++++
 conf/distro/cip-core-common.inc               |   2 +
 conf/layer.conf                               |   5 +-
 conf/machine/qemu-arm64.conf                  |   4 +-
 kas-cip.yml                                   |   2 +-
 kas/opt/ebg-swu.yml                           |   6 +-
 kas/opt/ftpm-stmm.yml                         |  16 +++
 ...ftpm-qemu-arm64_4.8+v1.62r1-48-ge9fc7b8.bb |  30 ++++
 .../optee-os/optee-os-qemu-arm64_4.8.0.bb     |  13 ++
 .../optee-os/optee-os-qemu-arm64_4.8.0.inc    |  18 +++
 recipes-bsp/optee-os/optee-os-qemu.inc        |  44 ++++++
 .../optee-os-tadevkit-qemu-arm64_4.8.0.bb     |  15 ++
 .../trusted-firmware-a-qemu-arm64_2.13.0.bb   |  40 ++++++
 ...onvert-SYS_EARLY_PCI_INIT-to-Kconfig.patch |  37 +++++
 ...ot-generate-logo-when-cross-building.patch |  33 +++++
 ...arm-Select-CONFIG_SYS_EARLY_PCI_INIT.patch |  28 ++++
 .../files/0003-test-Fix-optee-unit-test.patch | 134 ++++++++++++++++++
 recipes-bsp/u-boot/files/ftpm-stmm.cfg        |   5 +
 recipes-bsp/u-boot/files/qemu-extra.cfg       |   9 ++
 recipes-bsp/u-boot/files/secure-boot.cfg      |   6 +-
 recipes-bsp/u-boot/u-boot-common-2025.07.inc  |  30 +++-
 recipes-bsp/u-boot/u-boot-qemu-common.inc     |  14 +-
 recipes-core/customizations/customizations.bb |   4 +-
 .../cip-core-initramfs/cip-core-initramfs.bb  |   1 +
 recipes-kernel/linux/cip-kernel-config.inc    |   5 +-
 recipes-kernel/linux/files/no-tpm-hwrng.cfg   |   2 +
 start-qemu.sh                                 |  70 +++++----
 28 files changed, 587 insertions(+), 48 deletions(-)
 create mode 100644 classes/qemu-emmc.bbclass
 create mode 100644 kas/opt/ftpm-stmm.yml
 create mode 100644 recipes-bsp/optee-ftpm/optee-ftpm-qemu-arm64_4.8+v1.62r1-48-ge9fc7b8.bb
 create mode 100644 recipes-bsp/optee-os/optee-os-qemu-arm64_4.8.0.bb
 create mode 100644 recipes-bsp/optee-os/optee-os-qemu-arm64_4.8.0.inc
 create mode 100644 recipes-bsp/optee-os/optee-os-qemu.inc
 create mode 100644 recipes-bsp/optee-os/optee-os-tadevkit-qemu-arm64_4.8.0.bb
 create mode 100644 recipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.13.0.bb
 create mode 100644 recipes-bsp/u-boot/files/0001-Kconfig-Convert-SYS_EARLY_PCI_INIT-to-Kconfig.patch
 create mode 100644 recipes-bsp/u-boot/files/0001-tools-Do-not-generate-logo-when-cross-building.patch
 create mode 100644 recipes-bsp/u-boot/files/0002-qemu_arm-Select-CONFIG_SYS_EARLY_PCI_INIT.patch
 create mode 100644 recipes-bsp/u-boot/files/0003-test-Fix-optee-unit-test.patch
 create mode 100644 recipes-bsp/u-boot/files/ftpm-stmm.cfg
 create mode 100644 recipes-bsp/u-boot/files/qemu-extra.cfg
 create mode 100644 recipes-kernel/linux/files/no-tpm-hwrng.cfg
Signature · 1 line
2.51.0