Updated the readme with QEMU information
parent
8e7604e928
commit
9530fc6738
59
README.md
59
README.md
|
@ -341,6 +341,65 @@ to add a DNS server to /etc/resolv.conf like such with root perms
|
||||||
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
|
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Running Image on the QEMU
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
To run meta-wolfssl image on the QEMU (Quick EMUlator) you can follow these
|
||||||
|
general steps. For this example we will use the Yocto Project Poky.
|
||||||
|
|
||||||
|
1. Initialize the Build
|
||||||
|
This can be done by running these commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd poky
|
||||||
|
$ source oe-init-build-env
|
||||||
|
```
|
||||||
|
|
||||||
|
This will initialize the build environment and let you run
|
||||||
|
bitbake in the build directory.
|
||||||
|
|
||||||
|
2. Run bitbake
|
||||||
|
Next you can run bitbake to build the OS image that you want. Make sure
|
||||||
|
you have the correct variables added in the `local.conf` For this example
|
||||||
|
we will run `core-image-base`. Which can be built by running this comamnd
|
||||||
|
from the `build` directoy:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ bitbake core-image-base
|
||||||
|
```
|
||||||
|
|
||||||
|
This will run bitbake and build the image with your added
|
||||||
|
meta-wolfssl recipes.
|
||||||
|
|
||||||
|
3. Run the Image in QEMU
|
||||||
|
You can now simulate your image with the QEMU This can be done by running
|
||||||
|
the qemu that comes in your Yocto Project the default system is usually
|
||||||
|
`qemux86-64` but you can find what its set to by looking at your `local.conf`.
|
||||||
|
We can run this command to start the emulator:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ runqemu qemux86-64
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Run Your Recipes
|
||||||
|
Now that you are in the QEMU you can navigate your way to the `usr/bin`
|
||||||
|
directory which contains the your wolfssl your applications. Lets say we
|
||||||
|
included these images in our `local.conf`
|
||||||
|
|
||||||
|
```
|
||||||
|
IMAGE_INSTALL:append = " wolfssl wolfcrypttest wolfcryptbenchmark "
|
||||||
|
```
|
||||||
|
|
||||||
|
In that case we can run wolfcrypttest and wolfcryptbenchmark examples from
|
||||||
|
the `usr/bin` directory like so:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./wolfcrypttest
|
||||||
|
$ ./wolfcryptbenchmark
|
||||||
|
```
|
||||||
|
|
||||||
|
This will run the wolfcrypt test and benchmark examples from the QEMU.
|
||||||
|
|
||||||
wolfProvider
|
wolfProvider
|
||||||
------------
|
------------
|
||||||
To build wolfProvider view the instructions in this [README](recipes-wolfssl/wolfprovider/README.md)
|
To build wolfProvider view the instructions in this [README](recipes-wolfssl/wolfprovider/README.md)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
wolfTPM Examples
|
wolfTPM Examples
|
||||||
================
|
================
|
||||||
|
|
||||||
Several wolfTPM example applications are included
|
Several wolfTPM example applications are included in this
|
||||||
in this layer, these include:
|
layer, these include:
|
||||||
|
|
||||||
- attestation
|
- attestation
|
||||||
- endorsement
|
- endorsement
|
||||||
|
@ -33,10 +33,9 @@ This can be compiled with bitbake using:
|
||||||
$ bitbake wolftpm
|
$ bitbake wolftpm
|
||||||
```
|
```
|
||||||
|
|
||||||
To install these applications into your image,
|
To install these applications into your image, you will
|
||||||
you will need to edit your "build/conf/local.conf"
|
need to edit your "build/conf/local.conf" file and add
|
||||||
file and add them to the "IMAGE_INSTALL" variable
|
them to the "IMAGE_INSTALL" variable like so:
|
||||||
like so:
|
|
||||||
|
|
||||||
- For Dunfell and newer versions of Yocto
|
- For Dunfell and newer versions of Yocto
|
||||||
```
|
```
|
||||||
|
@ -48,15 +47,20 @@ IMAGE_INSTALL:append = " wolftpm "
|
||||||
IMAGE_INSTALL_append = " wolftpm "
|
IMAGE_INSTALL_append = " wolftpm "
|
||||||
```
|
```
|
||||||
|
|
||||||
When your image builds, these will be installed
|
When your image builds, these will be installed to the
|
||||||
to the `/usr/bin/examples` system directory. When
|
`/usr/bin/examples` system directory. When inside your
|
||||||
inside your executing image, you can run them from
|
executing image, you can run them from the terminal.
|
||||||
the terminal.
|
For example, we can run the wrap test like so from the
|
||||||
|
examples directory:
|
||||||
|
|
||||||
The examples can be excluded from your build by
|
```
|
||||||
deleting the recipe `wolftpm_%bbappend`.
|
$ cd wrap
|
||||||
|
$ ./wrap_test
|
||||||
|
```
|
||||||
|
|
||||||
Refer to the [wolfTPM Examples README](https://github.com/wolfSSL/wolfTPM/blob/master/examples/README.md)
|
The examples can be excluded from your build by deleting
|
||||||
for more information on the examples directory.
|
the recipe `wolftpm_%bbappend`.
|
||||||
Refer to the [meta-wolfssl README](https://github.com/wolfSSL/meta-wolfssl/blob/master/README.md)
|
|
||||||
for more information on setting up your layer.
|
Refer to the [wolfTPM Examples README](https://github.com/wolfSSL/wolfTPM/blob/master/examples/README.md) for more information on the examples directory.
|
||||||
|
|
||||||
|
Refer to the [meta-wolfssl README](https://github.com/wolfSSL/meta-wolfssl/blob/master/README.md) for more information on setting up your layer.
|
||||||
|
|
Loading…
Reference in New Issue