在 python 中编写的 Yocto 配方在尝试使用 Bitbake 构建时给我一个错误
Yocto recipe written in python giving me an error when trying to build with Bitbake
这是我第一次遇到用 python 编写的食谱文件,它给我一个错误。错误是:
../meta-intel/recipes-rt/images/core-image-rt.bb: Error executing a python function in <code>:
这是来自 meta-intel 分支“[master] intel-vaapi-driver: 2.1.0 -> 2.2.0”的配方。
我的 poky 版本是“[morty] 文档:针对 2.2.4 发布日期更新了手动修订 table。
我的 BITBAKE 版本是:"BitBake Build Tool Core version 1.32.0"
core-image-rt.bb的内容是:
require recipes-core/images/core-image-minimal.bb
# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers.
python () {
if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt":
raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it")
}
DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
real-time test suite and tools appropriate for real-time use."
DEPENDS += "linux-intel-rt"
IMAGE_INSTALL += "rt-tests hwlatdetect"
LICENSE = "MIT"
如果您需要任何其他信息,请告诉我,我会尽力提供。
我通常可以在我的 ubuntu 机器上构建图像,但我相信我从来没有构建过在其中编写食谱的图像 python
您使用的 API 与 g.getVar 方法不兼容。在morty版本中作为最后一个使用旧方法使用第二个参数的版本,仍然需要提供布尔参数:
...
if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-intel-rt":
...
请查看其中一个 commit,它会在下一版本中删除它。
这是我第一次遇到用 python 编写的食谱文件,它给我一个错误。错误是:
../meta-intel/recipes-rt/images/core-image-rt.bb: Error executing a python function in <code>:
这是来自 meta-intel 分支“[master] intel-vaapi-driver: 2.1.0 -> 2.2.0”的配方。
我的 poky 版本是“[morty] 文档:针对 2.2.4 发布日期更新了手动修订 table。
我的 BITBAKE 版本是:"BitBake Build Tool Core version 1.32.0"
core-image-rt.bb的内容是:
require recipes-core/images/core-image-minimal.bb
# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers.
python () {
if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt":
raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it")
}
DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
real-time test suite and tools appropriate for real-time use."
DEPENDS += "linux-intel-rt"
IMAGE_INSTALL += "rt-tests hwlatdetect"
LICENSE = "MIT"
如果您需要任何其他信息,请告诉我,我会尽力提供。
我通常可以在我的 ubuntu 机器上构建图像,但我相信我从来没有构建过在其中编写食谱的图像 python
您使用的 API 与 g.getVar 方法不兼容。在morty版本中作为最后一个使用旧方法使用第二个参数的版本,仍然需要提供布尔参数:
...
if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-intel-rt":
...
请查看其中一个 commit,它会在下一版本中删除它。