Pynq fails to build image

Hi Im following this guide:

PYNQ successfully build image by using:

bash scripts/image_from_prebuilt.sh ZC706 xilinx-zc706-v2019.1-final.bsp arm bionic.arm.2.5.img

but by using:

make BOARDDIR=test_repo PREBUILT=bionic.arm.2.5.img

It fails
make BOARDDIR=/home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo/ PREBUILT=bionic.arm.2.5.img
/opt/qemu/bin/qemu-arm-static -version | fgrep 4.0.0
qemu-arm version 4.0.0
vivado -version | fgrep 2019.1
Vivado v2019.1 (64-bit)
xsdk -version | fgrep 2019.1
****** SDK v2019.1 (64-bit)
which petalinux-config
/home/bartek/petalinux20191/tools/common/petalinux/bin/petalinux-config
which arm-linux-gnueabihf-gcc
/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
which microblaze-xilinx-elf-gcc
/home/bartek/petalinux20191/tools/xsct/gnu/microblaze/lin/bin/microblaze-xilinx-elf-gcc
which ct-ng
/opt/crosstool-ng/bin/ct-ng
which python | fgrep /usr/bin/python
/usr/bin/python
sudo -n mount > /dev/null
bash /home/bartek/Desktop/tety/PYNQ/sdbuild/scripts/check_env.sh
Pass: Current OS is supported.
Checking system for installed bc
gperf
bison
flex
texi2html
texinfo
help2man
gawk
libtool
libtool-bin
build-essential
automake
libncurses5-dev
libglib2.0-dev
device-tree-compiler
qemu-user-static
binfmt-support
multistrap
git
lib32z1
lib32ncurses5
libbz2-1.0
lib32stdc++6
libssl-dev
kpartx
zerofree
u-boot-tools
rpm2cpio
libsdl1.2-dev
rsync
python3-pip
gcc-multilib
bash /home/bartek/Desktop/tety/PYNQ/sdbuild/scripts/check_mounts.sh
cp --sparse=always bionic.arm.2.5.img /home/bartek/Desktop/tety/PYNQ/sdbuild/output/Minized_Pynq-2.5.img
/home/bartek/Desktop/tety/PYNQ/sdbuild/scripts/mount_image.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/output/Minized_Pynq-2.5.img /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq
loop24p1
loop24p2
QEMU_EXE=/opt/qemu/bin/qemu-arm-static PYNQ_BOARDDIR=/home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo//Minized_Pynq PYNQ_BOARD=Minized_Pynq ARCH=arm PACKAGE_PATH=/home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo//Minized_Pynq/packages /home/bartek/Desktop/tety/PYNQ/sdbuild/scripts/install_packages.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq pynq

  • target=/home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq
  • shift
  • fss=‘proc run dev’
  • for fs in $fss
  • sudo mount -o bind /proc /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/proc
  • for fs in $fss
  • sudo mount -o bind /run /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/run
  • for fs in $fss
  • sudo mount -o bind /dev /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/dev
  • mkdir -p /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/ccache
  • sudo mount -o bind /home/bartek/Desktop/tety/PYNQ/sdbuild/ccache /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/ccache
  • trap unmount_special EXIT
  • export CFLAGS=
  • CFLAGS=
  • export CPPFLAGS=
  • CPPFLAGS=
  • export PATH=/usr/lib/ccache:/home/bartek/petalinux20191/tools/xsct/petalinux/bin:/home/bartek/petalinux20191/tools/common/petalinux/bin:/home/bartek/petalinux20191/tools/xsct/bin:/home/bartek/petalinux20191/tools/xsct/gnu/microblaze/lin/bin:/home/bartek/petalinux20191/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/petalinux20191/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/petalinux20191/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/Vivado/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/arm/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/linux_toolchain/lin64_le/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/tps/lnx64/cmake-3.3.2/bin:/home/bartek/Xilinx/Vivado/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/arm/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/linux_toolchain/lin64_le/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/tps/lnx64/cmake-3.3.2/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/usr/bin:/usr/bin:/home/bartek/anaconda3/condabin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/home/bartek/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • PATH=/usr/lib/ccache:/home/bartek/petalinux20191/tools/xsct/petalinux/bin:/home/bartek/petalinux20191/tools/common/petalinux/bin:/home/bartek/petalinux20191/tools/xsct/bin:/home/bartek/petalinux20191/tools/xsct/gnu/microblaze/lin/bin:/home/bartek/petalinux20191/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/petalinux20191/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/petalinux20191/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/Vivado/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/arm/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/linux_toolchain/lin64_le/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/tps/lnx64/cmake-3.3.2/bin:/home/bartek/Xilinx/Vivado/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/arm/lin/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/microblaze/linux_toolchain/lin64_le/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-none/bin:/home/bartek/Xilinx/SDK/2019.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:/home/bartek/Xilinx/SDK/2019.1/tps/lnx64/cmake-3.3.2/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/usr/bin:/usr/bin:/home/bartek/anaconda3/condabin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/opt/qemu/bin:/opt/crosstool-ng/bin:/home/bartek/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • export CCACHE_DIR=/ccache
  • CCACHE_DIR=/ccache
  • export CCACHE_MAXSIZE=15G
  • CCACHE_MAXSIZE=15G
  • export CCACHE_SLOPPINESS=file_macro,time_macros
  • CCACHE_SLOPPINESS=file_macro,time_macros
  • export CC=/usr/lib/ccache/gcc
  • CC=/usr/lib/ccache/gcc
  • export CXX=/usr/lib/ccache/g++
  • CXX=/usr/lib/ccache/g++
  • for p in $@
  • ‘[’ -n /home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo//Minized_Pynq/packages -a -e /home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo//Minized_Pynq/packages/pynq ‘]’
  • f=/home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq
  • ‘[’ -e /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pre.sh ‘]’
  • /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pre.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq
  • set -e
  • target=/home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq
    +++ dirname /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pre.sh
    ++ cd /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq
    ++ pwd
  • script_dir=/home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq
  • sudo mkdir -p /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/home/xilinx/pynq_git/boards
  • sudo mkdir -p /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/home/xilinx/pynq_git/dist
  • sudo cp -rfL /home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/.git /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/home/xilinx/pynq_git
  • sudo cp /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/get_revision.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/home/xilinx
  • sudo cp /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pl_server.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/usr/local/bin
  • sudo cp /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pl_server.service /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/lib/systemd/system
  • sudo cp /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/pynq_hostname.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/usr/local/bin
  • sudo cp /home/bartek/Desktop/tety/PYNQ/sdbuild/packages/pynq/boardname.sh /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/etc/profile.d
  • ‘[’ Minized_Pynq ‘!=’ Unknown ‘]’
  • cd /home/bartek/Desktop//tety/PYNQ/sdbuild/test_repo//Minized_Pynq/…
  • ‘[’ -d .git ‘]’
  • ‘[’ ‘!’ -d /home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/Minized_Pynq ‘]’
  • ‘[’ -n ‘’ ‘]’
  • ‘[’ -n ‘’ ‘]’
  • cd /home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ
  • ./build.sh
    ./build.sh

Script for building default overlays, microblaze bsp’s and binaries.

building bitstream base.bit for ZCU104
make[1]: Entering directory ‘/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base’
vivado -mode batch -source build_base_ip.tcl -notrace

****** Vivado v2019.1 (64-bit)
**** SW Build 2552052 on Fri May 24 14:47:09 MDT 2019
**** IP Build 2548770 on Fri May 24 18:01:18 MDT 2019
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

source build_base_ip.tcl -notrace
Skipping building color_convert_2
Checking color_convert_2
Skipping building pixel_pack_2
Checking pixel_pack_2
Skipping building pixel_unpack_2
Checking pixel_unpack_2
HLS IP builds complete
INFO: [Common 17-206] Exiting Vivado at Mon Aug 3 09:59:31 2020…
vivado -mode batch -source base.tcl -notrace

****** Vivado v2019.1 (64-bit)
**** SW Build 2552052 on Fri May 24 14:47:09 MDT 2019
**** IP Build 2548770 on Fri May 24 18:01:18 MDT 2019
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

source base.tcl -notrace
ERROR: [Common 17-53] User Exception: Project already exists on disk, please use ‘-force’ option to overwrite:
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.xpr
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.runs
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.srcs
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.cache
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.hw
/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base/base/base.ip_user_files
INFO: [Common 17-206] Exiting Vivado at Mon Aug 3 09:59:39 2020…
makefile:13: recipe for target ‘block_design’ failed
make[1]: *** [block_design] Error 1
make[1]: Leaving directory ‘/home/bartek/Desktop/tety/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base’

  • unmount_special
  • for fs in $fss
  • sudo umount -l /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/proc
  • for fs in $fss
  • sudo umount -l /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/run
  • for fs in $fss
  • sudo umount -l /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/dev
  • sudo umount -l /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/ccache
  • rmdir /home/bartek/Desktop/tety/PYNQ/sdbuild/build/bionic.Minized_Pynq/ccache
    Makefile:324: recipe for target ‘/home/bartek/Desktop/tety/PYNQ/sdbuild/output/Minized_Pynq-2.5.img’ failed
    make: *** [/home/bartek/Desktop/tety/PYNQ/sdbuild/output/Minized_Pynq-2.5.img] Error 2

Why does it keep rebuilding zcu104, pynq-z1/z2 project? and don’t want to build custom image?
Before building im sourcing this:
source /home/bartek/petalinux20191/settings.sh
source /home/bartek/Xilinx/Vivado/2019.1/settings64.sh
source /home/bartek/Xilinx/SDK/2019.1/settings64.sh
export PATH=/opt/qemu/bin:/opt/crosstool-ng/bin:/usr/bin:$PATH
Minized_Pynq.zip (1.4 MB)

Is this error with my PC or some kind of bug?

This looks like you have the block design somewhere that you manually built. Don’t build anything manually. Just do the make in the sdbuild folder as suggested in the documentation.