# PYNQ V2.7 SD image build fail for board PYNQ-Z2

**URL:** <https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243>\
**Category:** Support\
**Created:** [May 24, 2022, 10:36pm UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243 "2022-05-24T22:36:14Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [May 31, 2022, 10:02am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/21 "2022-05-31T10:02:25Z")

</div>

I just try the build the Pynq-Z2 with my machine:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3002eaaa326139d5b4a206511ab541eef35070a4.png)  
What Vivado version you install and did you deselect some installation?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/6/61f997676a016b19c0071501e495d41fb72f27a7.png)

---

<div class="post-metadata">

**Author:** ![skalade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/skalade/32/686_2.png) [@skalade](https://discuss.pynq.io/u/skalade)\
**Post date:** [May 31, 2022, 10:09am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/22 "2022-05-31T10:09:35Z")

</div>

Hi @Willy,

In the log you posted there are some logs of the failed synths

```auto
pynqz2_ps7_0_synth_1: /pynq/sdbuild/build/Pynq-Z2/petalinux_bsp/hardware_project/pynqz2/pynqz2.runs/pynqz2_ps7_0_synth_1/runme.log

```

You might see a hint on why this is failing. This seems like a weird Vivado issue.

I’ll echo Brian’s concern of Vivado installation. It appears you are using Vivado 2020.2.2… It shouldn’t be a problem because it is close enough to 2020.2, but I don’t believe the pynq-z2 builds were ever tested with that version.

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [May 31, 2022, 10:11am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/23 "2022-05-31T10:11:27Z")

</div>

No Skalade, he might removed some board package or series during installation that can’t tell as those warning are happening with my install environment.  
As same env install should reproduce same result.

Maybe just maybe the tcl script are so dump that 2020.2 and 2020.2.2 string are not match and lead to those warnings but I should update my install guide more as I won’t expect engineer would not follow the Readme version support list.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [May 31, 2022, 12:11pm UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/24 "2022-05-31T12:11:32Z")

</div>

Sorry,I still can’t understanding.  
I don’t find the /PYNQ/sdbuild/PYNQ/build.sh, only see the Pynq-Z2 in the build folder.

I am using the Vitis 2020.2 and install relative updated:

> Xilinx\_Unified\_2020.2\_1118\_1232  
> Xilinx\_Vivado\_Vitis\_Update\_2020.2.1\_1211\_2237  
> Xilinx\_Vivado\_Vitis\_Update\_2020.2.2\_0209\_0906  
> y2k22\_patch-1.2

I select the Vitis option during the installation GUI, it contains the Vitis and Vivado together.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/b/bdefc07c014bc9eaa6376f34c8210a467459dafb.png)

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [May 31, 2022, 12:27pm UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/25 "2022-05-31T12:27:05Z")

</div>

I also try following steps but got the same error.

1. Create PYNQ folder in the ~/PYNQ/sdbuild/build/
2. cp build.sh from ~/PYNQ/build.sh to that
3. Remove the specified lines in the ~/PYNQ/sdbuild/build/PYNQ/build.sh
4. Remove ~/PYNQ/sdbuild/build/Pynq-Z2
5. cd ~/PYNQ/sdbuild and execute below command:  
make PREBUILT=focal.aarch64.2.7.0\_2021\_11\_17.tar.gz BOARDS=Pynq-Z2

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [May 31, 2022, 1:55pm UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/26 "2022-05-31T13:55:16Z")

</div>

Did you install all ZYNQ series and ULTRA ZYNQ and also the board package and other necessary on the unified 2020.2 installer?

This is a two stage process, make 1st time if error check if the error related to the board you are building if not go to the the build.sh and remove the lines that are not needed make once wo the clean previous build will go through quicker and eventually successfully build the Image.  
If you need prove I can run it again.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 2:27am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/27 "2022-06-01T02:27:44Z")

</div>

Hi briansune,  
I’m not sure, I just follow the default configuration and make sure the install target option is Vitis. I think the board package and other necessary should not the root cause because I can use Vivado GUI to build the tmp project in the build folder.

I will try to remove the Vivao and Vitis 2020.2.2 version and re-install 2020.2 again for a try.

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 1, 2022, 2:30am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/28 "2022-06-01T02:30:35Z")

</div>

Did you patch the HLS and also run the sh setup script of each steps?

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 3:05am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/29 "2022-06-01T03:05:26Z")

</div>

> [@briansune](#):
>
> HLS

yes. 2ky22 patch, and the setup\_host.sh, plnx-env-setup.sh are executed done.

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 1, 2022, 3:16am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/30 "2022-06-01T03:16:28Z")

</div>

Willy, need more details on the install location and path in order to debug more as I had install many time to ensure this is repeatable and stable on PC which the default installation guide is not mentioned nor create details on settling different broken web-link etc.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 5:05am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/31 "2022-06-01T05:05:47Z")

