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

Yocto Linux meta recipe for wolfTPM examples

Open aidangarske opened this issue 1 year ago • 3 comments

Description

Added recipes-examples/wolftpm/wolftpm-wrap-test.bb and recipes-examples/wolftpm/wolftpm_%.bbappend to add support for wolfTPM wrap_test example. IMAGE_INSTALL argument for wolftpm examples -> wolftpm-wrap-test Tested on Scarthgap and Kirkstone works on both now. Runs in runqemu qemux86-64 in usr/bin examplescan be ran like this:

./wolftpm-wrap-test

aidangarske avatar Oct 24 '24 23:10 aidangarske

Reviewed again and it seems that resulting script that gets created by libtool uses the host system's paths and not the target systems paths.

Examples: relink_command="(cd /home/msi-debian/WolfWork/yocto/kirkstone/build/tmp/work/core2-64-poky-linux/wolftpm/3.2.0-r0/build; { test -z \" when /home/msi-debian/WolfWork/yocto/kirkstone/build/tmp/work/core2-64-poky-linux/wolftpm/3.2.0-r0/build should be set to /usr/bin as the instructions allude to.

This goes the same for all the tool paths as well so gcc and other tools the script needs don't point to the target's path but the host builder's paths.

Is there a way to override these and provide a path so the libtool script gets generated correctly or is this a change needed in the tooling of wolfTPM?

night1rider avatar Feb 03 '25 19:02 night1rider

@night1rider @dgarske This is the expected output for the wrap test without a tpm simulator. If you wanted to run the full test you need to have a tpm simulator loaded onto your image as well and start the simulator before you run the test. Just like if you were running it locally. I have not tested with the simulator. If you think it would be a good idea to test this fully I can. But this is the same output we get running locally without the simulator. I'll update the readme with this information. So users know to start their tpm/sim before executing the test.

aidangarske avatar Mar 07 '25 06:03 aidangarske

@night1rider @dgarske This is the expected output for the wrap test without a tpm simulator. If you wanted to run the full test you need to have a tpm simulator loaded onto your image as well and start the simulator before you run the test. Just like if you were running it locally. I have not tested with the simulator. If you think it would be a good idea to test this fully I can. But this is the same output we get running locally without the simulator. I'll update the readme with this information. So users know to start their tpm/sim before executing the test.

@aidangarske please add instructions to the README.md for how to setup the TPM simulator with Yocto and QEMU.

dgarske avatar Mar 07 '25 17:03 dgarske