Adding an HDF to a Xilinx Yocto Layer

Table of Contents


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 which will extract bitstreams, generate DTS and create BSPs for 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.

Releases Supported

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


Creating a Custom Xilinx Yocto Layer

Adding an HDF to Your Yocto Layer

Method 1:  Machine Configuration

One way to manage your HDFs 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. 

Method 2:  HDF Recipe

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 hdf recipe of your layer.

Using a default HDF 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 to import the PCW configuration for the PS.  Xilinx has default HDFs 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 or trick Yocto into using a compatible HDF.  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 HDF.  The bbappend below shows how you could extend the external-hdf recipe to use one of the default HDFs with your custom machine.  Essentially you are creating a link from your machine to the default machine in the working directory.

DSA Format

The meta-xilinx-tools layer also supports the new DSA format.  HDF is the default, so you must be explicit when using the DSA format.

Creating a Custom Xilinx Yocto Layer

Adding a Hardware Platform to a Xilinx Yocto Layer

Xilinx Yocto Builds without an Internet Connection