custom license in bb file of yocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

custom license in bb file of yocto

跳至解决方案
11,917 次查看
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?

标记 (1)
0 项奖励
回复
1 解答
10,511 次查看
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,

在原帖中查看解决方案

2 回复数
10,512 次查看
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,

10,511 次查看
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 项奖励
回复