2
votes

I am new to bitbake. and I have multiple questions all related to each other.

  1. I am trying to remove all the packages that are GPLv3 from my package. i see that there are .bb files for both versions (gplv2 and gplv3 or other license types as applicable), of packages in meta/recipes-*/ folders. If I use INCOMPATIBLE_LICENSE=GPLv3 it removes all the packages that are GPLv3. But I want to include some packages that are GPLv3. where do i specify this. I do see a BBFILES flag in the bblayers.conf in poky/build/conf dir. is this this place to add the specific recipes?
  2. Another question i have is, If i want to use a specific .bb file out of the multiple .bb files in the recipes-/ folder how do i do that. for example

/recipes-extended/tar/tar_1.17.bb /tar_1.27.1.bb

In this case, how do i pick tar_1.17.bb and ignore 1.27.bb. This is just one example. There is a "bitbake -b" command that takes .bb file as input but that will build only that .bb file and ignore dependencies according to the documentation. I want to build the complete package and be able to pick and ignore a specific .bb file.

  1. So, how does bitbake pick and more pricisely which .bb file does bitbake pick when there are multiple .bb files in the recipe folder.
2

2 Answers

3
votes

1 There's no way to do that. What would the purpose be? Normally, if you want to avoid GPLv3, you want a completely GPLv3 free image

There's one way to circumvent the system. You can set INCOMPATIBLE_LICENSE_pn-<package/recipe name> = "" That will allow you to build the package. However, don't use this for production, unless you really know what you're doing.

2/3: Normally the highest version will be built. You can use PREFERRED_VERSION_<package name> in local.conf or in your distro, to select another version. Another way is to add DEFAULT_PREFERENCE = "-1" to the recipe you don't want to build.

0
votes

You should be able to set

WHITELIST_<spdx_license> += "<name of the package which you want to white list>"

Not very well documented but the code is in poky/meta/base.bbclass