PYNQ: PYTHON PRODUCTIVITY

PYNQ-2.4 for Zedboard v2018.3

I’m using PYNQ-2.4 to build PYNQ SD card for Zedboard.

Currently, this tutorial: PYNQ SD card is followed.

This is the folder ~/Documents/PYNQ-2.4/boards/* structure, and I have moved Pynq-Z1, Pynq-Z2 and ZCU104 to another directory:
image

The zedboard.tcl script contains only this:
image

Both zedboard_ps.bit and system.hdf is the files generated by Vivado v2018.3 according to the zedboard.tcl script. (I read from this post: petalinux tcl question 258)

The bsp file in ~/Documents/PYNQ-2.4/avnet-digilent-zedboard-v2018.3-final.bsp is downloaded from here:
avnet-digilent-zedboard-v2018.3-final.bsp in the Xilinx download website

And the specification file ~/Documents/PYNQ-2.4/boards/zedboard/zedboard.spec contains this
image

Then I go to ~/Documents/PYNQ-2.4/sdbuild/ and do the following command:

cd ~/Documents/PYNQ-2.4/sdbuild/
make

However, I get this error:

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x2661ba02.

Command (m for help): Created a new DOS disklabel with disk identifier 0x64f7530e.

Command (m for help): Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-14680063, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-14680063, default 14680063):
Created a new partition 1 of type 'Linux' and of size 100 MiB.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (206848-14680063, default 206848): Last sector, +sectors or +size{K,M,G,T,P} (206848-14680063, default 14680063):
Created a new partition 2 of type 'Linux' and of size 6.9 GiB.

Command (m for help): Partition number (1,2, default 2):
The bootable flag on partition 1 is enabled now.

Command (m for help): Partition number (1,2, default 2): Partition type (type L to list all types):
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.

Command (m for help): Disk /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img: 7 GiB, 7516192768 bytes, 14680064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x64f7530e

Device                                                             Boot  Start      End  Sectors  Size Id Type
/home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img1 *      2048   206847   204800  100M  c W95 FAT
/home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img2      206848 14680063 14473216  6.9G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.

+ mount_points=($(sudo kpartx -av $image_file | cut -d ' ' -f 3))
++ sudo kpartx -av /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img
++ cut -d ' ' -f 3
+ echo loop5p1
loop5p1
+ echo loop5p2
loop5p2
+ root_part=/dev/mapper/loop5p2
+ boot_part=/dev/mapper/loop5p1
+ sleep 1
+ sudo chroot / mkfs -t fat /dev/mapper/loop5p1
mkfs.fat 3.0.28 (2015-05-16)
/dev/mapper/loop5p1: No such file or directory
Makefile:299: recipe for target '/home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img' failed
make: *** [/home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.arm.stage1.img] Error 1

Can someone help me to check which part I have done it wrong?

The build folder structure is shown:
image

Can you try follow this tutorial?
This is an easier flow for building a PYNQ image:

Cathal

Hi @cathalmccabe! Thx for your response.

I got few questions:

1.) It is mentioned

  1. Most recent board agnostic image from pynq.io listed under Other boards

So, I’ll download one of the SD image from here and pick any of it?

However, I’m using PYNQ-2.4, so I’ll download it from here?

2.) Within the tutorial that you have provided, at the section “Customizing the image”,
The command:

$ make BOARDDIR=test_repo PREBUILT=bionic.arm.2.5.img

The image path PREBUILT bionic.arm.2.5.img is the image resulted from in the “outputs” folder?

Once the script has finished the image will be in the outputs folder ready to be burned to an SD card.

Thx! :smiley:

Hi @cathalmccabe , I’m following the guide that you have given it to me:

But still I get to the same error again. I’m wondering this is the command that it writes the image to the SD card?


****** Xilinx Bootgen v2018.3
  **** Build date : Nov 15 2018-19:22:29
    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

INFO: Binary is ready.
cp -f /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project/images/linux/BOOT.BIN /home/yang/Documents/PYNQ-2.4/sdbuild/output/boot/zedboard
cp -f /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project/build/tmp/deploy/images/*/modules--*.tgz /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project/build/tmp/deploy/images/modules-plnx_arm.tgz
PYNQ_BOARDNAME=zedboard petalinux-build -c kernel-devsrc -p /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project
[INFO] building kernel-devsrc
[INFO] sourcing bitbake
INFO: bitbake kernel-devsrc
Loading cache: 100% |####################################################################################| Time: 0:00:00Loaded 3445 entries from dependency cache.
Parsing recipes: 100% |##################################################################################| Time: 0:00:04Parsing of 2571 .bb files complete (2537 cached, 34 parsed). 3449 targets, 149 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |###############################################################################| Time: 0:00:01Checking sstate mirror object availability: 100% |#######################################################| Time: 0:00:02NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1191 tasks of which 1132 didn't need to be rerun and all succeeded.
INFO: Copying Images from deploy to images
NOTE: Successfully copied built images to tftp dir:  /tftpboot
[INFO] successfully built kernel-devsrc
cp -f /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project/build/tmp/deploy/rpm/*/kernel-devsrc-1.0-r0.*.rpm /home/yang/Documents/PYNQ-2.4/sdbuild/build/zedboard/petalinux_project/build/tmp/deploy/rpm/kernel-devsrc-1.0-r0.plnx_arm.rpm
mkdir -p /home/yang/Documents/PYNQ-2.4/sdbuild/ccache
cp --sparse=always /mnt/d/pynq/pynq_z1_v2.4.img /home/yang/Documents/PYNQ-2.4/sdbuild/output/zedboard-2.4.img
/home/yang/Documents/PYNQ-2.4/sdbuild/scripts/mount_image.sh /home/yang/Documents/PYNQ-2.4/sdbuild/output/zedboard-2.4.img /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard
[sudo] password for yang:
loop0p1
loop0p2
mount: special device /dev/mapper/loop0p2 does not exist
mount: mount point /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard/boot does not exist
QEMU_EXE=/opt/qemu/bin/qemu-arm-static PYNQ_BOARDDIR=/tmp/tmp.iC2pP0Gx9E/zedboard PYNQ_BOARD=zedboard ARCH= PACKAGE_PATH=/tmp/tmp.iC2pP0Gx9E/zedboard/packages /home/yang/Documents/PYNQ-2.4/sdbuild/scripts/install_packages.sh /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard
+ target=/home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard
+ shift
+ fss='proc run dev'
+ for fs in '$fss'
+ sudo mount -o bind /proc /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard/proc
mount: mount point /home/yang/Documents/PYNQ-2.4/sdbuild/build/bionic.zedboard/proc does not exist
Makefile:298: recipe for target '/home/yang/Documents/PYNQ-2.4/sdbuild/output/zedboard-2.4.img' failed
make: *** [/home/yang/Documents/PYNQ-2.4/sdbuild/output/zedboard-2.4.img] Error 32
Make failed

Moreover, I can see that the image is resulted in the output folder:
image

Then, I burn the zedboard-2.4.img to my sd card through this guide and connect the zedboard to my router with ethernet cable. The zedboard is connected to my laptop usb port too. Through switching on the zedboard, I open up tera term to see the response from the zedboard, it goes empty and nothing occurs:
image

I did login to my router and see the connected device and the zedboard connection is not found in the list.

After that, I connect my laptop and the zedboard directly without the router and I have followed this tutorial: Assign your computer a static IP address.
image

I try to ping the zedboard with direct connection.
image

I’m wondering which step of creating image that I have done is false.

Ok, I have solved the problem. @cathalmccabe Thx!

For those who met same problem as me, you can see this: :smiley:
Build PYNQ-2.4 SD card Image for Zedboard v2018.3

1 Like

Thanks a lot for replying to say it works and for sharing your info!

Cathal