Root partition empty after build

Hi folks,

I’ve been trying to get a full PYNQ build on my set up to get acquainted with the framework, since I have a project that will need a custom ZCU104 build for it. I’m building Pynq-Z1 on QEMU/KVM on a Fedora 30 host, with Ubuntu 16.04 as guest. The build proceeds normally, generating all output files (hdf, bsp, sysroot, bionic.arm, etc.) and mounts the two drives as expected. The big image ~7.5GB contains the Ubuntu+Pynq system and as far as I can tell, everything’s there. The boot image ~105MB ends up always empty, even though the sysroot files are present in the sdbuild/build/Pynq-Z1/petalinux_project/images/linux directory (BOOT.BIN, image.ub, system.dtb, vmlinux, etc).
So it seems that there is trouble mounting (i.e. chroot) that drive for some reason, but I’m unable to find a cause. I will greatly appreciate any pointers.

Thanks in advance,
-Pat

I would suggest tee-ing the log for your next build and inspect it afterwards. If the boot partition is empty is likely the case that the log is spitting out some errors.
You can also share it here for others to read and perhaps help you spot what is going on.
I frankly cannot really give you more than that as I’ve never seen this happening before.

Hi @gnatale et al,

Thanks for your suggestions. I’ve tee’d the “make BOARDS=Pynq-Z1” to a log file[1]; there’s not much abnormal that I can tell, but perhaps a trained eye would see a reason. Using image-2.5 branch.
By the way, the chroot mounts don’t seem to unmount at the end of the build, like I suppose they should. Also perhaps unrelated, after the requested Pynq-Z1 builds finishes, make continues on to the ZCU104 when it should’ve stopped. See around line 189211; it git clones PYNQ inside the chroot area, but somehow ends up in the host drive, and then it ./build.sh on it, starting over, now including the ZCU104 build.
If anyone sees a clue or need more info about something, please ask. I’ll appreciate any pointers.

Thanks again,
-Pat

[1]: Pynq-Z1 log file

From the log it seems you have not reached the point where the boot files are moved, which is done here. You basically stopped the log at this line in the makefile.
To be more precise, you have stopped the process while it was creating the rootfs which is board-agnostic (ARCH_SPECIFIC_RULES in the makefile), and so boot files are not really touched at that stage. They are used later when we get the board-agnostic image produced (for the Z1 is bionic.arm.2.5.img) and combine it with boot files, and additional config and packages specific to the board you are building for (BOARD_SPECIFIC_RULES).

Also, in your log it is not really building for ZCU104, is just synthesizing its bitstream (the base overlay in particular, through vivado). This is done for all boards inside PYNQ at the board-agnostic stage becasue it is needed to build the pynq sdist tarball (the tarball that is used to pip-install pynq). I am not arguing that it is the best approach, but at the moment that’s the way it is. You should let it run, in the end, it will really just build for your board, but bitstreams will be built for all the boards (Z1, Z2, ZCU104).
If you want to avoid this step, you may want to pass the arm board-agnostic image we provide, and skip the board-agnositc stage altogether: go to PYNQ - Python productivity for Zynq - Board and download the arm rootfs from “other boards”.
Once downloaded, you can pass it to make by doing
make PREBUILT=<full-path-to-rootfs-img> BOARDS=Pynq-Z1

The boot files are correctly built before though.

Again, you should let the build finish and share the complete log instead.

Hi @gnatale,

I appreciate your timely responses. The bitstream build for the ZCU104 does not complete due to the HDMI license not being available, as some people already have found [1]. Given this limitation, I am unable to build PYNQ to completion, even though I’m not interested in the ZCU104 at the moment. Is there a way to skip this bitstream and thus complete the PYNQ build? I’ve tried removing the ZCU104 directory from the tree, but git pulls it back under the build directory.

[EDIT] I’ve attached the log for this build [2], including the PREBUILT bionic.arm.2.5.img. Unfortunately, it still tries to synthesize the ZCU104.

Thanks again,
-Pat

[1] Make builds pynq-z1 and z2 but not ZCU104 - #3 by johnk
[2] Pynq build for Pynq-Z1 · GitHub

Hi,

I was able to build the Pynq-Z1 image after I set up a HDMI evaluation license for ZCU104 on my floating license server. Regardless, the build requiring this license or the fact that all bitstreams need to be generated is seriously limiting, time consuming and in my opinion, should be configurable to pick or exclude non-essential boards.

Thanks again for your support,
-Pat

2 Likes

Hi Pat,

First and foremost, sorry for replying only now. Secondly, glad you find your way around the issue.
And third, and I believe most importantly, your feedback was very valuable. I am going to report your experience to the team and see what we can do about it!

Hi @gnatale

I appreciate your continuing support and attitude toward newcomers. I engaged my client with their needs to Pynq on an ongoing project, so you’ll be hearing from me in the immediate future. :slight_smile:

Thanks again,
-Pat

2 Likes