* [PATCH 1/2] initramfs-tee-{ftpm,supplicant}-hook: Move sync loop to ftpm-hook
@ 2023-07-17 19:34 Jan Kiszka
2023-07-17 19:34 ` [PATCH 2/2] initramfs-tee-supplicant-hook: Account for modular optee Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2023-07-17 19:34 UTC (permalink / raw)
To: isar-users; +Cc: Su, Bao Cheng (RC-CN DF FA R&D)
From: Jan Kiszka <jan.kiszka@siemens.com>
There is no FTPM_DEV defined in tee-supplicant.script, and it also makes
no sense to wait for an unrelated fTPM device in the tee-supplicant
starter hook. That is better done in tee-ftpm.script.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../initramfs-tee-ftpm-hook/files/tee-ftpm.script | 9 +++++++++
.../files/tee-supplicant.script | 8 --------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script
index ce321a09..6e12e6df 100644
--- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script
+++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script
@@ -21,6 +21,15 @@ esac
. /scripts/functions
FTPM_DEV=/dev/tpmrm0
+
+# The tee-supplicant would take some time to be discovered, 10 seconds should be
+# enough
+wait_sec=10
+until test $wait_sec -eq 0 || test -c "${FTPM_DEV}" ; do
+ wait_sec=$((wait_sec-1))
+ sleep 1
+done
+
if ! test -c "${FTPM_DEV}"; then
panic "Can't discover the fTPM device ${FTPM_DEV}!"
fi
diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
index bb6dcc16..76efc1ad 100644
--- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
+++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
@@ -22,12 +22,4 @@ esac
/usr/sbin/tee-supplicant -d
-# The tee-supplicant would take some time to be discovered, 10 seconds should be
-# enough
-wait_sec=10
-until test $wait_sec -eq 0 || test -c "${FTPM_DEV}" ; do
- wait_sec=$((wait_sec-1))
- sleep 1
-done
-
/usr/bin/pgrep tee-supplicant > /dev/null || panic "Can't start the tee-supplicant daemon!"
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] initramfs-tee-supplicant-hook: Account for modular optee
2023-07-17 19:34 [PATCH 1/2] initramfs-tee-{ftpm,supplicant}-hook: Move sync loop to ftpm-hook Jan Kiszka
@ 2023-07-17 19:34 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2023-07-17 19:34 UTC (permalink / raw)
To: isar-users; +Cc: Su, Bao Cheng (RC-CN DF FA R&D)
From: Jan Kiszka <jan.kiszka@siemens.com>
Starting tee-supplicant will fail otherwise.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../initramfs-tee-supplicant-hook/files/tee-supplicant.script | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
index 76efc1ad..fcb84817 100644
--- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
+++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script
@@ -20,6 +20,7 @@ esac
. /scripts/functions
+/usr/sbin/modprobe optee
/usr/sbin/tee-supplicant -d
/usr/bin/pgrep tee-supplicant > /dev/null || panic "Can't start the tee-supplicant daemon!"
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-17 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 19:34 [PATCH 1/2] initramfs-tee-{ftpm,supplicant}-hook: Move sync loop to ftpm-hook Jan Kiszka
2023-07-17 19:34 ` [PATCH 2/2] initramfs-tee-supplicant-hook: Account for modular optee Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox