简体   繁体   English

bitbake 如何在构建过程中搜索配方?

[英]How bitbake searches for recipe in build process?

I am trying to find out that how bitbake search for recipe in build process?我试图找出 bitbake 如何在构建过程中搜索配方? For example, I have a recipe something like below:例如,我有一个类似下面的食谱:

DESCRIPTION = "PetaLinux GSTREAMER supported packages"

inherit packagegroup

GSTREAMER_PACKAGES = " \
    gstreamer1.0 \
    gstreamer1.0-python \
    gstreamer1.0-meta-base \
    gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good \
    gstreamer1.0-plugins-bad \
    gstreamer1.0-rtsp-server \
    gst-shark \
    gstd \
    gst-perf \
    gst-interpipes \
    "
GSTREAMER_PACKAGES_append_zynqmp = " gstreamer1.0-omx"

RDEPENDS_${PN} = "${GSTREAMER_PACKAGES}"

When I searched gstreamer1.0 related recipe in yocto layers, I found two recipe, one of them is gstreamer1.0_1.16.1.bb in meta layer, and the other is gstreamer1.0_%.bbappend in meta-petalinux layer.当我在yocto层搜索gstreamer1.0相关recipe时,我发现了两个recipe,一个是meta层的gstreamer1.0_1.16.1.bb ,另一个是meta-petalinux层的gstreamer1.0_%.bbappend

Both of these layers was added to the BBLAYERS in bblayers.conf file and the priorities that spesified with BBFILE_PRIORITY_ * in related layer's layer.conf file is same.这两个层都被添加到bblayers.conf文件中的BBLAYERS中,并且在相关层的 layer.conf 文件中用BBFILE_PRIORITY_ * 指定的优先级是相同的。

So, Which recipe will be used in build process in that case?那么,在这种情况下,构建过程中将使用哪个配方? What is the recipe lookup rules in yocto? yocto 中的食谱查找规则是什么?

I changed somethings to understand the behaviour: For example,我改变了一些东西来理解行为:例如,

  1. I entered the invalid github URL that spesified in gstreamer1.0_%.bbappend recipe.我输入了gstreamer1.0_%.bbappend配方中指定的无效 github URL。 When I tried to build the linux system, I encountered with an error.当我尝试构建linux系统时,遇到了错误。 Thats fine.没关系。
  2. Then I corrected the github URL in this recipe and entered invalid source code address that spesified in gstreamer1.0_1.16.1.bb recipe.然后我更正了此配方中的 github URL 并输入了gstreamer1.0_1.16.1.bb配方中指定的无效源代码地址。 When I tried to build linux system, process finished successfully.当我尝试构建 linux 系统时,过程成功完成。
  3. Then I increased the priority of meta layer.然后我增加了层的优先级。 I supposed to encounter with an error in this case but again build process finished successfully.在这种情况下,我应该遇到错误,但构建过程再次成功完成。

Could you please help me to understand this behaviour?你能帮我理解这种行为吗?

Thanks.谢谢。

You have two different files: a .bb and a .bbappend .您有两个不同的文件:一个.bb和一个.bbappend

A .bb is the base recipe of one (or multiple) packages. .bb是一个(或多个)包的基本配方。 It generally describe how to fetch, configure, compile, install files in a package for your target.它通常描述如何为您的目标获取、配置、编译、安装 package 中的文件。

A .bbappend file is an 'append' file. .bbappend文件是一个“附加”文件。 It allows a meta (here meta-petalinux) to modify an existing recipe in another meta without copying it.它允许一个元(这里是 meta-petalinux)修改另一个元中的现有配方而不复制它。 A .bbappend can modify any steps of the bb file: source fetch, configure, compile, install... .bbappend可以修改 bb 文件的任何步骤:获取源、配置、编译、安装...

You can for example create your own bbappend of Gstreamer, to enable pango (disbaled by default on my Yocto).例如,您可以创建自己的 Gstreamer bbappend,以启用 pango(在我的 Yocto 上默认禁用)。 The bbappend filename is gstreamer1.0-plugins-base_%.bbappend and only contains PACKAGECONFIG_append = "pango" bbappend 文件名是gstreamer1.0-plugins-base_%.bbappend并且只包含PACKAGECONFIG_append = "pango"

The Yocto Manual can give you more information on bbappend files here . Yocto 手册可以在此处为您提供有关 bbappend 文件的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM