-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yocto Linux meta recipe for wolfTPM examples #92
base: master
Are you sure you want to change the base?
Conversation
…to disable or enable examples
ed6529c
to
9530fc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things that need to happen before we can merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a path issue, it is use the original host system's path and not the target systems.
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: 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 |
… stored in .libs for libtools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and now it does seem to execute however the output is lacking?
Is this the expect output of the wrap-test?
root@qemux86-64:~# wolftpm-wrap-test
TPM2 Demo for Wrapper API's
root@qemux86-64:~#
Am I missing some setup, instructions, or packages?
@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. |
@aidangarske please add instructions to the README.md for how to setup the TPM simulator with Yocto and QEMU. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that there are some missing instructions or dependencies not indicated in the README
.
these commands in the build directory: | ||
``` | ||
bitbake wolftpm | ||
bitbake wolftpm-examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be bitbake wolftpm-wrap-test
not bitbake wolftpm-examples
``` | ||
|
||
To add wolfTPM configurations you can add configurations to the | ||
EXTRA_OECONF variable. For example you can enable debug logging like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please specify this configuration variable needs to be in a wolftpm_%.bbappened
to avoid confusion
tpm2-tools \ | ||
tpm2-tss \ | ||
libtss2 \ | ||
libtss2-mu \ | ||
libtss2-tcti-device \ | ||
libtss2-tcti-mssim \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting a ERROR: Nothing RPROVIDES
for all these packages other than the wolfssl/tpm ones, this means that yocto cannot find a package/recipe with the names of all these libraries/tools. Do you have some external meta library plugged in that is not specified here in the README
? This would be in your build/conf/bblayers.conf
file.
I am using kirkstone
, is it possible these tools are included by default with a newer release of yocto?
``` | ||
bitbake core-image-minimal | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing step to enter qemu
for the created target image. I use runqemu nographic
is this appropriate?
|
||
4. Start the TPM simulator (in terminal 1): | ||
``` | ||
sudo swtpm socket --tpmstate dir=/tmp/mytpm1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swtpm
is not found. I assume this has to do with the missing packages as described earlier.
Description
Added
recipes-examples/wolftpm/wolftpm-wrap-test.bb
andrecipes-examples/wolftpm/wolftpm_%.bbappend
to add support for wolfTPM wrap_test example.IMAGE_INSTALL
argument for wolftpm examples ->wolftpm-wrap-test
Tested on
Scarthgap
andKirkstone
works on both now.Runs in
runqemu qemux86-64
inusr/bin
examplescan be ran like this: