custom license in bb file of yocto

cancel
Showing results for 
Search instead for 
Did you mean: 

custom license in bb file of yocto

Jump to solution
2,420 Views
michaelma
Contributor I

I made a recipe "myrecipe.bb" in Yocto, and I add "LICENSE=commercial" in it.

Can i use "commercial" ? or I must use one of these : GPL, MIT, BSD, balabalabala

When I use "LICENSE=commercial", a warning happen when I did "bitbake myrecipe"

"

The license listed commercial was not in the licenses collected for recipe myrecipe

"

how to resolve the warning?

anybody knows?

Tags (1)
0 Kudos
1 Solution
1,014 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello  Michael Ma,

Bitbake will look for the full license document of the license you have selected. It would seem that it has not found the license that corresponds to “commercial”. You may use any license you want as sometimes you need a very specific license for certain packages, but you must provide with the license text to resolve this warning.

You can add the license and the path, which would look something like:

LICENSE_PATH += "${LAYERDIR}/custom-licenses"

This inside your layer.conf file.

I hope this helps!

Regards,

View solution in original post

0 Kudos
2 Replies
1,015 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello  Michael Ma,

Bitbake will look for the full license document of the license you have selected. It would seem that it has not found the license that corresponds to “commercial”. You may use any license you want as sometimes you need a very specific license for certain packages, but you must provide with the license text to resolve this warning.

You can add the license and the path, which would look something like:

LICENSE_PATH += "${LAYERDIR}/custom-licenses"

This inside your layer.conf file.

I hope this helps!

Regards,

View solution in original post

0 Kudos
1,014 Views
michaelma
Contributor I

Thank you for your answer.

I tried your suggestion to add LICENSE_PATH += "${LAYERDIR}/custom-licenses" which contains file "commercial".

  1. Firstly, I run "bitbake core-image-my" which contains my recipe "myrecipe".This warning is still there.
  2. Secondly, I run "bitbake -c clean myrecipe && bitbake -c cleansstate myrecipe", and then "bitbake core-image-my".This warning is gone.

So, I feel that, although adding LICENSE_PATH += "${LAYERDIR}/custom-licenses" , we should clean recipes firstly.

After that, the effect of LICENSE_PATH += "${LAYERDIR}/custom-licenses" will work.

Thank you again, nice answer :smileyhappy:

0 Kudos