Skip to content

Quick Start Guide for Arty Z7

Sam Bobrowicz edited this page Apr 18, 2017 · 3 revisions

Introduction

This page provides a quick start guide for using the Arty-Z7 Petalinux BSP. It covers the following:

  • Testing pre-built images
  • Building the Default PetaLinux project
  • Testing the built images

Note: This guide offers a quick procedure for testing and building the default Petalinux BSP project provided by Digilent. It is recommended that you also read Xilinx's Petalinux Reference Guide (ug1144) to learn about all the ways the Petalinux tools can be used to further build upon the default project

Prerequisites

  • PetaLinux Tools v2016.2
  • Xilinx Vivado v2016.2
  • PetaLinux Tools and Vivado Tools must be sourced (see page 15 of ug1144)
  • Internet access required when first building the project

Create Local Petalinux Project

  • Method 1: Cloning the projects and BSPs with git:

    $ git clone https://github.com/Digilent/petalinux-bsps.git

    In the petalinux-bsps folder, you will see two folders:

    • projects: holds the PetaLinux BSP projects in source format. each sub-folder represents a project design and you can run petalinux-xxx commands directly within each project directory.

    • releases: holds all the PetaLinux BSPs in .bsp format that were generated from the projects in the projects folder. To use the .bsp file, please refer to Method 2.

      Important Note: You must run "petalinux-config" before building the project. The reason for this is because git does not revision control empty folders. Currently the zynq_fsbl_bsp Makefile does not work property (not triggering rebuild) if the bsp lib (ps7_cortexa9_0/lib) directory is missing.

  • Method 2: Download the bsp file from https://github.com/Digilent/petalinux-bsps and use it to create a new Petalinux project:

    $ petalinux-create -t project -s <path-to-bsp>

Boot the pre-built images

There are a couple methods to test the pre-built images provided in the BSP.

  • Boot system via JTAG:

    • Ensure the board is configured as JTAG boot mode

      Arty-Z7: Set JP4 to "JTAG"

    • Go to your petalinux project directory

    • Boot with Petalinux command

      • Boot prebuilt kernel

      $ petalinux-boot --jtag --prebuilt 3

      Once the process is completed, you will see the kernel booting at a terminal attached to the USB-UART interface at 115200 Baud.

      • Boot prebuilt u-boot

      $ petalinux-boot --jtag --prebuilt 2

      Once the process is completed, you will see u-boot booting at a terminal attached to the USB-UART interface at 115200 Baud.

      For more detailed information, please refer to the "Using petalinux-boot Command with Prebuilt Images" section of the PetaLinux Reference Guide (ug1144).

  • Boot system with microSD card:

    • Ensure the first partition of the microSD card is FAT

    • Copy the following images from <path to bsp>/pre-built/linux/images/ to the microSD:

      • BOOT.BIN
      • image.ub
    • Ensure the board is configured as SD boot mode:

      Arty-Z7: Set JP4 to "SD"

    • Power cycle the board

    If you do not interrupt U-Boot at the console, it should automatically boot into the kernel and provide a console over the USB-UART interface.

    For more detailed information, please refer to "Boot a PetaLinux Image on Hardware with SD Card" section of the PetaLinux Reference Guide (ug1144).

Configuring the PetaLinux BSP

This section provides a basic introduction to reconfiguring the BSP.

Note: Sometimes the petalinux-config command takes a long time to complete after exiting the configuration menu if the remote repos used for Kernel/U-Boot need to be fetched.

  • overall system configurations - This menu provides the overall system configuration, such as generating zynq_fsbl, device tree, customized kernel/u-boot, etc.

    $ petalinux-config

  • Kernel configurations - This enters the Kernel menuconfig

    $ petalinux-config -c kernel

  • U-Boot configurations - This enters the U-Boot menuconfig

    $ petalinux-config -c uboot

  • rootfs configurations - This menu allows to you to select/deselect what packages/apps/libs shall be installed in the rootfs.

    $ petalinux-config -c rootfs

Building the Petalinux BSP

Once the BSP is configured, run the following command to build the BSP.

$ petalinux-build

This will take a while to complete, depending on how powerful your workstation is.

Note: petalinux-config must have been run at least once before running petalinux-build or else the zynq fsbl may fail to build. This is not necessary if your project was generated using the .bsp file.

Booting the New Images

There are couple methods to test the images.

  • Boot system via JTAG:

    • Ensure the board is configured as JTAG boot mode

      Arty-Z7: Set JP4 to "JTAG"

    • Go to your Petalinux project directory

    • Boot with the following Petalinux commands:

      • To boot u-boot (BITSTREAM can be found in images/linux/):

      $ petalinux-boot --jtag --u-boot --fpga --bitstream ./images/linux/linux_bd_wrapper.bit

      • To boot kernel (BITSTREAM can be found in images/linux/):

      $ petalinux-boot --jtag --kernel --fpga --bitstream ./images/linux/linux_bd_wrapper.bit

      Once the process is completed, you will should be provided with a console over the USB-UART interface.

  • Boot system with microSD card:

    • Package the BOOT.BIN

    petalinux-package --boot --u-boot --fpga ./images/linux/linux_bd_wrapper.bit --fsbl ./images/linux/zynq_fsbl.elf

    • Ensure the first partition of the microSD card is FAT formatted

    • Copy the following files from <path to bsp>/images/linux/ to the microSD:

      • BOOT.BIN
      • image.ub
    • Ensure the board is configured as SD boot mode

      Arty-Z7: Set JP4 to "SD"

    • Power cycle the board

    If you do not interrupt U-Boot at the console, it should automatically boot into the kernel and provide a console over the USB-UART interface.

    For more detailed information, please refer to "Boot a PetaLinux Image on Hardware with SD Card" section of the PetaLinux Reference Guide (ug1144).

Known issues

  1. HDMI: Screen does not wake up from screen saver (console blank). Currently we have disabled the console blank by default for FrameBuffer console. This is handled by user app console-blank.

  2. U-Boot compilation warning due to redefined: These warnings are harmless and caused by macros being redefined in multiple files. You can remove the warning by undefining the redefined macro in subsystems/linux/configs/u-boot/platform-top.h. We have already add a set of "undef" in the file to avoid the warning for the current configuration.

  3. Currently, PetaLinux tools does not check if the remote has updated or not. In order to fetch the remote repo again or fetch the update. You must run he following command manually:

    $ petalinux-build -c <COMPONENT> -x mrproper

    This will remove the existing remote of the specified COMPONENT, where COMPONENT can be either "kernel" or "u-boot".

Clone this wiki locally
You can’t perform that action at this time.