From d9bb7bb688b6201c6f1678e38c3018ea193d0237 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sun, 2 Jun 2024 00:31:20 +0200 Subject: [PATCH] package/systemd: add optional tpm2 dependency When tpm2-tss package is selected, systemd can enable its TPM2 support [1] used by systemd-boot, systemd-cryptenroll (when cryptsetup package is also enabled) [2] and other tool systemd-pcr{extend,lock,machine}. [1] https://github.com/systemd/systemd/blob/db11bab38ccf1ed257f310d29070843d4c58ea01/meson.build#L1341 [2] https://www.freedesktop.org/software/systemd/man/latest/systemd-cryptenroll.html Signed-off-by: Romain Naour Signed-off-by: Peter Korsgaard (cherry picked from commit 0e567a1580eaffcf6e18a68747e7d5701bcb176d) Signed-off-by: Peter Korsgaard --- package/systemd/systemd.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index c6b006d1fb..dd4f3e778d 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -576,6 +576,13 @@ else SYSTEMD_CONF_OPTS += -Dhibernate=false endif +ifeq ($(BR2_PACKAGE_TPM2_TSS),y) +SYSTEMD_DEPENDENCIES += tpm2-tss +SYSTEMD_CONF_OPTS += -Dtpm2=true +else +SYSTEMD_CONF_OPTS += -Dtpm2=false +endif + ifeq ($(BR2_PACKAGE_SYSTEMD_BOOT),y) SYSTEMD_INSTALL_IMAGES = YES SYSTEMD_DEPENDENCIES += gnu-efi host-python-pyelftools