From: Jan Kiszka <
jan.k...@siemens.com>
It was wrong to assume that there is no need to wait for the tpm device
anymore when using in-kernel supplicant. Also in that case, there can
still be some delay in probing the eMMC storage device and, thus, also
the ftpm which depends on it. Restore our waiting loop, just updating
its comment accordingly.
Fixes: a1893507e495 ("initramfs-tee-ftpm-hook: Skip local-top hook without userland supplicant")
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
This will also allow to fix the OVERRIDES mistake on top.
.../recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top | 4 ++--
.../initramfs-tee-ftpm-hook/
initramfs-tee-ftpm-hook_0.3.bb | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top
index 989bf288..7683cc41 100644
--- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top
+++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top
@@ -9,8 +9,8 @@
FTPM_DEV=/dev/tpmrm0
-# The tee-supplicant would take some time to be discovered, 30 seconds should
-# be enough
+# The backing storage device and/or the tee-supplicant can take some time to
+# be discovered, 30 seconds should be enough
wait_sec=30
until test $wait_sec -eq 0 || test -c "${FTPM_DEV}" ; do
wait_sec=$((wait_sec-1))
diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/
initramfs-tee-ftpm-hook_0.3.bb b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/
initramfs-tee-ftpm-hook_0.3.bb
index 94399374..0a7cd560 100644
--- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/
initramfs-tee-ftpm-hook_0.3.bb
+++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/
initramfs-tee-ftpm-hook_0.3.bb
@@ -8,14 +8,14 @@
require recipes-initramfs/initramfs-hook/hook.inc
+SRC_URI += "file://local-top"
+
# Can be disabled with kernel 6.12 and above
# NOTE: default will eventually be flipped
TEE_SUPPLICANT_IN_USERLAND ?= "1"
OVERRIDES .= "${@'supp-user' if bb.utils.to_boolean(d.getVar('TEE_SUPPLICANT_IN_USERLAND')) else ''}"
-SRC_URI:supp-user += "file://local-top"
-
HOOK_PREREQ:supp-user = "tee-supplicant"
HOOK_ADD_MODULES = "amdtee arm-tstee optee qcomtee tpm_ftpm_tee"
SCRIPT_PREREQ:supp-user = "tee-supplicant"
--
2.51.0