</div>

I use default path, it will install to the /tools/Xilinx.  
Just want to comfirm, should I check the Vitis option during the installation guide or chose Vivado??

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/0/0661820449f74b311d0815000afb20a9c5964a55.jpeg)

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 1, 2022, 5:16am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/32 "2022-06-01T05:16:57Z")

</div>

Vitis otherwise Vitis will not be install.

I need more details on each step  
path you place and installed access right.  
Follow the setup step and place the path location accordingly  
Meantime CPU# and ram are enough?

![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/a/ac8fb1369401daea7167fc0d1bba554ae2ead2b7.png)

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 7:18am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/33 "2022-06-01T07:18:12Z")

</div>

1. Install Vitis (contains Vivado) in /tools/Xilinx (2020.2 without other updates)
2. Install y2k22\_patch
3. chmod privilege to 777

![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/0/0965b5ec05555570586236e76faf741a16538aad.png)

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 7:19am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/34 "2022-06-01T07:19:16Z")

</div>

1. chmod 777 for petalinux  
location: /home/willy/petalinx  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/952aaec3bf8f3b0da8a80fdadfd53aea042fbf28.png)

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 7:28am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/35 "2022-06-01T07:28:10Z")

</div>

cd ~/PYNQ/sdbuild  
make  
Got the same error:

> WARNING: [Vivado 12-8222] Failed run(s) : ‘pynqz2\_ps7\_0\_synth\_1’, ‘pynqz2\_rst\_ps7\_0\_fclk0\_0\_synth\_1’, ‘pynqz2\_rst\_ps7\_0\_fclk1\_0\_synth\_1’, ‘pynqz2\_rst\_ps7\_0\_fclk2\_0\_synth\_1’  
> wait\_on\_run: Time (s): cpu = 00:00:00.02 ; elapsed = 00:00:46 . Memory (MB): peak = 2624.980 ; gain = 0.000 ; free physical = 1476 ; free virtual = 1905  
> INFO: [Vivado 12-4895] Creating Hardware Platform: /home/willy/PYNQ/sdbuild/build/Pynq-Z2/petalinux\_bsp/hardware\_project/pynqz2.xsa …  
> INFO: [Project 1-655] Project does not have Board Part set. Board related data may be missing or incomplete in the generated Hardware Platform.  
> WARNING: [Project 1-646] Board name, vendor and part not set in Hardware Platform.  
> WARNING: [Project 1-645] Board images not set in Hardware Platform.  
> INFO: [Hsi 55-2053] elapsed time for repository (/tools/Xilinx/Vivado/2020.2/data/embeddedsw) loading 0 seconds  
> WARNING: [BD 41-2589] Platform should have atleast one axi memory mapped master interface. Enable a master AXI interface as platform AXI\_PORT.  
> INFO: [Project 1-1042] Successfully generated hpfm file  
> write\_project\_tcl: Time (s): cpu = 00:00:16 ; elapsed = 00:00:11 . Memory (MB): peak = 2624.980 ; gain = 0.000 ; free physical = 2000 ; free virtual = 3521  
> ERROR: [Common 17-70] Application Exception: Need an implemented design open to write bitstream. Aborting write\_hw\_platform…  
> INFO: [Common 17-206] Exiting Vivado at Wed Jun 1 15:22:22 2022…  
> makefile:13: recipe for target ‘bitstream’ failed  
> make[1]: \*\*\* [bitstream] Error 1  
> make[1]: Leaving directory ‘/home/willy/PYNQ/sdbuild/build/Pynq-Z2/petalinux\_bsp/hardware\_project’  
> Makefile:343: recipe for target ‘/home/willy/PYNQ/sdbuild/build/Pynq-Z2/petalinux\_bsp/xilinx-pynqz2-2020.2.bsp’ failed  
> make: \*\*\* [/home/willy/PYNQ/sdbuild/build/Pynq-Z2/petalinux\_bsp/xilinx-pynqz2-2020.2.bsp] Error 2

make clean  
make PREBUILT=focal.aarch64.2.7.0\_2021\_11\_17.tar.gz BOARDS=Pynq-Z2  
The error happen again.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 7:39am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/36 "2022-06-01T07:39:52Z")

</div>

> [@briansune](#):
>
> Meantime CPU# and ram are enough?

VM memory: 4G  
Processor: 4  
BTW, I am using VirtualBox 6.1

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/2/21f50f90531f9beff5a1dd0a61047e792e87ce18.png)

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 1, 2022, 7:51am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/37 "2022-06-01T07:51:19Z")

</div>

I will suggest 8192 RAM.  
Meantime I am also using VirtualBox 6.1  
Try enlarge a bit ram clean and see

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 8:55am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/38 "2022-06-01T08:55:36Z")

