diff options
-rw-r--r-- | projectroot/usr/lib/systemd/system/tpm2-abrmd.service | 15 | ||||
-rw-r--r-- | rules/tpm2-abrmd.in | 18 | ||||
-rw-r--r-- | rules/tpm2-abrmd.make | 81 |
3 files changed, 114 insertions, 0 deletions
diff --git a/projectroot/usr/lib/systemd/system/tpm2-abrmd.service b/projectroot/usr/lib/systemd/system/tpm2-abrmd.service new file mode 100644 index 000000000..204834738 --- /dev/null +++ b/projectroot/usr/lib/systemd/system/tpm2-abrmd.service @@ -0,0 +1,15 @@ +[Unit] +Description=TPM2 Access Broker and Resource Management Daemon +ConditionPathExists=/dev/tpm0 + +[Service] +Type=dbus +Restart=always +RestartSec=5 +BusName=com.intel.tss2.Tabrmd +StandardOutput=syslog +ExecStart=/usr/sbin/tpm2-abrmd +User=tss + +[Install] +WantedBy=multi-user.target diff --git a/rules/tpm2-abrmd.in b/rules/tpm2-abrmd.in new file mode 100644 index 000000000..1ab0a6a7f --- /dev/null +++ b/rules/tpm2-abrmd.in @@ -0,0 +1,18 @@ +## SECTION=tpm + +config TPM2_ABRMD + tristate + select HOST_AUTOTOOLS_AUTOCONF_ARCHIVE + select DBUS + select GLIB + select TPM2_TSS + select HOST_DBUS_GLIB + prompt "tpm2-abrmd" + help + TPM2 Access Broker & Resource Management Daemon implementing + the TCG spec. + + This is a system daemon implementing the TPM2 access broker + (TAB) & Resource Manager (RM) spec from the TCG. The daemon + (tpm2-abrmd) is implemented using Glib and the GObject + system. diff --git a/rules/tpm2-abrmd.make b/rules/tpm2-abrmd.make new file mode 100644 index 000000000..9516efc11 --- /dev/null +++ b/rules/tpm2-abrmd.make @@ -0,0 +1,81 @@ +# -*-makefile-*- +# +# Copyright (C) 2017 by Marc Kleine-Budde <mkl@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_TPM2_ABRMD) += tpm2-abrmd + +# +# Paths and names +# +TPM2_ABRMD_VERSION := 2.1.1 +TPM2_ABRMD_MD5 := 47f9ee5be9cedec3a8f1a03f60ead4d5 +TPM2_ABRMD := tpm2-abrmd-$(TPM2_ABRMD_VERSION) +TPM2_ABRMD_SUFFIX := tar.gz +TPM2_ABRMD_URL := https://github.com/tpm2-software/tpm2-abrmd/releases/download/$(TPM2_ABRMD_VERSION)/$(TPM2_ABRMD).$(TPM2_ABRMD_SUFFIX) +TPM2_ABRMD_SOURCE := $(SRCDIR)/$(TPM2_ABRMD).$(TPM2_ABRMD_SUFFIX) +TPM2_ABRMD_DIR := $(BUILDDIR)/$(TPM2_ABRMD) +TPM2_ABRMD_LICENSE := BSD-2-Clause +TPM2_ABRMD_LICENSE_FILES := file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +TPM2_ABRMD_CONF_TOOL := autoconf +TPM2_ABRMD_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --disable-unit \ + --disable-code-coverage \ + --disable-valgrind \ + --disable-valgrind-memcheck \ + --disable-valgrind-helgrind \ + --disable-valgrind-drd \ + --disable-valgrind-sgcheck \ + --disable-dlclose \ + --disable-test-hwtpm \ + --disable-integration \ + --without-gcov \ + --with-systemdsystemunitdir=/usr/lib/systemd/system \ + --with-dbuspolicydir=/usr/share/dbus-1/system.d + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/tpm2-abrmd.targetinstall: + @$(call targetinfo) + + @$(call install_init, tpm2-abrmd) + @$(call install_fixup, tpm2-abrmd,PRIORITY,optional) + @$(call install_fixup, tpm2-abrmd,SECTION,base) + @$(call install_fixup, tpm2-abrmd,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>") + @$(call install_fixup, tpm2-abrmd,DESCRIPTION,missing) + + @$(call install_lib, tpm2-abrmd, 0, 0, 0644, libtss2-tcti-tabrmd) + @$(call install_copy, tpm2-abrmd, 0, 0, 0755, -, /usr/sbin/tpm2-abrmd) + + @$(call install_alternative, tpm2-abrmd, 0, 0, 0644, \ + /usr/lib/systemd/system/tpm2-abrmd.service) + + @$(call install_alternative, tpm2-abrmd, 0, 0, 0644, \ + /usr/share/dbus-1/system.d/tpm2-abrmd.conf) + @$(call install_alternative, tpm2-abrmd, 0, 0, 0644, \ + /usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service) + + @$(call install_finish, tpm2-abrmd) + + @$(call touch) + +# vim: syntax=make |