mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: PTXdist Mailing List <ptxdist@pengutronix.de>
Cc: Roland Hieber <rhi@pengutronix.de>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Jan Luebbe <jlu@pengutronix.de>,
	Bastian Krause <bst@pengutronix.de>
Subject: [ptxdist] [PATCH v1 09/11] tpm2-tss: new package
Date: Tue, 28 May 2019 13:57:54 +0200	[thread overview]
Message-ID: <20190528115756.2279-9-rhi@pengutronix.de> (raw)
In-Reply-To: <20190528115756.2279-1-rhi@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>

Co-authored-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Co-authored-by: Jan Luebbe <jlu@pengutronix.de>
Co-authored-by: Bastian Krause <bst@pengutronix.de>
Co-authored-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 .../usr/lib/udev/rules.d/70-tpm-udev.rules    |  4 +
 rules/tpm2-tss.in                             | 22 +++++
 rules/tpm2-tss.make                           | 89 +++++++++++++++++++
 3 files changed, 115 insertions(+)
 create mode 100644 projectroot/usr/lib/udev/rules.d/70-tpm-udev.rules
 create mode 100644 rules/tpm2-tss.in
 create mode 100644 rules/tpm2-tss.make

diff --git a/projectroot/usr/lib/udev/rules.d/70-tpm-udev.rules b/projectroot/usr/lib/udev/rules.d/70-tpm-udev.rules
new file mode 100644
index 000000000000..96d2c4612a0e
--- /dev/null
+++ b/projectroot/usr/lib/udev/rules.d/70-tpm-udev.rules
@@ -0,0 +1,4 @@
+# tpm devices can only be accessed by the tss user but the tss
+# group members can access tpmrm devices
+KERNEL=="tpm[0-9]*", MODE="0660", OWNER="tss"
+KERNEL=="tpmrm[0-9]*", MODE="0660", OWNER="tss", GROUP="tss"
diff --git a/rules/tpm2-tss.in b/rules/tpm2-tss.in
new file mode 100644
index 000000000000..dbb31007276b
--- /dev/null
+++ b/rules/tpm2-tss.in
@@ -0,0 +1,22 @@
+## SECTION=tpm
+
+config TPM2_TSS
+	tristate
+	select HOST_AUTOTOOLS_AUTOCONF_ARCHIVE
+	select OPENSSL
+	prompt "tpm2-tss"
+	help
+	  TPM2 Software stack library - TSS and TCTI libraries
+
+	  TPM2.0 TSS (Software Stack) consists of API layers provided
+	  to support TPM 2.0 chips. It is made out of three layers:
+
+	  * System API (SAPI), which implements the system layer API;
+	  * TPM Command Transmission Interface (TCTI), which is used
+	    by SAPI to allow communication with the TAB/RM layer;
+	  * Trusted Access Broker/Resource Manager (TAB/RM), which
+	    handles TPM resources and process coordination.
+
+	  This package contains the TSS and TCTI libraries that client
+	  applications will link against when they require accessing
+	  the TPM.
diff --git a/rules/tpm2-tss.make b/rules/tpm2-tss.make
new file mode 100644
index 000000000000..e20df8eca0d2
--- /dev/null
+++ b/rules/tpm2-tss.make
@@ -0,0 +1,89 @@
+# -*-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_TSS) += tpm2-tss
+
+#
+# Paths and names
+#
+TPM2_TSS_VERSION	:= 2.2.2
+TPM2_TSS_MD5		:= db341b66daab34cbb4d6a4e5a8745001
+TPM2_TSS		:= tpm2-tss-$(TPM2_TSS_VERSION)
+TPM2_TSS_SUFFIX		:= tar.gz
+TPM2_TSS_URL		:= https://github.com/tpm2-software/tpm2-tss/releases/download/$(TPM2_TSS_VERSION)/$(TPM2_TSS).$(TPM2_TSS_SUFFIX)
+TPM2_TSS_SOURCE		:= $(SRCDIR)/$(TPM2_TSS).$(TPM2_TSS_SUFFIX)
+TPM2_TSS_DIR		:= $(BUILDDIR)/$(TPM2_TSS)
+TPM2_TSS_LICENSE	:= BSD-2-Clause
+TPM2_TSS_LICENSE_FILES	:= file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+TPM2_TSS_CONF_TOOL	:= autoconf
+TPM2_TSS_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-unit \
+	--enable-esapi \
+	--disable-tcti-device-async \
+	--disable-tcti-partial-reads \
+	--enable-tcti-device \
+	--enable-tcti-mssim \
+	--disable-integration \
+	--disable-debug \
+	--disable-defaultflags \
+	--disable-doxygen-doc \
+	--disable-doxygen-dot \
+	--disable-doxygen-man \
+	--disable-doxygen-rtf \
+	--disable-doxygen-xml \
+	--disable-doxygen-chm \
+	--disable-doxygen-chi \
+	--disable-doxygen-html \
+	--disable-doxygen-ps \
+	--disable-doxygen-pdf \
+	--disable-code-coverage \
+	--with-crypto=ossl \
+	--with-udevrulesdir=/usr/lib/udev/rules.d \
+	--without-gcov
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tpm2-tss.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, tpm2-tss)
+	@$(call install_fixup, tpm2-tss,PRIORITY,optional)
+	@$(call install_fixup, tpm2-tss,SECTION,base)
+	@$(call install_fixup, tpm2-tss,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
+	@$(call install_fixup, tpm2-tss,DESCRIPTION,missing)
+
+	@$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-esys)
+	@$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-mu)
+	@$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-sys)
+	@$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-tcti-device)
+	@$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-tcti-mssim)
+
+	@$(call install_alternative, tpm2-tss, 0, 0, 0644, \
+		/usr/lib/udev/rules.d/70-tpm-udev.rules)
+
+	@$(call install_finish, tpm2-tss)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2019-05-28 11:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 11:57 [ptxdist] [PATCH v1 01/11] rsync: add "rsync over ssh" feature Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 02/11] yajl: improve kconfig help text Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 03/11] minicoredumper: enable and configure minicoredumper Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 04/11] paho-mqtt-c: new package Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 05/11] paho-mqtt-cpp: " Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 06/11] host-autotools-autoconf-archive: " Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 07/11] rootfs: add tpm user and group Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 08/11] tpm: add new menu Roland Hieber
2019-05-28 11:57 ` Roland Hieber [this message]
2019-05-28 11:57 ` [ptxdist] [PATCH v1 10/11] tpm2-abrmd: new package Roland Hieber
2019-05-28 11:57 ` [ptxdist] [PATCH v1 11/11] tpm2-tools: " Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190528115756.2279-9-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=bst@pengutronix.de \
    --cc=jlu@pengutronix.de \
    --cc=m.grzeschik@pengutronix.de \
    --cc=mkl@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox