• 0

Problems with PetaLinux for Zybo Z7-10


Hello all

I want to load PetaLinux from SD to the board Zybo Z7-10.

I am new in PetaLinux and I found only document "Embedded Linux Hands-on Tutorial for the ZYBO" 
that was intended for Zibo board.
I looked this design and it was not appropriate for Zibo Z7.

Please answer on the following questions:
1) where I can find similar step-by-step instructions and necessary sourse codes for targeting 
   of the Peta Linux to the SD flash for Zybo Z7-10 ?

2) where I can find ready to use files that can be written to the SD flash for Zybo Z7-10 ?

Thank you,

Best regards,
[email protected]

Edited by Victor

Share this post

Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

With this BSP, I followed the instructions to build Petalinux and have several .bin files...

mymachine:~/peta/Arty-Z7-10/build/tmp/deploy/images/plnx_arm 28> ls -lLt *.bin
-rw-r--r--. 2 user domain users 47293136 Mar 10 20:06 uImage-initramfs-4.9-xilinx-v2017.4+gitAUTOINC+83ccde7efd-r0-plnx_arm-20200310235137.bin
-rw-r--r--. 2 user domain users 47293136 Mar 10 20:06 uImage-initramfs-plnx_arm.bin
-rw-r--r--. 2 user domain users 47293072 Mar 10 20:06 zImage-initramfs-4.9-xilinx-v2017.4+gitAUTOINC+83ccde7efd-r0-plnx_arm-20200310235137.bin
-rw-r--r--. 2 user domain users 47293072 Mar 10 20:06 zImage-initramfs-plnx_arm.bin
-rw-r--r--. 2 user domain users  3751752 Mar 10 20:06 uImage--4.9-xilinx-v2017.4+git0+83ccde7efd-r0-plnx_arm-20200310235137.bin
-rw-r--r--. 2 user domain users  3751752 Mar 10 20:06 uImage-plnx_arm.bin
-rw-r--r--. 2 user domain users  3751688 Mar 10 20:06 zImage--4.9-xilinx-v2017.4+git0+83ccde7efd-r0-plnx_arm-20200310235137.bin
-rw-r--r--. 2 user domain users  3751688 Mar 10 20:06 zImage-plnx_arm.bin
-rw-r--r--. 1 user domain users   422320 Mar 10 19:57 u-boot.bin
-rw-r--r--. 1 user domain users   422320 Mar 10 19:57 u-boot-plnx_arm.bin
-rw-r--r--. 1 user domain users   422320 Mar 10 19:57 u-boot-plnx_arm-v2017.01-xilinx-v2017.4+gitAUTOINC+a2911a99e4-r0.bin

I assume any of these will work.  Tried out zImage--4.9-xilinx-v2017.4+git0+83ccde7efd-r0-plnx_arm-20200310235137.bin by putting it on a uSD card that is formatted to FAT32.

Followed the Z7-10 instructions to set power jumper (Wall) and boot-source jumper (SD).  Turn the board on and nothing happens.

PGOOD (power good) is solid-on (Red color).

I have an HDMI display connected to the HDMI TX connector.

There is mention of TeraTerm above, which seems to indicate some ASCII message is coming out a serial port.  Is this the case, and if so, where?

Thanks for all help in advance on getting my board started up.



Edited by plu
Clarify specific board

Share this post

Link to post
Share on other sites
  • 0
Posted (edited)

With the pre-built/linux/images/BOOT.BIN, the DONE LED lights up green, so something is different from the build I made (from the BSP sources).

Z7 docs mention FT2232 UART on connector J12.  Connected uUSB cable between Z7 and PC.  I see serial port enumerated in Windows 10 Device Manager.  Set port to 115200 8N1.

However, no message(s) appear.  If Z7 is power-cycled, then serial device disappears from (and reappears in) Device Manager, but any message sent from Z7 is probably lost.

PS-SRST (Processor Subsystem Reset) doesn't seem to get anything printed to serial port, but the DONE LED does go off, then on (green).  The LD6 LED also goes off and on (green).




Edited by plu

Share this post

Link to post
Share on other sites
  • 0

According to:



The three boot modes are described in the following sections.

3.1 microSD Boot Mode

The Arty Z7 supports booting from a microSD card inserted into connector J9. The following procedure will allow you to boot the Zynq from microSD with a standard Zynq Boot Image created with the Xilinx tools:

Format the microSD card with a FAT32 file system.

Copy the Zynq Boot Image created with Xilinx SDK to the microSD card.

Rename the Zynq Boot Image on the microSD card to BOOT.bin.

Eject the microSD card from your computer and insert it into connector J9 on the Arty Z7.

Attach a power source to the Arty Z7 and select it using JP5.

Place a single jumper on JP4, shorting the two top pins (labeled “SD”).

Turn the board on. The board will now boot the image on the microSD card.



What is the "Zynq Boot Image" that is to be copied to SD and renamed BOOT.bin?

I don't even see anything similar to the pre-built/images/linux/BOOT.BIN file.

