Merge pull request #75 from night1rider/kirkstone-bugreport-pr72-appendfix

Kirkstone bugreport pr72 appendfix
pull/77/head
András Fekete 2024-02-14 14:59:07 -05:00 committed by GitHub
commit 15949058f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 128 additions and 49 deletions

101
README.md
View File

@ -37,63 +37,78 @@ git clone https://github.com/wolfSSL/meta-wolfssl.git
After installing your build's Yocto/OpenEmbedded components: After installing your build's Yocto/OpenEmbedded components:
1. Insert the 'meta-wolfssl' layer location into your build's bblayers.conf 1. Insert the 'meta-wolfssl' layer location into your build's bblayers.conf
file, in the BBLAYERS section: file, in the BBLAYERS section:
``` ```
BBLAYERS ?= " \ BBLAYERS ?= " \
... ...
/path/to/yocto/poky/meta-wolfssl \ /path/to/yocto/poky/meta-wolfssl \
... ...
" "
``` ```
2. Once the 'meta-wolfssl' layer has been added to your BBLAYERS collection, 2. Once the 'meta-wolfssl' layer has been added to your BBLAYERS collection,
you then will need to go to the local.conf file located in you have two options
meta-wolfssl/conf/. The products that you want to compile will need to be
uncommented. 1. If you want to directly add wolfssl recipes to your image recipe
proceed to step 3.
As an example if wolfssh is desired the following needs to occur:
From "meta-wolfssl" directory 2. If you want to run `bitbake wolf*` on a particular recipe then it needs
``` uncommented in `local.conf` located in `meta-wolfssl/conf/`.
$ vim conf/layer.conf
``` As an example if wolfssh is desired the following needs to occur:
Then look for the text: From "meta-wolfssl" directory
``` ```
# Uncomment if building wolfssh with wolfssl $ vim conf/layer.conf
#BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \ ```
# ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend" Then look for the text:
``` ```
Then uncomment by removing the #, it should look like this afterwards # Uncomment if building wolfssh with wolfssl
``` #BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \
# Uncomment if building wolfssh with wolfssl # ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend"
BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \ ```
Then uncomment by removing the #, it should look like this afterwards
```
# Uncomment if building wolfssh with wolfssl
BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \
${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend" ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend"
``` ```
This needs to be done in order to preform a bitbake operation on any of the This needs to be done in order to preform a bitbake operation on any of the
products or tests. You should uncomment products you want to use and recipes.
comment out products you don't want to use to avoid uneeded --enable-options
in your wolfssl version. wolfssl and wolfclu uncommented by default. You should make sure to comment out recipes you don't want to use to
avoid uneeded --enable-options in your wolfssl version. wolfssl is
uncommented by default.
3. Once the products that need to be compiled are uncommented, Once the recipes that need to be compiled are uncommented,
you can build the individual product recipes to make sure they compile you can build the individual product/test recipes to make sure they
successfully: compile successfully:
``` ```
$ bitbake wolfssl $ bitbake wolfssl
$ bitbake wolfssh $ bitbake wolfssh
$ bitbake wolfmqtt $ bitbake wolfmqtt
$ bitbake wolftpm $ bitbake wolftpm
$ bitbake wolfclu $ bitbake wolfclu
``` ```
4. Edit your build's local.conf file to install the libraries you would like
included (ie: wolfssl, wolfssh, wolfmqtt, wolftpm) by adding a 3. Edit your build's local.conf file to install the recipes you would like
IMAGE_INSTALL:append line: included (ie: wolfssl, wolfssh, wolfmqtt, wolftpm) by adding a
IMAGE_INSTALL:append line:
``` ```
IMAGE_INSTALL:append = " wolfssl wolfssh wolfmqtt wolftpm wolfclu " IMAGE_INSTALL:append = " wolfssl wolfssh wolfmqtt wolftpm wolfclu "
``` ```
This will add the necassary --enable-* options necassary to use your
specific combination of recipes.
If you did step 2.2 make sure you comment out recipes that you don't desire
because leaving them uncommented may add unneed --enable-* options in your
build, which could increase the size of the build and turn on uneeded
features.
Once your image has been built, the default location for the wolfSSL library Once your image has been built, the default location for the wolfSSL library
on your machine will be in the "/usr/lib" directory. on your machine will be in the "/usr/lib" directory.

View File

@ -5,29 +5,93 @@ BBPATH := "${LAYERDIR}:${BBPATH}"
BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssl/*.bb \ BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssl/*.bb \
${LAYERDIR}/recipes-wolfssl/wolfssl/*.bbappend" ${LAYERDIR}/recipes-wolfssl/wolfssl/*.bbappend"
#Comment out if you don't want to use wolfclu BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfclu/*.bb \ 'wolfssl', \
${LAYERDIR}/recipes-wolfssl/wolfclu/*.bbappend" '${LAYERDIR}/recipes-wolfssl/wolfssl/*.bb ${LAYERDIR}/recipes-wolfssl/wolfssl/*.bbappend', \
'', d)}"
#Comment out if you don't want to use wolfclu
#BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfclu/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolfclu/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfclu', \
'${LAYERDIR}/recipes-wolfssl/wolfclu/*.bb ${LAYERDIR}/recipes-wolfssl/wolfclu/*.bbappend', \
'', d)}"
# Uncomment if wanting to use example test/benchmark for wolfcrypt
#BBFILES += "${LAYERDIR}/recipes-examples/wolfcrypt/wolfcryptbenchmark/*.bb \
#BBFILES += "${LAYERDIR}/recipes-examples/wolfcrypt/wolfcrypttest/*.bb \
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfcryptbenchmark', \
'${LAYERDIR}/recipes-examples/wolfcrypt/wolfcryptbenchmark/*.bb', \
'', d)}"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfcrypttest', \
'${LAYERDIR}/recipes-examples/wolfcrypt/wolfcrypttest/*.bb', \
'', d)}"
# Uncomment if wanting to use example tests
#BBFILES += "${LAYERDIR}/recipes-examples/*/*/*.bb \
# ${LAYERDIR}/recipes-examples/*/*/*.bbappend"
# Uncomment if building wolfssh with wolfssl # Uncomment if building wolfssh with wolfssl
#BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \ #BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend" # ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfssh', \
'${LAYERDIR}/recipes-wolfssl/wolfssh/*.bb ${LAYERDIR}/recipes-wolfssl/wolfssh/*.bbappend', \
'', d)}"
# Uncomment if building wolfmqtt with wolfssl # Uncomment if building wolfmqtt with wolfssl
#BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bb \ #BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bbappend" # ${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfmqtt', \
'${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bb ${LAYERDIR}/recipes-wolfssl/wolfmqtt/*.bbappend', \
'', d)}"
# Uncomment if building wolftpm with wolfssl # Uncomment if building wolftpm with wolfssl
#BBFILES += "${LAYERDIR}/recipes-wolfssl/wolftpm/*.bb \ #BBFILES += "${LAYERDIR}/recipes-wolfssl/wolftpm/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolftpm/*.bbappend" # ${LAYERDIR}/recipes-wolfssl/wolftpm/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolftpm', \
'${LAYERDIR}/recipes-wolfssl/wolftpm/*.bb ${LAYERDIR}/recipes-wolfssl/wolftpm/*.bbappend', \
'', d)}"
# Uncomment if building wolfssl-py
# BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfssl-py/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolfssl-py/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfssl-py', \
'${LAYERDIR}/recipes-wolfssl/wolfssl-py/*.bb ${LAYERDIR}/recipes-wolfssl/wolfssl-py/*.bbappend', \
'', d)}"
# Uncomment if building wolfcrypt-py
# BBFILES += "${LAYERDIR}/recipes-wolfssl/wolfcrypt-py/*.bb \
# ${LAYERDIR}/recipes-wolfssl/wolfcrypt-py/*.bbappend"
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolfcrypt-py', \
'${LAYERDIR}/recipes-wolfssl/wolfcrypt-py/*.bb ${LAYERDIR}/recipes-wolfssl/wolfcrypt-py/*.bbappend', \
'', d)}"
# Uncomment if wanting to use example tests for wolfssl-py/wolfcrypt-py
#BBFILES += "${LAYERDIR}/recipes-examples/wolfssl-py/wolf-py-tests/*.bb \
BBFILES += "${@bb.utils.contains('IMAGE_INSTALL', \
'wolf-py-tests', \
'${LAYERDIR}/recipes-examples/wolfssl-py/wolf-py-tests/*.bb', \
'', d)}"
# Uncomment if building curl with wolfSSL. # Uncomment if building curl with wolfSSL.
#BBFILES += "${LAYERDIR}/recipes-support/curl/*.bbappend" #BBFILES += "${LAYERDIR}/recipes-support/curl/*.bbappend"
# Uncomment if building OpenSSH with wolfSSL. # Uncomment if building OpenSSH with wolfSSL.
#BBFILES += "${LAYERDIR}/recipes-connectivity/openssh/*.bbappend" #BBFILES += "${LAYERDIR}/recipes-connectivity/openssh/*.bbappend"