在自定义层中升级(覆盖)整个配方 [英] Upgrading (overriding) an entire recipe in a custom layer
问题描述
我在项目中有一个自定义层.与同事共享.
I have a custom layer in project. This gets shared with colleagues.
我的发行版(戳)它使用的是较旧版本的alsa.这将在构建区域的初始设置中下载.我想用较新的版本替换"该版本的alsa,并在我的自定义层中执行此操作,这样他们就不必编辑/替换poky中的配方.
My distro (poky) it uses a older version of alsa. This gets downloaded on initial setup of the build area. I would like to 'replace' that version of alsa with a later version and do this within my custom layer, so that they don't have to edit/replace recipes in poky.
执行此操作的最佳方法是什么?如果我只是下载较新的配方并将其包括在我的图层中(与文件系统名称匹配),它将自动使用更高版本,还是我需要做其他事情?
What's the best way to do this? If I just download the newer recipe and include it in my layer (matching the file system names) will it automatically use the later version or is there something else I need to do?
推荐答案
进行方法是正确的方法,应在自己的图层上添加新的配方/bbappend文件,而不应修改Yocto的基本图层默认情况下也不是第三方层.但是,由于要添加现有食谱的新版本,因此请记住:
The way you proceeded is the right way, you should add new recipes/bbappend files on your own layer(s), you shouldn't modify Yocto's base layers nor third-party layers by default. Nevertheless, since you want to add a newer version of an existing recipe, you should keep in mind that:
- 您必须检查自己层的优先级以及包含原始配方的层的优先级.Yocto将选择优先级较高的层的配方,而不管它是不是较新的版本(忽略
PV
).有关更多信息,请在《 Yocto项目参考手册》中搜索BBFILE_PRIORITY
.(您还可以使用bitbake-layers show-layers
命令查看所有已配置层的列表及其优先级) - 对于两层具有相同优先级的情况,Yocto将使用最高
PV
来构建配方(您可以在配方内或其文件名 recipename_pv中检查/设置此值.bb ).另外,如果您希望选择其他版本而不是当前正在构建的版本,则只需在 distro.conf 或 PREFERRED_VERSION_recipename = wantedPV > local.conf 文件.
- You have to check the priority of your own layer and the priority of the layer that contains the original recipe. Yocto will pick the recipe of the higher priority layer, no matter if it is a newer version or not (ignoring
PV
). For further information, search forBBFILE_PRIORITY
in the Yocto Project Reference Manual. (You can also see a list of all configured layers along with their priorities with the commandbitbake-layers show-layers
) - In the case of both layers having the same priority, Yocto will build the recipe with the highest
PV
(you can check/set this value inside your recipe or in its filename recipename_pv.bb). Alternatively, if you wish to select another version rather than the one that is being currently built, you can just set the variablePREFERRED_VERSION_recipename = desiredPV
in your distro.conf or local.conf file.
这篇关于在自定义层中升级(覆盖)整个配方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!