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

Willy I see u had passed the Pynq-Z2 build so dont make clean go to the build/PYNQ/build.sh and remove those lines and make again you are set.

image
Just want to make sure.
I don’t see the build/PYNQ folder, does I should create a new one and copy the build.sh into that?

did you clean?
if not, remove the line from build.sh ~/PYNQ see if this pass?

Not yet.

  1. Remove unnecessary boards. (Pynq-Z1 and ZCU104) in the build folder.
  2. Remove the the lines in PYNQ/build.sh
  3. Back to sdbuild folder and execute command:
    make BOARDS=Pynq-Z2
    It download and install a lot of packages and create a folder “focal.arm” in the build folder.
    I guess it is creating the board-agnostic image…

Anyway, It seems have different behavior for the command: “make” and “make BOARDS=Pynq-Z2”

Willy you need to read document or open Makefile to understand what it is doing.
I am confuse what actually you are trying to build here if image of Pynq-Z2 it can download wo building yourself. If you want a different base-overlay then thats the case.
If you need bsp and driver control changes then make if what you need.

Btw, I had install and build the board Pynq-Z2 from scratch and same behavior remove lines in build/PYNQ/build.sh
make BOARDS=xxx PREBUILT=xxxx and success not issue and just need to make fail on other boards stop and remove line and make again (no clean) all done.

I suffer some permission related issues. So I unisntall Vitis & Vivado again, and install them without using root permission and put their location at ~/Xilinx just like your suggestion.

  1. cd ~/PYNQ/sdbuild
  2. make PREBUILT=focal.aarch64.2.7.0_2021_11_17.tar.gz BOARDS=Pynq-Z2
  3. Build a lot of time, it will fail at board ZCU104
    makefile:16: recipe for target ‘bitstream’ failed
    ====================================================
    make[1]: *** [bitstream] Error 137
    make[1]: Leaving directory ‘/home/willy/PYNQ/sdbuild/build/PYNQ/boards/ZCU104/base’

  • unmount_special
  • for fs in $fss
  • sudo umount -l /home/willy/PYNQ/sdbuild/build/focal.Pynq-Z2/proc
    [sudo] password for willy:
    Sorry, try again.
    [sudo] password for willy:
  • for fs in $fss
  • sudo umount -l /home/willy/PYNQ/sdbuild/build/focal.Pynq-Z2/run
  • for fs in $fss
  • sudo umount -l /home/willy/PYNQ/sdbuild/build/focal.Pynq-Z2/dev
  • sudo umount -l /home/willy/PYNQ/sdbuild/build/focal.Pynq-Z2/ccache
  • rmdir /home/willy/PYNQ/sdbuild/build/focal.Pynq-Z2/ccache
    Makefile:343: recipe for target ‘/home/willy/PYNQ/sdbuild/build/Pynq-Z2.tar.gz’ failed
    make: *** [/home/willy/PYNQ/sdbuild/build/Pynq-Z2.tar.gz] Error 2
    =================================================
  1. Remove lines in build/PYNQ/build.sh, and execute make again:
    make PREBUILT=focal.aarch64.2.7.0_2021_11_17.tar.gz BOARDS=Pynq-Z2
    Finally, I got the success result:
    image

One more thanks again, briansune.
Another question, how can we compress them into the SD card image just like the below link?
https://bit.ly/pynqz2_2_7

BTW, in your post:

==================================

Step 10 update a bit:
apt-get install tftpd tftp openbsd-inetd
gedit /etc/inetd.conf
(add this) tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot
mkdir /tftproot
chmod 777 /tftproot
/etc/init.d/openbsd-inetd restart
netstat -an | more | grep udp

===========================
The “tftproot” should be corrected to “tftpboot”, because the make script use “tftpboot” not “tftproot”.
INFO: Failed to copy built images to tftp dir: /tftpboot

1 Like

@briansune
I have a question about the prebuilt board-agnostic image.
For the PYNQ-Z2 board, does I should use the “arm” not "aarch64 ".


Why I can build pass when using the command:

  1. make PREBUILT=focal.aarch64.2.7.0_2021_11_17.tar.gz BOARDS=Pynq-Z2

You should uese ARM as ARM7l in ZYNQ is a 32bit processor.

What I understand is that if you got more experience on PetaLinux boot and root.
Boot is a boot loader and driver list and bsp and elf preload files that located in which similar to where I am going to find my OS (root location).

So you are pointing to root about the question you trying to ask,
Root is just a ext4 partition that copy onto. does it mount and check I am not sure but as it is using a pre-built image I will expect it is just a copy and merge + zip action.

So the major differences are only the boot and the root is from the gz file.

However, what happen when you boot your OS with a incompatible core architecture I had no idea.

@briansune Thanks for your answer.
I’m not familiar to the PetaLinux. I will study how the Petalinux working.
I would like to understand how the FSBL, uboot, and kernel building. It seems the make in the sdbuild folder is simply to process of them.

Willy,

For my limited understanding.
I don’t have much detail reading on the sdbuild for my case, unless I had some custom driver or communication needed I will not investigate much.
But I do had a little experience on custom PetaLinux + Ubuntu ARM build (Not PYNQ).
So what I understand is both PYNQ and custom build are so similar control and setup are all following the same backend settings (It will not become other build tool as all relying PetaLinux so far).

Now back to the question:
FSBL - my experience told me if you had a complete standalone ZYNQ design (No OS) and you are going to boot from other location i.e. DDR /NAND the first thing you would need is to tell the ARM to use bar bar bar so FSBL=First Stage Bootloader I will think as very first stage of BIOS? (Maybe I am wrong).
After that it will start setup more things and seek boot bar bar bar.
Things getting so complex maybe open a new post for other to answer this more deeply.

But as an user + developer + engineer why spend so much time to understand all…llllllll details when the top idea could support you enough to develop.