Conversation
mobileoverlord
force-pushed
the
imx93-secure-boot-wrynose
branch
from
August 24, 2026 20:34
9308e29 to
5b7f642
Compare
Contributor
Author
|
Closing: superseded by #271. This PR's four commits are all present on
Nothing here is lost. The The fTPM path on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The i.MX93 FRDM board has no discrete TPM, and the EdgeLock Secure Enclave is
not one either - it speaks an NXP-proprietary interface, not the TPM2 command
set that
systemd-cryptenrollandcryptsetup --tokenneed. So the TPM2 paththe /var encryption stack already implements (PCR-7 seal on first boot,
--token-onlyopen thereafter) had nothing to bind to on this machine, and/var fell back to its Argon2id keyslot every boot.
The OP-TEE fTPM is the viable route: the board already enables OP-TEE
unconditionally, has eMMC 5.1 with RPMB, and carries a
recoverypartition forthe TEE store. What was missing was the wiring.
Solution
Add the fTPM as an opt-in kas feature rather than a machine default, because
turning it on pulls two layers into the build and that must not happen to a
board that did not ask for a TPM.
optee-ftpm-initmoves frommeta-avocado-qemuinto the sharedmeta-avocadolayer. An i.MX93 build never parses the qemu layer - its machine config pulls
base, nxp and freescale only - while the initramfs packagegroup that installs
the recipe is shared, so leaving it in place would have meant an RDEPENDS with
no provider.
The TA itself comes from meta-arm, which carries both halves:
optee-ftpmbuilds the Microsoft TA, and its
optee-os_%.bbappendfolds it into BL32 viaCFG_EARLY_TA.Key changes
kas/feature/ftpm.yml: appendsoptee-ftpmtoMACHINE_FEATURES, pullsin meta-arm for the TA and meta-security's meta-tpm for
tpm2-tss.optee-ftpm-initrelocated tometa-avocado/recipes-security/, withCOMPATIBLE_MACHINEwidened to coveravocado-imx93-frdm.ftpm.cfgkernel fragment: the driver as a module (its NV storage isREE-FS, serviced from userspace, so it cannot probe at kernel init), and
CONFIG_HW_RANDOM_TPMleft unset so the hwrng kthread cannot holdtpm_mutexacross a GetRandom loop and starve the PCR-7 seal.optee-ftpm_%.bbappendundermeta-avocado-nxp/dynamic-layers/meta-arm.AVOCADO_SECURITY_CAPABILITIESon imx93-frdm extended toencrypted-var ftpm tpm2.Reviewer notes
Build-verified, not hardware-validated.
avocado-image-initramfsforavocado-imx93-frdmwith the feature selected: 5025/5025 tasks, 0 errors. Theproduced initramfs carries
tpm_ftpm_tee.ko,optee-ftpm-init's script, unit,modprobe.d conf and its
initrd-root-fs.target.wantssymlink, and/etc/avocado-security-capabilitiesreading exactlyencrypted-var ftpm tpm2.No board pass has been run.
The declaration is deliberately narrower than the hardware.
ahabis leftoff: this board supports it, but nothing on this branch wires it up, and the
declaration is a claim about what the image delivers rather than about the
silicon. The recipe-side assert only runs for machines
COMPATIBLE_MACHINEalready matches, so a declaration that overreaches is invisible by
construction - which is why delivery lands first here and the declaration
second.
The OP-TEE version pins are a hold, not a verdict. Adding meta-arm makes
meta-imx's
dynamic-layers/meta-armOP-TEE recipes parse for the first time,at which point
imx-base-extend.inc's existingPREFERRED_VERSION_optee-os:imx-nxp-bsp ??= "4.10.0.imx"starts resolving andwould silently move the board off 4.8.0 inside the boot chain. All four recipes
are pinned back, not just
optee-os, becauseoptee-clientprovidestee-supplicantwhich backs the fTPM's REE-FS storage and a version mismatchthere ships rather than failing. Removing the pins needs its own change and a
hardware pass.
Known warning: a
PREFERRED_VERSIONfornativesdk-qemuof8.2.2.imxdoes not resolve (available:
10.2.0,10.2.5.imx). Pre-existing, notintroduced here, and warning-only - but worth an owner's look given how much
this fragment invests in pinning against exactly that class of drift.
Depends on #271. CI has not run yet; these workflows are PR-triggered.