# Error then building PYNQ for microzed board

**URL:** <https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252>\
**Category:** Support\
**Created:** [July 7, 2024, 6:14pm UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252 "2024-07-07T18:14:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [July 7, 2024, 6:14pm UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/1 "2024-07-07T18:14:33Z")

</div>

Hi I am trying to build Pynq for microzed board, and in my case it is absolutely not standard build. I started with [GitHub - FredKellerman/Microzed-PYNQ](https://github.com/FredKellerman/Microzed-PYNQ), but there is no prebuilt image and it was so outdated that I tried to build my own. I am on Ubuntu 2022.4, looks like not supported, and using Vivado 2024.1 tools(not supported as well). I did struggled for couple of days and was able to get thru most of compilation, to the point, then rootfs is created with qemu.sh and stuck this time.  
it cannot get clone PYNQ-Metadata from internet. I checked that I can access github and repo but pip is not happy.  
I added ping [github.com](http://github.com) to qemu.sh script and see that it can get to github, output of the error on screen below.  
I would welcome any help.

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

---

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [July 7, 2024, 7:50pm UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/2 "2024-07-07T19:50:52Z")

</div>

Ok I made progress by adding  
git config --global http.sslVerify false  
but still some security errors then it installs dependencies.  
to qemu.sh

 ![Screenshot from 2024-07-07 15-49-27](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/4/4c43922d3a3633776eb686ef496c8fe4689de2cb.png)

---

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [July 7, 2024, 8:10pm UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/3 "2024-07-07T20:10:45Z")

</div>

What really helped is to add --trusted-host to pip install  
$ pip install --trusted-host [pypi.org](http://pypi.org) --trusted-host [files.pythonhosted.org](http://files.pythonhosted.org) pip

taken from here automationcurrypuff.home.blog/2019/07/18/how-to-ignore-ssl-errors-for-pip-installations/

---

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [July 7, 2024, 9:56pm UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/4 "2024-07-07T21:56:01Z")

</div>

It looks like I am almost there, having issue on packaging wic image now.  
(cd /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project && petalinux-package --wic --images-dir “/home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020” --bootfiles “image.ub BOOT.BIN boot.scr” -c /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020.tar.gz --outdir /home/alexian79/projects/pynq/PYNQ/sdbuild/output --wks /home/alexian79/projects/pynq/PYNQ/sdbuild/boot/image.wks --extra-bootfiles "/home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020.extra\_boot/_:.") && mv /home/alexian79/projects/pynq/PYNQ/sdbuild/output/petalinux-sdimage.wic /home/alexian79/projects/pynq/PYNQ/sdbuild/output/microzed-7020-3.0.1.img  
[NOTE] Argument: “–wic” has been deprecated. It is recommended to start using new python command line Argument.  
[NOTE] Use: petalinux-package wic [OPTIONS]  
{0:s} {0:s}/build  
Namespace(force=False, debug=False, command=‘wic’, project=None, wks=‘/home/alexian79/projects/pynq/PYNQ/sdbuild/boot/image.wks’, outdir=‘/home/alexian79/projects/pynq/PYNQ/sdbuild/output’, images\_dir=‘/home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020’, rootfs\_file=‘/home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020.tar.gz’, bootfiles=‘image.ub BOOT.BIN boot.scr’, extra\_bootfiles='/home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020.extra\_boot/_;.‘, size=None, wic\_extra\_args=’', func=\<function PackageWic at 0x712b65d01870\>)  
[INFO] Sourcing build environment  
[INFO] Extracting rootfs, This may take time!  
[INFO] Creating wic image  
[INFO] wic create /home/alexian79/projects/pynq/PYNQ/sdbuild/boot/image.wks --rootfs-dir /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/wic/rootfs --bootimg-dir /home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020 --kernel-dir /home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020 --outdir /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/wic/wic-tmp -n /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/wic-tools/1.0-r0/recipe-sysroot-native  
INFO: Creating image(s)…

WARNING: bootloader config not specified, using defaults

INFO: The new image(s) can be found here:  
/home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/wic/wic-tmp/image-202407072151-mmcblk0.direct

The following build artifacts were used to create the image(s):  
ROOTFS\_DIR: /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/wic/rootfs  
BOOTIMG\_DIR: /home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020  
KERNEL\_DIR: /home/alexian79/projects/pynq/PYNQ/sdbuild/build/jammy.microzed-7020  
NATIVE\_SYSROOT: /home/alexian79/projects/pynq/PYNQ/sdbuild/build/microzed-7020/petalinux\_project/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/wic-tools/1.0-r0/recipe-sysroot-native

INFO: The image(s) were created using OE kickstart file:  
/home/alexian79/projects/pynq/PYNQ/sdbuild/boot/image.wks  
[ERROR] list index out of range  
alexian79@petalinux:~/projects/pynq/PYNQ/sdbuild$

---

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [July 8, 2024, 2:43am UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/5 "2024-07-08T02:43:02Z")

</div>

Ok, it looks like an issue inside petalinux-package wic, for some reason they expect that temp wic partitions/images are named starting with “rootfs-” prefix, but it is not the case now, they start with “image-”. after that fix I was able to boot my image on mz7020, hope overlay loading will work!

---

<div class="post-metadata">

**Author:** ![schelleg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/schelleg/32/208_2.png) [@schelleg](https://discuss.pynq.io/u/schelleg)\
**Post date:** [October 13, 2024, 2:28am UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/6 "2024-10-13T02:28:14Z")

</div>

@alexian79 - I’m curious how you root caused this bug … I’m looking at 2024.1 PYNQ right now and seeing the same issue… and what exactly did you fix to get wic to complete?

---

<div class="post-metadata">

**Author:** ![alexian79](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alexian79/32/6157_2.png) [@alexian79](https://discuss.pynq.io/u/alexian79)\
**Post date:** [October 13, 2024, 4:40am UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/7 "2024-10-13T04:40:47Z")

</div>

Hi, a bit hard to remember exactly. It was crashing on file rename, image generation is actually finished and rename operation is failed. You can do it manually.  
you can see on screenshot commented couple lines for debugger breakpoint. you can insert that and see what file it was looking for, I remember that prefix for the file have changed. I dont remember if this local on screenshot is fixed or not :(. Please try this and let me know. If you will stuck let me know and I will spend more time on remembering.

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

---

<div class="post-metadata">

**Author:** ![schelleg](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/schelleg/32/208_2.png) [@schelleg](https://discuss.pynq.io/u/schelleg)\
**Post date:** [October 15, 2024, 1:46am UTC](https://discuss.pynq.io/t/error-then-building-pynq-for-microzed-board/7252/8 "2024-10-15T01:46:31Z")

</div>

Brilliant! Thank you for that pointer … I do see the file and bug in `PLNX_20241_INSTALL/scripts/libs/package_wic.py` …

PYNQ Makefile will handle this correctly in future release by simply grabbing the image file directly
