Rebuild Pynq image failed

Try not run sudo because you are already on a chroot environment. That is already root user. I had problems with sudo on qemu as well.

So just run chown to see if that helps?

chown works fine when typed in terminal. it’s when it is done inside the script that fails. I will try removing the four chown lines in tomorrow

Wow! it went through!!! Success!
I have got the MyBoard-2.4.img inside the output folder plus some other boot stuff.
The only thing I needed was commenting out lines 31-34 in pynqGitHub/sdbuild/packages/pynq/
and give my VM few more GB of disk size.
I can now progress to write the SD and cross my fingers :slight_smile:
Thanks everyone for help

Can I use, in the future, the /data/PYNQ/sdbuild/build/Ax/petalinux_bsp/xilinx-myBoard-2018.3.bsp as bsp input, and bionic.arm.2.4 as image input to the script, instead of rebuilding everything from scratch with make?

That was supposed to be used along with our released rootfs.img.

In most cases, you will just want to modify stage 4 packages. In that case, I usually just delete the output/<my_board>-2.4.img and run make without doing any clean.

Of course, if you want to start with certain stages, just make sure the outputs of that stage and later stages are removed so the make flow can pick up from what you have left in the system.

Thanks @rock for your help!
Things solved my problem:

  1. increasing (to sth like 60!) the sleep time in the rocks’ suggested scripts plus mount_image script
    2: increasing the free space linux partition (to 200GB) (cause failure in stage 2)
  2. stable internet connection

Hi, I came across the same problem. I am trying to rebuild the PYNQ-Z2 image and later build an image for the Zybo-Z7-20. Could you please help me?
Thank you

Here is the output of my console after running make.

INFO: File in BOOT BIN: “/home/nelson/PYNQ/sdbuild/build/zybo/petalinux_project/images/linux/zynq_fsbl.elf”
INFO: File in BOOT BIN: “/home/nelson/PYNQ/sdbuild/build/zybo/petalinux_project/images/linux/u-boot.elf”

  • image_file=/home/nelson/PYNQ/sdbuild/build/bionic.arm.stage1.img
  • image_dir=/home/nelson/PYNQ/sdbuild/build/bionic.arm
    ++ dirname /home/nelson/PYNQ/sdbuild/scripts/
  • script_dir=/home/nelson/PYNQ/sdbuild/scripts
  • truncate --size 7G /home/nelson/PYNQ/sdbuild/build/bionic.arm.stage1.img
  • /home/nelson/PYNQ/sdbuild/scripts/ /home/nelson/PYNQ/sdbuild/build/bionic.arm.stage1.img
  • mount_points=($(sudo kpartx -av $image_file | cut -d ’ ’ -f 3))
    ++ sudo kpartx -av /home/nelson/PYNQ/sdbuild/build/bionic.arm.stage1.img
    ++ cut -d ’ ’ -f 3
  • echo loop19p1
  • echo loop19p2
  • root_part=/dev/mapper/loop19p2
  • boot_part=/dev/mapper/loop19p1
  • sleep 5
  • sudo chroot / mkfs -t fat /dev/mapper/loop19p1
  • sudo chroot / mkfs -t ext4 /dev/mapper/loop19p2
    mke2fs 1.44.1 (24-Mar-2018)
  • mkdir -p /home/nelson/PYNQ/sdbuild/build/bionic.arm
  • sudo mount /dev/mapper/loop19p2 /home/nelson/PYNQ/sdbuild/build/bionic.arm
  • sleep 5
  • sudo chroot / mkdir /home/nelson/PYNQ/sdbuild/build/bionic.arm/boot
  • sudo mount /dev/mapper/loop19p1 /home/nelson/PYNQ/sdbuild/build/bionic.arm/boot
  • sudo chroot / chmod a+w /home/nelson/PYNQ/sdbuild/build/bionic.arm
  • set -e
  • target=/home/nelson/PYNQ/sdbuild/build/bionic.arm
  • SRCDIR=/home/nelson/PYNQ/sdbuild/ubuntu/bionic/arm
  • fss=‘proc dev’
  • echo /opt/qemu/bin/qemu-arm-static
  • multistrap_conf=/home/nelson/PYNQ/sdbuild/ubuntu/bionic/arm/multistrap.config
  • ‘[’ -n ‘’ ‘]’
  • sudo -E multistrap -f /home/nelson/PYNQ/sdbuild/ubuntu/bionic/arm/multistrap.config -d /home/nelson/PYNQ/sdbuild/build/bionic.arm --no-auth
    W: GPG error: bionic InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
    E: The repository ‘ bionic InRelease’ is not signed.
    apt update failed. Exit value: 100
    make: *** [/home/nelson/PYNQ/sdbuild/build/bionic.arm.stage1.img] Error 25

