petalinux2018.3编译sdk失败的解决办法
由于公司用的xilinx产品,大都是老版本,因此在转linux时,为减少切换麻烦,petalinux也是用的2018.3
编译kernel/u-boot/root-fs一切正常,但在编译SDK时,报失败。
失败信息如下:
NOTE: Executing RunQueue Tasks ERROR: nativesdk-qemu-xilinx-v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0 do_compile: oe_runmake failed ERROR: nativesdk-qemu-xilinx-v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0 do_compile: Function failed: do_compile (log file is located at /data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/temp/log.do_compile.27743) ERROR: Logfile of failure stored in: /data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/temp/log.do_compile.27743 Log data follows: | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common'] | DEBUG: Executing shell function do_compile | NOTE: make -j 12 | GIT ui/keycodemapdb capstone | Cloning into '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/capstone'... | fatal: unable to connect to git.qemu.org: | git.qemu.org[0: 20.218.248.100]: errno=Connection timed out | | fatal: clone of 'git://git.qemu.org/capstone.git' into submodule path '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/capstone' failed | Failed to clone 'capstone'. Retry scheduled | Cloning into '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/ui/keycodemapdb'... | fatal: unable to connect to git.qemu.org: | git.qemu.org[0: 20.218.248.100]: errno=Connection timed out | | fatal: clone of 'git://git.qemu.org/keycodemapdb.git' into submodule path '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/ui/keycodemapdb' failed | Failed to clone 'ui/keycodemapdb'. Retry scheduled | Cloning into '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/capstone'... | fatal: unable to connect to git.qemu.org: | git.qemu.org[0: 20.218.248.100]: errno=Connection timed out | | fatal: clone of 'git://git.qemu.org/capstone.git' into submodule path '/data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/capstone' failed | Failed to clone 'capstone' a second time, aborting | ./scripts/git-submodule.sh: failed to update modules | | Unable to automatically checkout GIT submodules ' ui/keycodemapdb capstone'. | If you require use of an alternative GIT binary (for example to | enable use of a transparent proxy), then please specify it by | running configure by with the '--with-git' argument. e.g. | | $ ./configure --with-git='tsocks git' | | Alternatively you may disable automatic GIT submodule checkout | with: | | $ ./configure --disable-git-update' | | and then manually update submodules prior to running make, with: | | $ scripts/git-sbumodule.sh update ui/keycodemapdb capstone | | make: *** [Makefile:39: git-submodule-update] Error 1 | ERROR: oe_runmake failed | WARNING: /data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/temp/run.do_compile.27743:1 exit 1 from 'exit 1' | ERROR: Function failed: do_compile (log file is located at /data/02.src_code/projects/peta2018_board/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/temp/log.do_compile.27743) ERROR: Task (virtual:nativesdk:/data/petalinux2018/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb:do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 3177 tasks of which 3091 didn't need to be rerun and 1 failed. Summary: 1 task failed: virtual:nativesdk:/data/petalinux2018/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb:do_compile Summary: There were 2 ERROR messages shown, returning a non-zero exit code. ERROR: Failed to build project
从错误提示来看,是在获取qemu所需要的capstone与keycodemapdb子模块时,获取失败。
通过链接上去取,即返回404,应该是qemu将git都已经切换了,导致子模块均访问不到了。
搜索网络上不少资料,包括配置git的url instead.of等办法,都不太管用,最终研究了一些信息,综合找到了解决办法。
petalinux 2018编译SDK时,出现git://git.qemu.org/capstone.git及git://git.qemu.org/keycodemapdb.git错误时 进入目录:XXX/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3+gitAUTOINC+f70bd86859-r0/git/.git/ 修改config文件,从 [submodule "capstone"] active = true url = git://git.qemu.org/capstone.git [submodule "ui/keycodemapdb"] active = true url = git://git.qemu.org/keycodemapdb.git 修改为: [submodule "capstone"] active = true url = https://gitlab.com/qemu-project/capstone.git [submodule "ui/keycodemapdb"] active = true url = https://gitlab.com/qemu-project/keycodemapdb.git 然后命令行模式进入目录XXX/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-qemu-xilinx/v2.11.0-xilinx-v2018.3\+gitAUTOINC\+f70bd86859-r0/git 执行命令 git submodule update 之后,重新在工程目录下执行petalinux-build --sdk即可
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人