Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/tpm2sh: new package tpm2sh 0.17.2
@ 2026-06-11 10:54 Jarkko Sakkinen via buildroot
  2026-08-06 20:42 ` Fiona Klute via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen via buildroot @ 2026-06-11 10:54 UTC (permalink / raw)
  To: buildroot; +Cc: Jarkko Sakkinen

tpm2sh is a TPM 2.0 command-line shell and troubleshooting tool for Linux
with low dependencies. It communicates directly with /dev/tpm{rm}0. It
is most useful in kernel testing.

Among other things it can be used to query and manipulate the chip
memory:

~ main
❯ tpm2sh memory
HANDLE     CLASS      DETAILS
01c00002   nv-index   rsa-2048:sha256
01c0000a   nv-index   ecc-nist-p256:sha256

~ main
❯ tpm2sh memory 01c0000a
-----BEGIN CERTIFICATE-----
[CENSORED]
-----END CERTIFICATE-----

And all this makes it also sort of useful embedded debugging tool too.

Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
Sorry if I missed some detail. Tried to check but this is my first Rust
package for BR2 so anything is possible.
 package/Config.in          |  1 +
 package/tpm2sh/Config.in   | 18 ++++++++++++++++++
 package/tpm2sh/tpm2sh.hash |  2 ++
 package/tpm2sh/tpm2sh.mk   | 14 ++++++++++++++
 4 files changed, 35 insertions(+)
 create mode 100644 package/tpm2sh/Config.in
 create mode 100644 package/tpm2sh/tpm2sh.hash
 create mode 100644 package/tpm2sh/tpm2sh.mk

diff --git a/package/Config.in b/package/Config.in
index 630662477b..05b5060651 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2888,6 +2888,7 @@ menu "System tools"
 	source "package/tpm-tools/Config.in"
 	source "package/tpm2-abrmd/Config.in"
 	source "package/tpm2-tools/Config.in"
+	source "package/tpm2sh/Config.in"
 	source "package/tpm2-totp/Config.in"
 	source "package/ugetty/Config.in"
 	source "package/unscd/Config.in"
diff --git a/package/tpm2sh/Config.in b/package/tpm2sh/Config.in
new file mode 100644
index 0000000000..5268d0df6e
--- /dev/null
+++ b/package/tpm2sh/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_TPM2SH
+	bool "tpm2sh"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+	select BR2_PACKAGE_HOST_RUSTC
+	select BR2_PACKAGE_HOST_PKGCONF
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
+	select BR2_PACKAGE_LIBOPENSSL
+	help
+	  TPM 2.0 command-line interface.
+
+	  tpm2sh is a command-line interface for interacting with TPM 2.0 chips
+	  directly through /dev/tpm0 or /dev/tpmrm0.
+
+	  https://gitlab.com/tpm-protocol/tpm2sh
+
+comment "tpm2sh needs a toolchain with Rust support"
+	depends on !BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
diff --git a/package/tpm2sh/tpm2sh.hash b/package/tpm2sh/tpm2sh.hash
new file mode 100644
index 0000000000..567a7751f9
--- /dev/null
+++ b/package/tpm2sh/tpm2sh.hash
@@ -0,0 +1,2 @@
+sha256  90b557b6d6a6a8f8e2bf946edf5db18cd33b09245c11d38e8543ff0f486f6a40  tpm2sh-0.17.2-git4-cargo5.tar.gz
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
diff --git a/package/tpm2sh/tpm2sh.mk b/package/tpm2sh/tpm2sh.mk
new file mode 100644
index 0000000000..573eb88ad5
--- /dev/null
+++ b/package/tpm2sh/tpm2sh.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# tpm2sh
+#
+################################################################################
+
+TPM2SH_VERSION = 0.17.2
+TPM2SH_SITE = https://gitlab.com/tpm-protocol/tpm2sh
+TPM2SH_SITE_METHOD = git
+TPM2SH_LICENSE = GPL-3.0-or-later
+TPM2SH_LICENSE_FILES = LICENSE
+TPM2SH_DEPENDENCIES = host-pkgconf openssl
+
+$(eval $(cargo-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-10 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 10:54 [Buildroot] [PATCH] package/tpm2sh: new package tpm2sh 0.17.2 Jarkko Sakkinen via buildroot
2026-08-06 20:42 ` Fiona Klute via buildroot
2026-08-10 15:42   ` Jarkko Sakkinen via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox