如何在 yocto 构建期间从 bitbake bb 文件执行 python 脚本

How to execute python script from bitbake bb file during yocto build

问题: 与主题相同 - 我想在 yocto 构建期间执行 python 脚本。

问题描述: 我已经准备好 python 脚本 我想在处理某些元层的 bb 文件期间执行。我不知道如何正确地做到这一点。在这种情况下有人可以支持我吗?

所有 "do_{something}" 步骤 运行 bash 命令,应该可以 运行 python 脚本。

您可能想要 运行 它在 do_install 中。

或者,您可以在 python 中 运行 这些步骤而不是 bash,方法是在步骤名称前写上 python。例如:

python do_install{

我没有亲自测试过这些,但我在不同的配方文件中看到了这个(例如 opencv 配方)