PYNQ: PYTHON PRODUCTIVITY

Issues: Quick Porting of PYNQ using Pre-built Images

mass@mass-HP-246-Notebook-PC:~/Music/Pynq/sdbuild$ make BOARDDIR=test_repo PREBUILT=bionic.arm.2.5.img
vivado -version | fgrep 2019.1
Vivado v2019.1 (64-bit)
xsdk -version | fgrep 2019.1
****** SDK v2019.1 (64-bit)
which petalinux-config
/opt/pkg/petalinux/2019.1/tools/common/petalinux/bin/petalinux-config
which arm-linux-gnueabihf-gcc
/opt/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
which microblaze-xilinx-elf-gcc
/opt/pkg/petalinux/2019.1/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/mass/Music/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/mass/Music/Pynq/sdbuild/scripts/check_mounts.sh
I got this only

Is there anything in the output folder?

Hi, my make quits after the check_mounts.sh line as well. I’d really appreciate some help, I’ve been trying to compile PYNQ for the ZC706 for weeks now and it seems every method or script is broken in some different way.

What’s the output of mount | grep build? The check_mounts.sh script stops the build from running if there is the left-overs from a failed build still set up (which can unfortunately happen due to the limitations of make).

If there are mounts left over the easiest option is to restart the machine.

To clear them out manually first the partitions need to be unmounted. There will usually be two - one for the boot partition and one for the root filesystem and both will be by the build directory. The output from the above grep will give the exact folders.

With the partitions unmounted you then need to unmount the image file. To find out which image file is mounted run sudo losetup -a and then use sudo kpartx -d $img_file.

Finally delete the image file so that make will rebuild it.

If you are still running into issues attached the output of your make command with the -n option and then again with the -d option. Note that the latter will be very large so you might want to compress it.

Peter

A post was split to a new topic: Starting Jupyter issue: Porting of PYNQ using Pre-built Images

Hi, I followed your advice and was able to have make run, only to run into an issue I had seen previously. The following are the last few lines of the make output, please let me know if you need more information. I have looked around for this specific error on the forums but can’t seem to find anything.

sudo cp /home/adam/PYNQ/sdbuild/output/boot/ZC706/image.ub 
/home/adam/PYNQ/sdbuild/output/boot/ZC706/BOOT.BIN 
/home/adam/PYNQ/sdbuild/build/bionic.ZC706/boot
mkdir -p /home/adam/PYNQ/sdbuild/build/ZC706/modules
cd /home/adam/PYNQ/sdbuild/build/ZC706/modules && tar -xf 
/home/adam/PYNQ/sdbuild/build/ZC706/petalinux_project/build/tmp/deploy/images/modules- 
plnx_arm.tgz
sudo cp -r --no-preserve=ownership /home/adam/PYNQ/sdbuild/build/ZC706/modules/* 
/home/adam/PYNQ/sdbuild/build/bionic.ZC706
rm -rf /home/adam/PYNQ/sdbuild/build/ZC706/modules
rpm2cpio /home/adam/PYNQ/sdbuild/build/ZC706/petalinux_project/build/tmp/deploy/rpm/kernel- 
devsrc-1.0-r0.plnx_arm.rpm | sudo chroot /home/adam/PYNQ/sdbuild/build/bionic.ZC706 cpio -id
91734 blocks
sudo chroot /home/adam/PYNQ/sdbuild/build/bionic.ZC706 depmod -a 4.19.0-xilinx-v2019.1
depmod: ERROR: could not open directory /lib/modules/4.19.0-xilinx-v2019.1: No such file or 
directory
depmod: FATAL: could not search modules: No such file or directory
Makefile:324: recipe for target '/home/adam/PYNQ/sdbuild/output/ZC706-2.5.img' failed
make: *** [/home/adam/PYNQ/sdbuild/output/ZC706-2.5.img] Error 1

EDIT: It just occured to me that I have PetaLinux 2019.2 installed, not 2019.1. I’m guessing that would account for the file name not matching. I’ll downgrade and try again.