AR# 71240

|

2018.2 Ultra96: PetaLinux fails to build ultra96 BSP without network

描述

In the 2018.2 release, PetaLinux fails to build the ultra96 BSP using sstate cache when the network is disabled through the BB_NO_NETWORK settings in the petalinux-config options.

 
$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Parsing recipes: 100%

|###########################################################################################
Time: 0:01:45
Parsing of 2552 .bb files complete (0 cached, 2552 parsed). 3441 targets, 135 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100%
|###########################################################################################
Time: 0:00:52
Checking sstate mirror object availability: 100% |#####################################################################################| Time: 0:06:34
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: python-pycparser-2.18-r0 do_fetch: Failed to fetch URL https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-2.18.tar.gz, attempting MIRRORS if available
WARNING: python-pyasn1-0.3.6-r0 do_fetch: Failed to fetch URL https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.3.6.tar.gz, attempting MIRRORS if available
ERROR: python-pycparser-2.18-r0 do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-9ak7MadQVj,guid=967b61d95a12ce9533110e0f5b235b84"; export SSH_AGENT_PID="2689"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export GIT_SSL_CAINFO="/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/etc/ssl/certs/ca-certificates.crt"; export PATH="/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/usr/bin/python-native:/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/core/scripts:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot/usr/bin/crossscripts:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/usr/sbin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/usr/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/sbin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/recipe-sysroot-native/bin:/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/core/bitbake/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/hosttools"; export HOME="/home/petalinux"; /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/downloads 'https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-2.18.tar.gz' --progress=dot -v failed with exit code 4, output:
-2018-06-18 10:10:20- https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-2.18.tar.gz
Resolving files.pythonhosted.org... failed: Unknown host.
wget: unable to resolve host address files.pythonhosted.org
 
ERROR: python-pycparser-2.18-r0 do_fetch: Fetcher failure for URL: 'https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-2.18.tar.gz'. Unable to fetch URL from any source.
ERROR: python-pycparser-2.18-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pycparser/2.18-r0/temp/log.do_fetch.7176
ERROR: python-pyasn1-0.3.6-r0 do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-9ak7MadQVj,guid=967b61d95a12ce9533110e0f5b235b84"; export SSH_AGENT_PID="2689"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export GIT_SSL_CAINFO="/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/etc/ssl/certs/ca-certificates.crt"; export PATH="/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/usr/bin/python-native:/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/core/scripts:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot/usr/bin/crossscripts:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/usr/sbin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/usr/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/sbin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/recipe-sysroot-native/bin:/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/core/bitbake/bin:/home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/hosttools"; export HOME="/home/petalinux"; /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/downloads 'https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.3.6.tar.gz' --progress=dot -v failed with exit code 4, output:
-2018-06-18 10:10:20- https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.3.6.tar.gz
Resolving files.pythonhosted.org... failed: Unknown host.
wget: unable to resolve host address files.pythonhosted.org
 
ERROR: python-pyasn1-0.3.6-r0 do_fetch: Fetcher failure for URL: 'https://files.pythonhosted.org/packages/source/p/pyasn1/pyasn1-0.3.6.tar.gz'. Unable to fetch URL from any source.
ERROR: python-pyasn1-0.3.6-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/petalinux/Desktop/sai/xilinx-ultra96-reva-2018.2/build/tmp/work/aarch64-xilinx-linux/python-pyasn1/0.3.6-r0/temp/log.do_fetch.7177
ERROR: Task (/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb:do_fetch) failed with exit code '1'
ERROR: Task (/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.3.6.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2916 tasks of which 2888 didn't need to be rerun and 2 failed.
 
Summary: 2 tasks failed:
/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/meta-openembedded/meta-python/recipes-devtools/python/python-pycparser_2.18.bb:do_fetch
/home/petalinux/Desktop/sai/tool/components/yocto/source/aarch64/layers/meta-openembedded/meta-python/recipes-devtools/python/python-pyasn1_0.3.6.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 6 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

解决方案

This is a known issue in 2018.2 PetaLinux for an Ultra96 board.

If BB_NO_NETWORK is set to 1, PetaLinux is adding the pre-mirror URL as an "append" which causes build to fail as network access is disabled. 

PREMIRRORS should be appended here so that a prepend in other layers/conf files takes precedence.

 
To work around this issue, follow the below steps.
 

Run the following:

  1. petalinux-config ---> Yocto Settings ---> Add pre-mirror url ---> file:///opt/xilinx/petalinux/sstate-rel-v2018.2/downloads
  2. petalinux-config ---> Yocto Settings ---> Local sstate feeds settings ---> /opt/xilinx/petalinux/sstate-rel-v2018.2/aarch64 
  3. petalinux-config ---> Yocto Settings ---> Network sstate feeds URL ---> http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER}/aarch64/sstate-cache  //Keep this as default generated from PetaLinux tools
  4. petalinux-config ---> Yocto Settings ---> [*] Enable BB NO NETWORK    //This is mandatory when you do not have network on build machines.
     
  1. Add this content in <plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf and make sure that this path matches with the pre-mirror URL path mentioned above:
     
PREMIRRORS_prepend = " git://.*/.* file:///opt/xilinx/petalinux/sstate-rel-v2018.2/downloads \n \
ftp://.*/.* file:///opt/xilinx/petalinux/sstate-rel-v2018.2/downloads \n \
http://.*/.* file:///opt/xilinx/petalinux/sstate-rel-v2018.2/downloads \n \
https://.*/.* file:///opt/xilinx/petalinux/sstate-rel-v2018.2/downloads \n"

 

Run the following:

  1. "petalinux-build -x mrproper && petalinux-build"
AR# 71240
日期 06/19/2018
状态 Active
Type 综合文章
器件
Tools
People Also Viewed