</div>

You got it. I change the VM’s RAM to 8G, the build error seems gone.  
The building process is keep going.  
So far I found a fail message as below:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/4/4f6b1f905d17e9b16b3aab3d411ba87251b38e7f.png)  
Do you meet the same problem before?

BTW, could you help to comment below questions:

1. what’s the board-agnostic stage??
2. If we want to study the FSBL(first stage bootloader), and second stage boot loader (uboot), Could I find the source code about them in the sdbuild folder?

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 1, 2022, 8:59am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/39 "2022-06-01T08:59:39Z")

</div>

U didn’t setup the tftp and source of the petalinux with below settings?  
source /Vitis/2020.2/settings64.sh  
source /petalinux-2020.2-final/settings.sh  
petalinux-util --webtalk off

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 1, 2022, 9:14am UTC](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243/40 "2022-06-01T09:14:34Z")

</div>

I had setup the source of petalinux, vitis, and vivado in bashrc:

> source /tools/Xilinx/Vivado/2020.2/settings64.sh  
> source /tools/Xilinx/Vitis/2020.2/settings64.sh  
> source /home/willy/petalinux/settings.sh

I follow your steps to setup the tftp, but I’m not sure it is working.  
I open the terminal and show below image, I don’t see the tftp related error:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/2/2744c0b3337d6e9b041f1fc5e30b1b271120d51b.png)

The make processing is done, and get below message which contains the tftp relative error:

> 

[INFO] : Bootimage generated successfully

INFO: Binary is ready.  
WARNING: Unable to access the TFTPBOOT folder /tftpboot!!!  
WARNING: Skip file copy to TFTPBOOT folder!!!  
cp -f /home/willy/PYNQ/sdbuild/build/Pynq-Z1/petalinux\_project/images/linux/BOOT.BIN /home/willy/PYNQ/sdbuild/output/boot/Pynq-Z1  
mkimage -c none -A arm -T script -d /home/willy/PYNQ/sdbuild/build/Pynq-Z1/petalinux\_project/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.default /home/willy/PYNQ/sdbuild/build/Pynq-Z1/petalinux\_project/images/linux/boot.scr && cp -f /home/willy/PYNQ/sdbuild/build/Pynq-Z1/petalinux\_project/images/linux/boot.scr /home/willy/PYNQ/sdbuild/output/boot/Pynq-Z1/boot.scr  
Image Name:  
Created: Wed Jun 1 17:05:34 2022  
Image Type: ARM Linux Script (gzip compressed)  
Data Size: 1572 Bytes = 1.54 KiB = 0.00 MiB  
Load Address: 00000000  
Entry Point: 00000000  
Contents:  
Image 0: 1564 Bytes = 1.53 KiB = 0.00 MiB  
mkdir -p /home/willy/PYNQ/sdbuild/build/ZCU104  
cp /home/willy/PYNQ/sdbuild/boot/image\_aarch64.its /home/willy/PYNQ/sdbuild/build/ZCU104/image.its  
rm -rf /home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp  
mkdir -p /home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp  
BSP=xilinx-zcu104-v2020.2-final.bsp BSP\_BUILD=/home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp BSP\_ABS=/home/willy/PYNQ/sdbuild/…/boards/ZCU104/xilinx-zcu104-v2020.2-final.bsp BSP\_PROJECT=xilinx-zcu104-2020.2 /home/willy/PYNQ/sdbuild/scripts/create\_bsp.sh /home/willy/PYNQ/sdbuild/…/boards/ZCU104 zynqMP

- set -e
- board=/home/willy/PYNQ/sdbuild/…/boards/ZCU104
- template=zynqMP
- ‘[’ -n xilinx-zcu104-v2020.2-final.bsp ‘]’
- [[xilinx-zcu104-v2020.2-final.bsp == _://_]]
- cp -f /home/willy/PYNQ/sdbuild/…/boards/ZCU104/xilinx-zcu104-v2020.2-final.bsp /home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp  
cp: cannot stat ‘/home/willy/PYNQ/sdbuild/…/boards/ZCU104/xilinx-zcu104-v2020.2-final.bsp’: No such file or directory  
Makefile:343: recipe for target ‘/home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp/xilinx-zcu104-2020.2.bsp’ failed  
make: \*\*\* [/home/willy/PYNQ/sdbuild/build/ZCU104/petalinux\_bsp/xilinx-zcu104-2020.2.bsp] Error 1

I checked the build/PYNQ-Z2: it contains  
image.its petalinux\_bsp petalinux\_project system.dtb zImage  
Does it means compiler is PASS now?

[Previous page](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243.md?page=1)

[Next page](https://discuss.pynq.io/t/pynq-v2-7-sd-image-build-fail-for-board-pynq-z2/4243.md?page=3)