I also tried to build the image using make PREBUILT= as suggested here: Problem building PYNQ SD image for ZC706. The image is generated by an error message is displayed. Futhermore, the board does not boot.

Could someone please help?
Thank you

I have never seen issues like that; after googling it, I found this page might be helpful:

It is probably your ubuntu VM or build machine has some weird configurations that mess things up. You might just want to use vagrant file we supported to replicate the building environment (ubuntu 16 and ubuntu 18 are supported):

Can you paste the error message?

Hi @rock, thank you for your reply.
The image is generated by a messsage “Failed to generate Pynq-Z2-2.5.img failed”.
I tried to write this image to SD Card but the board does not boot.

Regarding vagrant, when I made git checkout v2.5, the ubuntu image does not generate ubuntu-desktop. When I try to install ubuntu desktop the system behaves weirdly. So that is the reason I tried to use my own host machine to setup the PYNQ. I had to modify the at the line of wget qemu. I replaced it with git clone and it worked fine. In addition to that I commented all the lines with fgrep in the checkenv of the Makefile in the sdbuild.

The error happens specifically when running the command
sudo -E multistrap -f $HOME/PYNQ/sdbuild/ubuntu/bionic/arm/multistrap.config -d f $HOME/PYNQ/sdbuild/build/bionic.arm --no-auth

I also tried to do the trick suggested at, but it fails with the message

E: The repository ‘ bionic InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
apt update failed. Exit value: 100

Check if your apt file has been modified. If you want, you can make a backup of the original file /etc/apt/sources.list, and change it back to the original one:

And do sudo apt-get update after that. Otherwise I am not sure how this happens.

Use the master branch instead of the 2.5 branch because we have fixed the The vagrant flow should work.

1 Like

Hi @rock, thank you. The problem persists after that. My host computer has Ubuntu 18.04.3. I will try the vagrant flow.

Did you upgrade 18 from 16? That may have messed up with the apt source. Check this page:
You may want to change the apt source back to a working one in 18, following the instructions in the answers.

Another thing to try, is to see if you ubuntu machine can do any apt-get update or apt-get install. If not, there is definitely a problem with your ubuntu machine; this is not related to PYNQ though.

1 Like

Hi @rock. Yes, that was an upgrade. I am trying now the vagrant flow, but seems that I have a problem with petalinux 2019.1 now. Here is the output of my log. My python version is 2.7.12.

ERROR: Failed to source bitbake
ERROR: Failed to build device-tree
make: *** [/pynq/sdbuild/build/zybo/petalinux_project/images/linux/system.dtb] Error 255

This looks a petalinux problem. Since you are using your own board folder zybo, please look into petalinux error messages.

The error happens even if I try to rebuild Pynq-Z2 folder.

Hi @rock,
thank you for your help. I was able to generate an image to the zybo z7-20 and I can boot and access it through the browser. The steps that I did was:

1: create a new /etc/apt/sources.list as follows

###### Ubuntu Main Repos
**deb bionic main restricted universe multiverse **

###### Ubuntu Update Repos
**deb bionic-security main restricted universe multiverse **
deb bionic-updates main restricted universe multiverse

2: make PREBUILT=<image_path> BOARD=zybo
3: accessing the zybo through the terminal (using putty) I created the file /etc/network/interfaces.d/eth0 as follows :

auto eth0
iface eth0 inet static

auto br0
iface br0 inet dhcp
bridge_ports eth0

The next steps would be to create an overlay, as I used only one simple base system including a Zynq processor System.

I hope I can update it uploading a new bitstream. Many thanks.