Petalinux Build Tutorial for ZU+ RFSoC ZCU111 2020.1 and 2020.2

This page describes the steps for creating and building a 2020.1 PetaLinux project for use with the ZCU111 RFSoC Evaluation tool.

Table of Contents

Overview

The ZCU111 RFSoC Eval Tool has three designs based on the functionality. A detailed information about the three designs can be found from the following pages.

This tutorial includes the following:-

  • Steps to source and setup the PetaLinux tool for building the images.  

  • Step-by-step tutorial to build all the images using the PetaLinux tool.  

  • Information about the relevant kernel and device tree patches as well as the applications within the designs.

Building the Linux Image

Installation

PetaLinux consists of three key elements: pre-configured binary bootable images, fully customizable Linux for the Xilinx device, and PetaLinux SDK which includes tools and utilities to automate complex tasks across configuration, build, and deployment.Visit the PetaLinux wiki page for more details. Refer to the PetaLinux Tool Documentation (UG1144) for installation.

Procedure to build the Linux Image

The following section provides the steps to build all the images using the petalinux tool.  

 Set $DCET_HOME environment variable as given below.

% export DCET_HOME=</path/to/download/zipfile>/rdf0476-zcu111-RFdc-eval-tool-2020.1
  1. Sourcing the petalinux tool:

% source <path/to/petalinux-installer>/petalinux-v2020.1/petalinux-v2020.1-final/settings.sh

2. Post petalinux installation, $PETALINUX variable should be set, command to cross-check the variable:

% echo $PETALINUX

The following steps should be executed for each design (mts, non-mts and ssr).

3. Create a petalinux project from .bsp file:

  • After creating project, please refer to Modifications on top of 2020.1 release BSP

  • As per the TRD flow, by-default NON-MTS bitstream and device-tree are loaded first and thereafter the requested bitstream and respective device-tree. Hence, when building any other design, NON-MTS binaries should always be generated first and kept in SD-Card. Otherwise, it will throw an error.

4. Configure the PetaLinux project using step “a” or “b”.

a) With the pre-built XSA file located in folder <pl/<design_path>pre-built/rfsoc_trd>, depending on the design, user can select the "path".

Make sure the design_path indicates the folder in which the XSA resides.

For Example : If the user wants to build for Non-MTS Design, the design_path would be given as below:

b) If Vivado project is modified/design is changed, user is expected to configure the bsp with the modified XSA file as follows:

After executing step "a" or "b", petalinux menuconfig will be displayed, change the following:

In FPGA Manager :

i. Enable "FPGA Manager".

ii. In "Specify hw directory path", add path to XSA as

$DCET_HOME/pl/<design_path>pre-built/rfsoc_trd/.

iii. Save and Exit.

5. Build all Linux image components along with Evaluation Tool application:

The pl.dtbo gets auto generated inside $DCET_HOME/apu/rfsoc_petalinux_bsp/images/linux folder after Step 5.

6. Create <design_type> sub-directories in the sd-card directory (design_type can be mts, nonmts and ssr).

 7. Navigate to <petalinux-project>/images/linux/ folder. Copy pl.dtbo from this directory (rfsoc_petalinux_bsp/images/linux) to sdcard directory

8. To generate the design-type bitstream for each design, create a new file called bitstream.bif in the same location with the following content:

 9. Create a new file called bitstream.bif in the same location with the following content:

10. Generate bitstream in bin format using the following command:

 11. Copy bitstream to sdcard directory.

 12. Create a boot image (BOOT.BIN) including FSBL, ATF, PMUFW and u-boot:

 13. Copy the BOOT.bin and image.ub to the sdcard:

Modifications on top of 2020.1 released BSP

Below are the modification in this TRD for linux-kernel, rfdc drivers, rftool, rfdc example, trd-autostart applications and device tree on top of 2020.1 petalinux released BSP. For more details on patch information please refer to https://www.xilinx.com/support/answers/75664.html.

  • Kernel patch information as follows:

  • RFTOOL application patch as follows:

  • RFDC example application patch as follows:

  • TRD Autostart patch information as follows:

  • RFDC Self-test application changes as follows:

  • RFDC Read-Write application changes as follows:

  • Device Tree Changes are as follows:

The changes required with respect to pl memory nodes in kernel version 5.4 have been updated in the following path.

The changes required with respect to contiguous memory allocation (CMA size) are updated in the following path.


Once the images are built successfully the user can refer to https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/57606309 for further information on test set-up.

 

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy