Stuck at extract yocoto

Built pynqz2 successfully!

make[1]: Leaving directory ‘/pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/hardware_project’

  • cd /pynq/sdbuild/build/Pynq-Z2/petalinux_bsp
  • petalinux-create --type project --template zynq --name xilinx-pynqz2-2020.2
    INFO: Create project: xilinx-pynqz2-2020.2
    INFO: New project successfully created in /pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/xilinx-pynqz2-2020.2
  • cd xilinx-pynqz2-2020.2
  • petalinux-config --get-hw-description=/pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/hardware_project --silentconfig
    INFO: Sourcing build tools
    INFO: Getting hardware description…
    INFO: Rename pynqz2.xsa to system.xsa
    [INFO] Generating Kconfig for project
    [INFO] Silentconfig project
    [INFO] Extracting yocto SDK to components/yocto
    ERROR: Failed to Extract Yocto SDK.
    ERROR: Failed to config project.
    ERROR: Get hw description Failed!.
    Makefile:343: recipe for target ‘/pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/xilinx-pynqz2-2020.2.bsp’ failed
    make: *** [/pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/xilinx-pynqz2-2020.2.bsp] Error 255

Hi there,

I don’t recall seeing this error before. More info would be helpful. What is the pynq version you’re trying to build, what are the exact commands you ran to reproduce this?

Thanks
Shawn

More detail background:
I am just trying to setup the ENV via vagrant on the tutorial on this link using revision latest:
https://pynq.readthedocs.io/en/latest/pynq_sd_card.html#using-the-prebuilt-board-agnostic-image

So the detail procedure is follow (verified over 4 times on 2 different Windows 10 PC with different CPU both Intel and AMD)
Steps:
install both vagrant and virtual box and git clone the repository.
Goto xxxx\PYNQ\sdbuild\scripts:
Add “sudo dpkg --add-architecture i386”
Wait until all are installed.
reload the vagrant login.
Install Vitis, Vivado, HLS
Install PetaLinux ← elaborate more on this:
Download Xilinx ENV setup.sh via https://support.xilinx.com/s/article/73296?language=en_US
switch the bash via “sudo dpkg-reconfigure dash” select NO
Install petalinux on /workstation/ owned by vagrant user
Once all done setup license on Xilinx manager
Goto sdbuild and make BOARDS=Pynq-Z2

If this is run on such way stuck at extract yocoto is repeatable disregarding install up how many times.
If git clone to the Ubuntu on other vagrant owned location and run setup.sh in sdbuild/scripts
It will ends up
[EXTRA] Retrieving ‘isl-0.20’
[ERROR] isl: download failed
Which also commonly know in other posts but no clear solution on how to resolve via script modification

If manually load the isl-0.20 to gcc tar folder:
[ERROR] Missing: ‘arm-unknown-linux-gnueabihf-ar’ or ‘arm-unknown-linux-gnueabihf-ar’ or ‘ar’ : either needed!
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step ‘(top-level)’

Just to clarify, did you run the sdbuild/scripts/setup_host.sh script before building the image? And did it run successfully?

There is a forum post relating to a the same file, perhaps this might help?

Also for your make command, unless you plan to modify the board agnostic image, it’s recommended to use the PREBUILT and PYNQ_SDIST flags, this is outlined in the page you linked earlier.

Thanks
Shawn

If using vagrant fail on setup_host.sh will ends up not able to boot to GUI mode as it is come after setup_host.sh.
So above case I highly think it is setup without major fails.
So the answer is YES.
Meantime, I had tried on self install Ubuntu 18.04 and vagrant Ubuntu.
Both never successfully build the SD image.
The current status is all stuck at
[WARN ] Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048
[INFO ] Build started 20220503.174432
[INFO ] Building environment variables
[ERROR] Missing: ‘arm-unknown-linux-gnueabihf-ar’ or ‘arm-unknown-linux-gnueabihf-ar’ or ‘ar’ : either needed!

The problem is even running make on the default repository boards is not success so this means the ENV is problematic but why? vagrant and procedures are almost identical as both AMD INTEL PC shows the same behavior.

I think there are couples of issues are welly discussed since this is started on version 2.5
While I am started just few weeks and tried out other pre-build board sd-image.
It is necessary to build a custom image for custom board.

So the issues are follow:

  1. isl-0.20 link is dead very clear on other post script is not updated
  2. vagrant create VM ubuntu shows there are right issues from other post what I had seen.
    So follow others past steps, cloning the git repository and run setup.sh could work
  3. Ubuntu 16.04.06 is not supported by Xilinx Petalinux so if this is not the case can be ignored

Unless people having hard time on setting up the environment:
Vagrant is not a good method to setup the SD build environment.
I have not investigate to the bottom but what previous engineer shows there might Virtual R/W issue during such setup.

STEPS:

  1. I will suggest download 18.04.06 LTS Ubuntu from official website
  2. Create a virtual disk size about 200GB or more, set the CPU >#4, RAM >#8192
  3. Update Ubuntu packages before setting up the PYNQ
    3b) Git clone the PYNQ to /home//PYNQ
    3c) sudo chmod -R 777 ./PYNQ/*
  • you can start download Vivado etc.
  1. run “sudo ./scripts/setup_host.sh” No modification is needed to this script
  2. run with “sudo plnx-env-setup.sh”

https://support.xilinx.com/s/article/73296?language=en_US to setup PetaLinux packages

  1. Install all Vivado Vitis HLS # 2020.2 NOT 2020.2.#
    put it in /home/PYNQ/xilinx and make sure it is owned by PYNQ and 777 right
  2. “sudo dpkg-reconfigure dash” select NO
  3. Update python3 pip “python3 -m pip install --upgrade pip”
  4. Install PetaLinux to /home//xilinx/petalinux/…
  5. Just setup the tftproot
    mkdir /tftproot
    chmod 777 /tftproot
    /etc/init.d/openbsd-inetd restart
    netstat -an | more | grep udp
  6. setup source at ~/.bashrc
  7. Reopen a terminal to check if all tool load correctly
    Remind that 18.04.06 is not a supported OS of petalinux can be ignore

Loading of a new terminal should return:

PetaLinux environment set to ‘/home/pynq/xilinx/petalinux’
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
INFO: Turn off webtalk feature!
13) Well Known issue for isl-0.2.0 link dead and other link miss:
mkdir -p ~/src
wget -P ~/src https://libisl.sourceforge.io/isl-0.20.tar.bz2
wget -P ~/src https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.bz2
Go back to ~/PYNQ/sdbuild/scripts/tools/crosstool-ng-1.24.0/
./configure
make
sudo make install
END) Now hope all are going well unless hell time begins =]

Step 6b fix HLS patch:
https://support.xilinx.com/s/article/76960?language=en_US
run according to README

Step 10 update a bit:
apt-get install tftpd tftp openbsd-inetd
gedit /etc/inetd.conf
(add this) tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot
mkdir /tftproot
chmod 777 /tftproot
/etc/init.d/openbsd-inetd restart
netstat -an | more | grep udp