Hi Steven,
Please see my comments inline
On 24/09/2021 14:10, Monsees, Steven C (US) via lists.yoctoproject.org wrote:
The one solution I found says : Add *LICENSE_PATH += "${LAYERDIR}/custom-licenses"* under conf/layer.conf, *this does not resolve this warning*.
This is a new item being added to our Yocto build.
The Data Direct vendor does not submit their code to Yocto because they sell thier code.
We are adding code to Yocto that has a private license and we are attempting to have Yocto accept the license, *is this proper way to handle this ?*
I am a bit confused, but can try to show you what I typically do.
In my custom meta-my-layer I add to layer.conf:
#-->
LICENSE_PATH += " ${LAYERDIR}/custom-licenses"
CUSTOM_COMMON_LICENSE_DIR := '${@os.path.normpath("${LAYERDIR}/custom-licenses")}'
BB_HASHBASE_WHITELIST_append = " CUSTOM_COMMON_LICENSE_DIR"
#<--
underneath the custom-licenses dir in this meta-my-layer I put the custom "hello-license".
*Can you tell me the proper way to add a custom license to a recipe in yocto ?*
Once you did something like mentioned above you can add the license to the recipe you use to build the funny component of your supplier.
example_0.1.bb:
LICENSE = "hello-license"
LIC_FILES_CHKSUM = "file://${CUSTOM_COMMON_LICENSE_DIR}/hello-license;beginline=5;endline=12;md5=36e6988a930e054886e6af19372edb07"
If you want to get fancy, since it does not seem to be an open source license, you can mark it also as:
LICENSE_FLAGS = "commercial" in the recipe
but then you need to whitelist e.g. in your local.conf to be able to bitbake it:
# whitelist example recipe, which is under a commercial license
LICENSE_FLAGS_WHITELIST = "commercial_example"
Thanks,
Steve
Hope this helps,
Regards,
Robert