You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

构建Digi Embedded Yocto时出现BitBake Fetcher失败问题求助

解决Digi Embedded Yocto构建中linux-dey fetch失败(exit code 128)的问题

问题场景

按照Digi Embedded Yocto 4.0官方文档构建项目,采用Docker容器部署且未做任何自定义修改,但执行bitbake dey-image-qt时,linux-dey-5.15-r0的do_fetch任务失败,git克隆命令返回exit code 128且无输出。手动在Linux/Windows主机及容器内均可正常克隆目标仓库并检出指定分支。

关键错误日志:

ERROR: linux-dey-5.15-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="..." git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/digi-embedded/linux.git /home/dey/workspace/downloads/git2/github.com.digi-embedded.linux.git --progress failed with exit code 128, no output
ERROR: linux-dey-5.15-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/digi-embedded/linux.git;protocol=https;branch=v5.15/stm/dey-4.0/maint')
ERROR: Task (/usr/local/dey-4.0/sources/meta-digi/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb:do_fetch) failed with exit code '1'

解决方案

1. 检查容器内Git代理配置

主机代理配置未传递到容器或容器内代理配置异常可能导致该问题:

  • 进入容器后查看Git全局配置:
    git config --global --list
    
  • 若存在错误代理配置,执行清除命令:
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
  • 若需要代理,手动设置容器内环境变量:
    export http_proxy=http://your-proxy-address:port
    export https_proxy=http://your-proxy-address:port
    

2. 手动预克隆仓库到Yocto缓存目录

Yocto优先使用下载目录缓存,手动将仓库克隆到指定路径:

git clone --bare --mirror https://github.com/digi-embedded/linux.git /home/dey/workspace/downloads/git2/github.com.digi-embedded.linux.git

完成后重新执行bitbake dey-image-qt,Yocto会跳过fetch步骤直接复用缓存。

3. 验证容器内用户目录权限

确认dey用户对下载目录拥有读写权限:

sudo chown -R dey:dey /home/dey/workspace/downloads

4. 临时修改Recipe的Git参数

修改linux-dey_5.15.bb中的SRC_URI配置,简化参数规避潜在冲突:

SRC_URI = "git://github.com/digi-embedded/linux.git;protocol=https;branch=v5.15/stm/dey-4.0/maint"

或添加nocheckout=1参数减少fetch阶段操作,再重新执行构建。

内容的提问来源于stack exchange,提问作者Tom Reinke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 22:15:01