linux - Yocto:bitbake 退出代码困惑

标签 linux embedded-linux yocto

我在使用 Yocto 构建图像时遇到错误(头晕):

ERROR: Creation of tar /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz failed.

bitbake 命令失败并显示以下报告:

No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

如果我检查文件 xev-dbg-1.2.1-r0.tar.gz,我得到:

$ file  /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz
/mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz: gzip compressed data, from Unix, last modified: Mon Mar 27 20:19:55 201

其余两个错误同理。

我很困惑:

  • 如果出现错误,为什么 bitbake 报告所有任务都已成功?

  • 如果文件创建成功,为什么 bitbake 以非零值退出?

最佳答案

Bitbake 没有返回 0 退出代码。这意味着 bitbake 过程中存在错误。

如图所示,尝试创建 tar 文件时出现 3 个错误。 压缩文件在那里,但不完整。例如。就像您如何下载文件并中断它并且下载文件仍然存在一样。所以我们通常使用 md5sum 或某种哈希值来检查文件的完整性。

更好的理解可能是:Bitbake 试图运行 6292 任务。其中 18 个不需要重新运行。 Bitbake 尝试重新运行其余的 6274(6292-18) 并成功重新运行它们。这并不意味着它们都已成功编译。在重新运行它们的过程中,出现了 13 个警告和 3 个错误。由于 3 个错误,bitbake 返回非零退出代码。

No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

关于linux - Yocto:bitbake 退出代码困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43063159/

相关文章:

linux - Linux 中的 zip 不确定结果

c - Arch Linux 上的 AVR

embedded-linux - Buildroot linux 内核清理构建

c++ - 在 Linux 中,recv() 有效但 recvmsg() 无效

embedded-linux - Yocto SYSTEMD_SERVICE 安装参数化服务 ("@.service")

linux-kernel - yocto 项目中的 U-boot 源码

linux - 在 Linux/Sublime 上的所有文件中搜索未注释的字符串

php - 如何从命令行执行 PHP 代码?

linux-kernel - 在 yocto 上构建 keras 和 TensorFlow

yocto - 使用 yocto/bitbake 时,在不同配方生成的目录中安装文件而不发生冲突的正确方法是什么?