且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

bitbake:构建系统如何选择多于一层的配方

更新时间:2023-11-03 23:26:28

层优先级(BBFILE_PRIORITY)和配方版本号(PV,通常从文件名自动生成)将决定使用哪个配方.即使该层中的配方版本较低,也将使用优先级较高的层中的配方,因此版本号仅在层优先级相同的情况下才重要.

Layer priority (BBFILE_PRIORITY) and recipe version number (PV, often automated from filename) will decide which recipe is used. The recipe in higher priority layer will be used even if the recipe version in that layer is lower, so the version numbers should only matter if the layer priorities are the same.

在您的情况下,meta/中的配方没有明确的版本号:PV默认为1.0.

In your case the recipe in meta/ has no explicit version number: PV defaults to 1.0.

您可以使用bitbake-layers show-layers查看所有图层的优先级,例如bitbake -e <recipe> | grep ^PV检查为配方实际选择了哪个版本.要覆盖对特定配方的错误"选择,可以在发行版或本地配置中使用PREFERRED_VERSION_<recipe> = <version>.

You can use bitbake-layers show-layers to see the priorities of all your layers, and e.g. bitbake -e <recipe> | grep ^PV to check which version actually got selected for the recipe. To override a "wrong" selection of a specific recipe you can use PREFERRED_VERSION_<recipe> = <version> in your distro or local configuration.