From: Dimi Tomov <dimi@tpm.dev>
To: buildroot@buildroot.org
Cc: Dimitar Tomov <dimi@tpm.dev>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/1] package/wolftpm: new package
Date: Wed, 1 Jun 2022 22:47:46 +0300 [thread overview]
Message-ID: <20220601194746.29106-1-dimi@tpm.dev> (raw)
In-Reply-To: <20220530203001.574908-1-dimi@tpm.dev>
From: Dimitar Tomov <dimi@tpm.dev>
wolfTPM is an open-source TPM 2.0 stack with backward API compatibility,
designed for embedded use. It is highly portable, and has native support
for Linux. wolfTPM has a compact code size with low resource usage.
Signed-off-by: Dimitar Tomov <dimi@tpm.dev>
---
Changes v2 -> v3:
- Applied feedback from the maintainer, list of changes below
- Added new entry to the DEVELOPERS file
- Replaced depends with select for BR2_PACKAGE_WOLFSSL
- Added missing depends for BR2_TOOLCHAIN_HAS_THREADS
- Removed redundant --with-wolfcrypt option
Changes v1 -> v2:
- Fix typo in the hash file and create path before using touch
---
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/wolftpm/Config.in | 15 +++++++++++++++
package/wolftpm/wolftpm.hash | 2 ++
package/wolftpm/wolftpm.mk | 29 +++++++++++++++++++++++++++++
5 files changed, 50 insertions(+)
create mode 100644 package/wolftpm/Config.in
create mode 100644 package/wolftpm/wolftpm.hash
create mode 100644 package/wolftpm/wolftpm.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 71cc3da6d7..c123d1b915 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3072,3 +3072,6 @@ F: package/quazip/
F: package/shapelib/
F: package/simple-mail/
F: package/tinc/
+
+N: Dimi Tomov <dimi@tpm.dev>
+F: package/wolftpm/
diff --git a/package/Config.in b/package/Config.in
index 00f061015f..b287c5a94d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1431,6 +1431,7 @@ menu "Crypto"
source "package/trousers/Config.in"
source "package/ustream-ssl/Config.in"
source "package/wolfssl/Config.in"
+ source "package/wolftpm/Config.in"
endmenu
menu "Database"
diff --git a/package/wolftpm/Config.in b/package/wolftpm/Config.in
new file mode 100644
index 0000000000..23932a4170
--- /dev/null
+++ b/package/wolftpm/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_WOLFTPM
+ bool "wolftpm"
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ select on BR2_PACKAGE_WOLFSSL
+ select on BR2_PACKAGE_WOLFSSL_ALL
+ help
+ wolfTPM is a portable, open-source TPM 2.0 stack with
+ backward API compatibility, designed for embedded use.
+ No external dependencies, compact code size with low
+ resource usage.
+
+ https://www.wolfssl.com/
+
+comment "wolftpm needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/wolftpm/wolftpm.hash b/package/wolftpm/wolftpm.hash
new file mode 100644
index 0000000000..6dbf143ffe
--- /dev/null
+++ b/package/wolftpm/wolftpm.hash
@@ -0,0 +1,2 @@
+# Hash from https://github.com/wolfSSL/wolfTPM/archive/refs/tags/v2.3.1.tar.gz
+sha256 f0d7c095491ac2cc9e44aa4ac3c22febf15942ef080431d8b43a9d0312ca6567 wolftpm-2.3.1.tar.gz
diff --git a/package/wolftpm/wolftpm.mk b/package/wolftpm/wolftpm.mk
new file mode 100644
index 0000000000..1e1ddc13e3
--- /dev/null
+++ b/package/wolftpm/wolftpm.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# wolftpm
+#
+################################################################################
+
+WOLFTPM_VERSION = 2.3.1
+WOLFTPM_SITE = $(call github,wolfSSL,wolfTPM,v$(WOLFTPM_VERSION))
+WOLFTPM_INSTALL_STAGING = YES
+WOLFTPM_LICENSE = GPL-2.0+
+WOLFTPM_LICENSE_FILES = LICENSE
+WOLFTPM_CPE_ID_VENDOR = wolfssl
+
+WOLFTPM_DEPENDENCIES = host-pkgconf
+
+# wolfTPM's source code is released without a configure script,
+# therefore we need autoreconf
+WOLFTPM_AUTORECONF = YES
+
+WOLFTPM_CONF_OPTS = --disable-examples --enable-devtpm
+
+define WOLFTPM_CONFIG_RPATH
+ mkdir $(@D)/build-aux
+ touch $(@D)/build-aux/config.rpath
+endef
+# Fix for autoconf bug with config.rconf
+WOLFTPM_PRE_CONFIGURE_HOOKS += WOLFTPM_CONFIG_RPATH
+
+$(eval $(autotools-package))
--
2.27.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-06-01 19:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 21:20 [Buildroot] [PATCH 1/1] package/wolftpm: new package, wolfTPM library for TPM2.0 Dimi Tomov
2022-05-17 19:05 ` Dimi Tomov
2022-05-30 20:30 ` [Buildroot] [PATCH 1/2] " Dimi Tomov
2022-05-30 20:30 ` [Buildroot] [PATCH 2/2] v2: Fix typo in the hash file and create path before using touch Dimi Tomov
2022-05-30 21:32 ` Thomas Petazzoni via buildroot
2022-05-30 21:31 ` [Buildroot] [PATCH 1/2] package/wolftpm: new package, wolfTPM library for TPM2.0 Thomas Petazzoni via buildroot
2022-06-01 19:47 ` Dimi Tomov [this message]
2022-06-01 19:51 ` [Buildroot] [PATCH 1/1] package/wolftpm: new package Dimi Tomov
2022-06-01 20:50 ` Thomas Petazzoni via buildroot
2022-06-01 21:03 ` Dimi Tomov
2022-06-01 21:36 ` Thomas Petazzoni via buildroot
2022-06-02 5:01 ` Dimi Tomov
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=20220601194746.29106-1-dimi@tpm.dev \
--to=dimi@tpm.dev \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/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