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即可

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章