Yocto:使用 Bitbake 构建图像时出错

Yocto: Error in building an image using Bitbake

我正在尝试按照 Yocto 中描述的图像构建说明进行操作。我做了完全相同的事情,另外我释放了高达 150GB 的存储空间 space 用于图像构建。但是,当我 运行 bitbake imx-image-core 时出现以下错误:

Initialising tasks: 100% |##################################################| Time: 0:00:03
Sstate summary: Wanted 2482 Found 0 Missed 2482 Current 82 (0% match, 3% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
WARNING: bjam-native-1.71.0-r0 do_fetch: Failed to fetch URL https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2, attempting MIRRORS if available
WARNING: cwautomacros-native-20110201-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/cwautomacros.berlios/cwautomacros-20110201.tar.bz2, attempting MIRRORS if available
WARNING: socat-1.7.3.3-r0 do_fetch: Failed to fetch URL http://www.dest-unreach.org/socat/download/socat-1.7.3.3.tar.bz2, attempting MIRRORS if available
WARNING: linux-imx-headers-5.4-r0 do_fetch: Failed to fetch URL git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0, attempting MIRRORS if available
WARNING: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Failed to fetch URL git://github.com/llvm/llvm-project;protocol=https;branch=release/9.x, attempting MIRRORS if available
ERROR: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1974"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/sami/edm_yocto/sources/poky/scripts:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot/usr/bin/crossscripts:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/bin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/bin:/home/sami/edm_yocto/sources/poky/bitbake/bin:/home/sami/edm_yocto/build-xwayland/tmp/hosttools"; export HOME="/home/sami"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://github.com/llvm/llvm-project /home/sami/edm_yocto/downloads//git2/github.com.llvm.llvm-project --progress failed with exit code 128, output:
Cloning into bare repository '/home/sami/edm_yocto/downloads//git2/github.com.llvm.llvm-project'...
remote: Enumerating objects: 5546825, done.        
remote: Counting objects: 100% (2383/2383), done.        
remote: Compressing objects: 100% (1430/1430), done.        
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

ERROR: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Fetcher failure for URL: 'git://github.com/llvm/llvm-project;protocol=https;branch=release/9.x'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/temp/log.do_fetch.22673
ERROR: Task (/home/sami/edm_yocto/sources/meta-clang/recipes-devtools/clang/llvm-project-source.bb:do_fetch) failed with exit code '1'
ERROR: linux-imx-headers-5.4-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1974"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/sami/edm_yocto/sources/poky/scripts:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot/usr/bin/crossscripts:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/bin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/bin:/home/sami/edm_yocto/sources/poky/bitbake/bin:/home/sami/edm_yocto/build-xwayland/tmp/hosttools"; export HOME="/home/sami"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://source.codeaurora.org/external/imx/linux-imx.git /home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git --progress failed with exit code 128, output:
Cloning into bare repository '/home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git'...
remote: Enumerating objects: 24, done.        
remote: Counting objects: 100% (24/24), done.        
remote: Compressing objects: 100% (22/22), done.        
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

ERROR: linux-imx-headers-5.4-r0 do_fetch: Fetcher failure for URL: 'git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/temp/log.do_fetch.5664
ERROR: Task (/home/sami/edm_yocto/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx-headers_5.4.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3098 tasks of which 945 didn't need to be rerun and 2 failed.

Summary: 2 tasks failed:
  /home/sami/edm_yocto/sources/meta-clang/recipes-devtools/clang/llvm-project-source.bb:do_fetch
  /home/sami/edm_yocto/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx-headers_5.4.bb:do_fetch
Summary: There were 7 WARNING messages shown.
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.

我看到错误来自克隆此 repo:git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0

当我手动克隆这个 repo 时,我工作得很好,但是当我 运行 bitbake 时,它​​一次又一次地产生相同的错误。我该如何解决这个问题?这实际上是来自这个 repo 吗?

谢谢

构建中的问题来自 2 git-存储库 llvm-projectlinux-imx-headers 的提取(克隆)失败。之前的回答中提出了多种解决方案:

  1. 确保安装所需的主机包部分here中提到的所有要求都安装在您的主机中,并且您是运行 如前所述,在 Ubuntu18 或 Ubuntu20 上。 (如果您 运行 使用不同的版本,您可能会遇到此类意外问题)。

  2. 可能是缺少openssl包的问题()

    sudo apt update && sudo apt install openssl curl gnutls-bin

  3. 您可能需要升级http post缓冲区,检查 The remote end hung up unexpectedly while git cloning

  4. 可能只是网络连接不好,如

最后一件事,当您再次尝试构建时,首先尝试通过将选项 -c cleansstate 添加到 bitbake 构建命令来清理状态缓存,如下所示:

bitbake -c cleansstate imx-image-core

然后再次执行正常的构建命令

bitbake imx-image-core