Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
maxLevel3
excludeTable of Contents

Introduction

Generally Yocto BSP support targets ASSP devices where the hardware itself is fixed.  Devices such as Zynq and Zynq Ultrascale+, which also include a programmable fabric, require additional support to describe the custom IP that the developer has designed for the fabric.  The meta-xilinx-tools layer provides the recipes to parse an HDF a hardware platform specification file which will generate DTS, extract bitstreams, generate DTS and create BSPs for build low level boot targets.  The typical way to add this was to simply put add the HDF/DSA in your local.conf.  This however, has limitations when managing multiple machines or can clutter your local.conf.  This wiki shows two alternative methods to manage your HDFs.objects and package the boot objects with bootgen.

Releases Supported

Xilinx Yocto (Rocko 2.4) rel-v2018.1 and later (Rocko 2.4)

Prerequisites

Creating a Custom Xilinx Yocto Layer

Adding

...

a Hardware Platform to Your Yocto Layer

...

Local.conf

Add your hardware platform directly to your local.conf.

example-zcu102-zynqmp.conf
Code Block
languagebash
HDF_BASE = "file://"
HDF_PATH = "/path-to/design_1_wrapper.xsa"


Info

You may want to use machine overrides in your local.conf if you have multiple hardware archive files targeting different machines.

Machine Configuration Method

One way to manage your HDFs hardware platforms is to add them to a machine configuration.  In order to do this you need to add a PN override for the external-hdf recipe.  This method binds the hardware with a machine in the machine configuration.  The example below uses a local hardware repository external to Yocto. 

...

...

example-zcu102-zynqmp.conf
Code Block
languagebash
require conf/machine/zcu102-zynqmp.conf

HDF_BASE_pn-external-hdf = "file://"
HDF_PATH_pn-external-hdf = "/path-to/Basedesign_Zynq_MPSoC1_wrapper.hdfxsa"

Bbappend Method

...

Another way to manage your HDFs is to add them to a bbappend for the external-hdf recipe.  In order to manage multiple hardware designs and multiple machines, you can add the machine override to the HDF_BASE and HDF_PATH variables.  This way you can use your layer as the repository for your hardware designs.  In the example below, you can export all your hardware designs to the files directory in the external-hdf recipe bbappend of your layer.

Version 2021 and earlier

external-hdf.bbappend
Code Block
title
languagebash
themeMidnight
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

HDF_BASE_example-zcu102-zynqmp = "file://"
HDF_PATH_example-zcu102-zynqmp = "design_1_wrapper.xsa"

Version 2022 and later

external-hdf.bbappend
Code Block
languagebash
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

HDF_BASE_:example-zcu102-zynqmp = "file://"
HDF_PATH_:example-zcu102-zynqmp = "Basedesign_Zynq_MPSoC1_wrapper.hdfxsa"

Using a default

...

Hardware Platform with a Custom Machine

If you are a software developer, you may not care about the actual bitstream to get started working with software on an evaluation platform such as the ZCU102.  However, you still need a base HDF hardware platform to import the PCW configuration for the PS.  Xilinx has default HDFs platforms for each platform on GitHub, but those only match the default machine name.  If you are working with a custom machine configuration, you need to either use a local HDF hardware platform or trick Yocto into using a compatible HDFplatform.  For instance you could chose a naming convention that incorporates the default machine you are targeting, e.g. example-zcu102-zynmp.conf.  From this name you can extract the default HDFplatform.  The bbappend below shows how you could extend the external-hdf recipe to use one of the default HDFs platforms with your custom machine.  Essentially you are creating a link from your machine to the default machine in the working directory.

external-hdf.bbappend
Code Block
title
languagebash
themeMidnight
external-hdf.bbappend
# attempt to determine a base machine assuming "<prefix><project>-<board>-<arch>"
# example: "myproj-zcu102-zynqmp" could use "zcu102-zynqmp" HDFplatform from GitHub

MACHINE_BASE = "${@'-'.join(MACHINE.rsplit('-')[-2:])}"

do_deploy_prepend() {
        if [ "${MACHINE_BASE}" != "${MACHINE}" ] &&
           [ -d ${WORKDIR}/git/${MACHINE_BASE} ]; then
                ln -sf ${MACHINE_BASE} ${WORKDIR}/git/${MACHINE}
        fi
}

DSA Format

...

Legacy Formats

example-zcu102-zynqmp.conf | local.conf
Code Block
languagebash
themeMidnight
titleexample-zcu102-zynqmp.conf
HDF_EXT_pn-external-hdf = "dsa"
Code Block
languagebash
themeMidnight
titleexternal-hdf.bbappend
xdf"
HDF_EXT_example-zcu102-zynqmp = "dsa"

Creating a Custom Xilinx Yocto Layer

Adding an HDF a Hardware Platform to a Xilinx Yocto Layer

Xilinx Yocto Builds without an Internet Connection