I see these files in the Arty-Z7-10/images/linux directory:

/Arty-Z7-10/images/linux 13> ls -l
total 818508
-rw-r--r--. 1 user domain users    975132 Mar 28  2018 Arty_Z7_10_wrapper.bit
-rw-r--r--. 1 user domain users  47611028 Mar 20 20:31 image.ub
-rw-r--r--. 1 user domain users 129548288 Mar 20 20:29 rootfs.cpio
-rw-r--r--. 1 user domain users  43831434 Mar 20 20:30 rootfs.cpio.gz
-rw-r--r--. 1 user domain users  43831498 Mar 20 20:30 rootfs.cpio.gz.u-boot
-rw-r--r--. 1 user domain users 177513472 Mar 20 20:29 rootfs.ext3
-rw-r--r--. 1 user domain users 177513472 Mar 20 20:29 rootfs.ext4
-rw-r--r--. 1 user domain users  43926125 Mar 20 20:29 rootfs.ext4.gz
-rw-r--r--. 1 user domain users  64749568 Mar 20 20:30 rootfs.jffs2
-rw-r--r--. 1 user domain users      7097 Mar 20 20:29 rootfs.manifest
-rw-r--r--. 1 user domain users  43891152 Mar 20 20:29 rootfs.tar.gz
-rw-r--r--. 1 user domain users     26262 Mar 20 20:20 system.dtb
-rw-r--r--. 1 user domain users   2171767 Mar 20 20:31 System.map.linux
-rw-r--r--. 1 user domain users    422336 Mar 20 20:21 u-boot.bin
-rw-r--r--. 1 user domain users   3255832 Mar 20 20:21 u-boot.elf
-rw-r--r--. 1 user domain users  11365344 Mar 20 20:31 vmlinux
-rw-r--r--. 1 user domain users  47285704 Mar 20 20:31 zImage
-rw-r--r--. 1 user domain users    184944 Mar 20 20:22 zynq_fsbl.elf


The Digilent documentation is incomplete and inexact.



Share this post

Link to post
Share on other sites
  • 0

I have not been able to build a BOOT.bin that "exactly" matches the pre-built BOOT.bin in the BSPs (Zybo an Arty-Z7-10).  My build is close, but not close enough.

It's really annoying that the BSPs do _not_ include the .bif files that goes with the pre-built BSPs.  The .bif file lists what's in the BOOT.bin and what options/directives were used to assemble the components.

I don't think that even being able to dump and reverse-engineer the BOOT.bin image would be sufficient, since the build information is not included in (and recoverable from) BOOT.bin.




Share this post

Link to post
Share on other sites
  • 0

Got the Zybo my-build and pre-built BOOT.bin images to do the same things.

This article helped…



Had to put the .bit file as the second item, before u-boot, rather than last.


=== output.bif


//arch = zynq; split = false; format = BIN





        [checksum = md5]/home/user/peta/Zybo/images/linux/u-boot.elf



Share this post

Link to post
Share on other sites
  • 0
Posted (edited)

Got the _right_ BSP working, booting to u-boot and Linux.

Didn't realize that only the Zybo-Z7-10 BSP (which I didn't notice existed) works on the Zybo-Z7-10 board.  I was playing with the Arty-Z7-10 and Zybo BSPs.

Digilent makes (at least) 3 different Z7-10 boards, which are not mutually hardware compatible.  This is very different from the Raspberry Pi world, where any software OS bundle works on any Pi board.


The Vivado+Petalinux procedures I learned along the way with the other BSPs are very much applicable to the Zybo-Z7-10 BSP.


Edited by plu

Share this post

Link to post
Share on other sites
  • 0

Some missing pieces of the puzzle...

This article shows what goes on the SD card...  BOOT.bin, system.dtb, and image.ub, to get Linux going.



This script should do the entire build...


> cat bin/build_Zybo-Z7-10
        echo $*

if ! which petalinux-create 2>/dev/null
then echo "ERROR: petalinux-create not found"
        exit 1

echo_run petalinux-create -t project -s /xtra/opt/pkgs.petalinux/Petalinux-Zybo-Z7-10-2017.4-1.bsp

if [ ! -d Zybo-Z7-10 ]
then echo "ERROR: Create failed"
        exit 1

echo_run cd Zybo-Z7-10

echo_run petalinux-config

echo_run petalinux-build


Run xsdk from the Vivado suite (Xilinx->Create Boot Image) to make BOOT.bin and output.bif as described before.


Share this post

Link to post
Share on other sites
  • 0

There is a quirky bug that causes petalinux-config or petalinx-build to fail on bitbake (after having run successively many times).  The following script fixes it...

> cat bin/fix_bitbake
# https://github.com/guard/rb-inotify/issues/23
# https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached


echo set new NWATDHES=$N_WATCHES

echo -n "Initial max_users_watches="
cat /proc/sys/fs/inotify/max_user_watches

sudo sysctl fs.inotify.max_user_watches=$N_WATCHES

echo -n "New max_users_watches="
cat /proc/sys/fs/inotify/max_user_watches


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now