All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen via buildroot <buildroot@buildroot.org>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/tpm2sh: new package tpm2sh 0.17.2
Date: Mon, 10 Aug 2026 18:42:10 +0300	[thread overview]
Message-ID: <annxUmPe5G8WQgGy@kernel.org> (raw)
In-Reply-To: <72898e54-5d9d-4b31-bd9a-66136f21ea52@gmx.de>

On Thu, Aug 06, 2026 at 10:42:07PM +0200, Fiona Klute wrote:
> Hi Jarkko!
> 
> Am 11.06.26 um 12:54 schrieb Jarkko Sakkinen via buildroot:
> > 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.
> 
> Looks mostly good, three comments below. Also, when adding a new package,
> please add yourself to DEVELOPERS for that package. :-)
> 
> >   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"
> 
> This should go after package/tpm2-totp to keep the alphabetical ordering.
> 
> >   	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
> 
> Two days after you sent this patch, Rust was updated to 1.97.0 (commit
> e8c8bd9bc56a827db90c3bb2e71e4613a5a2c730) switching to cargo6 format, so
> you'll need to update for that.
> 
> > +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
> 
> I see you've released an 1.0.0 since sending this patch, I suppose updating
> while fixing the other issues would make sense?

Yes, it does. Thanks for the review. It will take some time but I'll
fix the issues, upgrade to 1.0 and put this to shape.

Why this is useful in general for Buildroot is that in general for any
peace of hardware, "stackless" testing tool is useful :-)

> 
> Best regards,
> Fiona
> 
> > +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))
> 

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

      reply	other threads:[~2026-08-10 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=annxUmPe5G8WQgGy@kernel.org \
    --to=buildroot@buildroot.org \
    --cc=fiona.klute@gmx.de \
    --cc=jarkko@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.