I have tried unsuccessfully to run a build on Ubuntu 18.04 and 16.04 with Xilinx 2019.1 tools.
My ambition is to be able to get:
make BOARDS=Pynq-Z1
to run to completion.
I have tried with a server running Ubuntu 18.04, I have tried with an AWS instance, I have tried then running vagrant on the Ubuntu 18 machine to spin up an Ubuntu 16.04 VM and I have tried running an Ubuntu 16.04 AMI on Amazon all with no success. My latest effort running a vagrant VM on a windows 10 laptop (increasing the disk size to be able to install the Xilinx tools in /opt/pkg) perhaps got the furthest and I got as far as:
…
1653.258 ; gain = 0.000 ; free physical = 1678 ; free virtual = 5451
INFO: [Common 17-206] Exiting Vivado at Sun Nov 24 07:40:41 2019…
Built pynqz1 successfully!
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory ‘/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/hardware_project’
cd /pynq/sdbuild/build/Pynq-Z1/petalinux_bsp
petalinux-create --type project --template zynq --name xilinx-pynqz1-2019.1
INFO: Create project: xilinx-pynqz1-2019.1
INFO: New project successfully created in /pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1
cd xilinx-pynqz1-2019.1
petalinux-config --get-hw-description=/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/hardware_project --silentconfig
INFO: Getting hardware description…
INFO: Rename pynqz1.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] silentconfig project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
ERROR: Failed to generate meta-plnx-generated layer
ERROR: Failed to config project.
ERROR: Get hw description Failed!.
Makefile:323: recipe for target ‘/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1.bsp’ failed
make: *** [/pynq/sdbuild/build/Pynq-Z1/petalinux_bsp/xilinx-pynqz1-2019.1.bsp] Error 255
vagrant@ubuntu-xenial:/pynq/sdbuild$
Hello Rock,
Yes - I have seen that lots have people have had problems with the Petalinux installation, but not found any good solutions. People had done all kind of things and by some quirk of fate things suddenly worked. Sadly I have not found that yet. I did a clean installation using the vagrant file as suggested. I installed Vivado to /opt/pkg/tools in the VM and as specified in the UG for petalinux I used ‘./petalinux-v2019.1-final-installer.run /opt/pkg/petalinux/2019.1’ (of course after installing all the dependencies).
It does say that petalinux can be installed anywhere, but peoples experience shows that in fact it is super fussy. So I went with copy and past of the actual command from the UG1144. If Petalinux is fussy about the . in the 2019.1 as it is for the @ character, then perhaps the UG should be edited as this isn’t helping. I found the petalinux directory permissions where set to 775 so changed them to 755 as some have said. Still no joy. I believe I have followed the installation instructions for PYNQ to the letter (apart from having to increase the disk allocation for the VM so that the Vivado installation would fit!), but still have problems. What else can I try?
Vagrant will create a 100GB space for you so you don’t need to do change anything. So if you have changed anything, we cannot guarantee it is going to work. That said, can you just try to start from a clean vagrant file, install vivado and petalinux again? Technically you don’t have to do any changes (except the installation path if you want).
So I deleted the VM and my PYNQ directory and re-cloned the repo. When I run vagrant up I get another VM, but now it seems to be command line only. Is that correct?
No, I think something is wrong. The vagrant file should install the ubuntu-desktop, which gives you a GUI interface. Can you show all the steps you did? Also, remember that vagrant up should take a long time (~30 mins) when running 1st time. You need to run vagrant up first and once the VM has been properly configured (after 30 mins or so) you can run vagrant reload to reboot the VM.
I installed the latest version of Virtual Box (6.0).
I have deleted the pynq_vm and tried again to run ‘vagrant up’ about 10 times, each time with the same result. I only get a VM with a command line login and with the mouse not properly captured. Here is the transcript:
E:\Github\PYNQ>vagrant destroy
default: Are you sure you want to destroy the ‘default’ VM? [y/N] y
==> default: Forcing shutdown of VM…
==> default: Destroying VM and associated drives…
E:\Github\PYNQ>vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Importing base box ‘ubuntu/xenial64’…
==> default: Matching MAC address for NAT networking…
==> default: Checking if box ‘ubuntu/xenial64’ version ‘20191114.0.0’ is up to date…
==> default: Setting the name of the VM: pynq_vm
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running ‘pre-boot’ VM customizations…
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest…
default: Removing insecure key from the guest if it’s present…
default: Key inserted! Disconnecting and reconnecting using new SSH key…
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.0.18
VBoxService inside the vm claims: 5.1.38
Going on, assuming VBoxService is correct…
[default] GuestAdditions versions on your host (6.0.14) and guest (5.1.38) do not match.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.0.18
VBoxService inside the vm claims: 5.1.38
Going on, assuming VBoxService is correct…
Reading package lists…
Building dependency tree…
Reading state information…
Package ‘virtualbox-guest-dkms’ is not installed, so not removed
Package ‘virtualbox-guest-x11’ is not installed, so not removed
The following packages will be REMOVED:
virtualbox-guest-utils*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2,339 kB disk space will be freed.
(Reading database … 54255 files and directories currently installed.)
Removing virtualbox-guest-utils (5.1.38-dfsg-0ubuntu1.16.04.3) …
Purging configuration files for virtualbox-guest-utils (5.1.38-dfsg-0ubuntu1.16.04.3) …
Processing triggers for man-db (2.7.5-1) …
Reading package lists…
Building dependency tree…
Reading state information…
linux-headers-4.4.0-169-generic is already the newest version (4.4.0-169.198).
…
etc etc
…
default: Get:97 http://archive.ubuntu.com/ubuntu xenial/main i386 libhttp-cookies-perl all 6.01-1 [17.2 kB]
default: Get:167 http://archive.ubuntu.com/ubuntu xenial/main i386 xtrans-dev all 1.3.5-1 [70.5 kB]
default: Fetched 186 MB in 20s (9,098 kB/s)
default: E
default: :
default: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.23-0ubuntu11_i386.deb 400 Bad Request [IP: 91.189.88.173 80]
default: E
default: :
default: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libn/libnet-ssleay-perl/libnet-ssleay-perl_1.72-1build1_amd64.deb 400 Bad Request [IP: 91.189.88.173 80]
default: E
default: :
default: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb1-dev_1.11.1-1ubuntu1_amd64.deb 400 Bad Request [IP: 91.189.88.173 80]
default: E
default: :
default: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/mesa-common-dev_18.0.5-0ubuntu0~16.04.1_amd64.deb 400 Bad Request [IP: 91.189.88.173 80]
default: E
default: :
default: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-dri3-dev_1.11.1-1ubuntu1_amd64.deb 400 Bad Request [IP: 91.189.88.173 80]
default: E
default: :
default: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
E:\Github\PYNQ>
-so still failing at the first hurdle!
thanks for your help.
Graham
It looks that your apt-get update fails for some reasons that I cannot tell. How did you set up pynq-vm first time when you mentioned it in the question?
I think the only thing that you need to do, is to install xilinx tools in /sdbuild instead of /opt/pkg, and do not move xilinx tools around. No need to increase space or any other changes.
I have other VMs that work no problem (my host OS is Win 10). I have uninstalled and re-installed vagrant. I have updated Oracle Virtual Box, installed the guest additions and then run vagrant up from the PYNQ directory ( freshly pulled from github). I have freed up several GB of space on the C drive (9GB available and 100s of GB on the E drive where vagrant is installed). I keep getting the same errors as above. I have now tried about 30 or 40 times with no success. I have run KoheronSDK with no issues. I think I will in the end have to go with Xillinux as that seems to just work. Thanks for your help, but there is obviously something fundamental missing.
The last thing to try, is to use a previously released ubuntu 16 image, instead of the latest one: https://app.vagrantup.com/ubuntu/boxes/xenial64?page=2
But this is the last resort. Please let me know if you really want to use this solution after you have tried all the previous solutions.
I have been following the instructions from PYNQ SD Card image — Python productivity for Zynq (Pynq)
I have tried pulling the master branch again from github, but find I am already up to date ( I had synced 2 days ago). I think we are ready for the last resort. I am assuming setup_host is run from the vagrant script automatically and I don’t explicitly need to run /sdbuild/scripts/setup_host.sh as I assumed that was for running directly from an Ubuntu environment.
Finally got chance to try this.
I added the line:
config.vm.box_version = “20191002.1.0”
to the vagrant file and got the same behaviour and errors.
default: Err:190 Index of /ubuntu xenial/main amd64 libxfixes-dev amd64 1:5.0.1-2
default: 400 Bad Request [IP: 91.189.88.162 80]
etc…
This project will have to go on to the back burner for now.
Can you try the latest virtual box and vagrant software? The error message looks like an internet problem. What is your OS version, and your virtual box / vagrant version?
This is a very rare case; maybe you are preparing the VM behind a proxy or something. I tried the vagrant flow at home and I did not see this kind of issues.