meta-wolfssl icon indicating copy to clipboard operation
meta-wolfssl copied to clipboard

How can I build wolftpm examples with Yocto?

Open pclass-isolated opened this issue 1 year ago • 6 comments

How can I enable the wolftpm examples? I am looking to build the examples found here: https://github.com/wolfSSL/wolfTPM/tree/master/examples

In my own layer, I created my own recipes-wolfssl/wolftpm/wolftpm_%.bbappend and added the following:

EXTRA_OECONF += " --enable-infineon --enable-examples "

I can see that the --enable-examples and --enable-infineon flags are used in the build - however I see no examples built in the output 'image' directory or root file system in the final image.

run.do_configure.1073921: bbnote "Running $cfgscript --build=x86_64-linux --host=aarch64-poky-linux --target=aarch64-poky-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/developer/company-nxp-bsp/build-imx8plus/tmp/work/armv8a-poky-linux/wolftpm/3.2.0-r0/recipe-sysroot --with-wolfcrypt=/home/developer/company-nxp-bsp/build-imx8plus/tmp/sysroots-components/armv8a/wolfssl/usr --enable-infineon --enable-examples --disable-static $@"

pclass-isolated avatar Sep 12 '24 01:09 pclass-isolated

Hi @pclass-isolated ,

It looks like we will have to add support for that. Which wolfTPM examples are you interested in having built and installed with Yocto?

Can you tell us more about your project and use-case?

Thanks, David Garske, wolfSSL

dgarske avatar Sep 12 '24 16:09 dgarske

Hi @dgarske,

Thanks for the response. I am interested specifically in these attestation examples: https://github.com/wolfSSL/wolfTPM/tree/master/examples/attestation

However, I think the entire TPM examples directory would be great to have to evaluate the library against my TPM.

I am working on an arm64 based embedded Linux project that needs to interact with the TPM pretty extensively and remote attestation is one of the goals.

Thanks, Phil

pclass-isolated avatar Sep 12 '24 17:09 pclass-isolated

Hi @pclass-isolated ,

We have made some progress getting the TPM examples added. The current development branch is here -> https://github.com/aidangarske/meta-wolfssl/blob/yoctoSupport/recipes-wolfssl/wolftpm/wolftpm_%25.bbappend We should have a PR up soon.

Thanks, David Garske, wolfSSL

dgarske avatar Oct 22 '24 14:10 dgarske

@dgarske - Awesome! Thanks for updating me on this.

pclass-isolated avatar Oct 23 '24 13:10 pclass-isolated

Hi @pclass-isolated,

There is a pr up now for wolfTPM example support with yocto found here --> #92 Please give it a try and let me know how it works with your tpm!

Thank you, Aidan Garske, wolfSSL

aidangarske avatar Oct 25 '24 01:10 aidangarske

Hi @pclass-isolated ,

I wanted to make sure you saw the wolfTPM example was added in PR #92 . Do you have any feedback?

Thanks, David Garske, wolfSSL

dgarske avatar Jan 30 '25 15:01 dgarske