Skip to content

Add tpm2 to MACHINE_FEATURES and use OE-core's OVMF recipe#937

Closed
amstewart wants to merge 2 commits into
ni:nilrt/master/scarthgapfrom
amstewart:scarthgap/ovmf
Closed

Add tpm2 to MACHINE_FEATURES and use OE-core's OVMF recipe#937
amstewart wants to merge 2 commits into
ni:nilrt/master/scarthgapfrom
amstewart:scarthgap/ovmf

Conversation

@amstewart

@amstewart amstewart commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

OE-core PR #187 corrects the OE-core ovmf recipe to support TPM2 devices, when building for MACHINEs that have the tpm2 feature. This patchset adds that feature to NILRT x64 - needed for Secure Boot and Measured Boot - and also tweaks the OVMF recipe to extract the raw-formatted binaries on the following basis.

The OE-core ovmf recipe generates raw OVMF image files, but then
converts them to qcow2 images, and moves only the qcow2 files to the
deploy directory. QEMU can use either format, but only the raw format
supports writable EFI variables - which NILRT uses and which upstream OE
core testing does not.

So add a NILRT-specific bbappend which also outputs the raw-formatted
OVMF files, for use in NILRT QEMU virtual machines.

Justification

These changes are necessary to use virtualized TPM2 devices in the NILRT QEMU virtual machines.

Testing

After building the ovmf recipe, the deploy/images/x64 directory contains the files...

ovmf.code.fd
ovmf.code.qcow2
ovmf.qcow2
ovmf.vars.fd
ovmf.vars.qcow2
systemd-bootx64.efi
  • I have built the core package feed with this PR in place. (bitbake packagefeed-ni-core)
  • Built the new NILRT QEMU VMs with these changes, and I am now able to attach a software TPM to the machine and read/write PCR states.

Procedure

Alex Stewart added 2 commits February 3, 2026 14:36
PXIs and other x86_64 devices may be populated with TPM2 compatible
TPMs. Add 'tpm2' to the MACHINE_FEATURES so that recipes which use that
value to determine configured functionality are aware.

Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The OE-core ovmf recipe generates raw OVMF image files, but then
converts them to qcow2 images, and moves only the qcow2 files to the
deploy directory. QEMU can use either format, but only the raw format
supports writable EFI variables - which NILRT uses and which upstream OE
core testing does not.

So add a NILRT-specific bbappend which also outputs the raw-formatted
OVMF files, for use in NILRT QEMU virtual machines.

Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
@amstewart

Copy link
Copy Markdown
Contributor Author

Closed. Superseded by #957.

@amstewart amstewart closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant