SDAA427 July   2026 AFE7900 , AFE7901 , AFE7903 , AFE7906 , AFE7950 , AFE7950-SP , AFE7951 , AFE7953 , AFE7954 , AFE7955 , AFE7958

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Linux Kernel Driver
    1. 2.1 Linux Kernel Driver using PetaLinux Tools
    2. 2.2 Linux Kernel Driver Using Yocto Project
      1. 2.2.1 Overview of the Yocto Project
      2. 2.2.2 Host System Requirements
      3. 2.2.3 Setting Up a Yocto Build Environment
      4. 2.2.4 Configuring Board Specific Layers
      5. 2.2.5 Integrating the AFE79xx Yocto Layer
      6. 2.2.6 Verifying the Integration
      7. 2.2.7 Troubleshooting
    3. 2.3 Preparing Linux Boot Images
    4. 2.4 Operating the AFE79xx Device from User Space
  6. 3Building the AFE79xx SDK in Application Layer
    1. 3.1 Building Linux Kernel Without AFE79xx SDK using PetaLinux Tools
    2. 3.2 Integrating SPI with AFE79xx in User Space
  7. 4Reference Design for ZCU102 FPGA with Processor and SPI
    1. 4.1 Configuring the Zynq Processor
    2. 4.2 Configuring the SPI Interface
    3. 4.3 Generating Hardware Description
    4. 4.4 Booting ZCU102 Board with SD Card
  8. 5Summary
  9. 6References

Configuring Board Specific Layers

Step 1: Download Board-Specific Layers

Every hardware platform requires a corresponding BSP layer that provides the machine configuration, kernel, and bootloader recipes for that board. BSP layers are typically provided by the board or SoC vendor and are cloned separately. Consult your board vendor's documentation to identify the correct BSP layer and branch compatible with your chosen Yocto release.

For Xilinx-based platforms, the relevant layers are meta-xilinx, meta-xilinx-bsp, meta-xilinx-standalone, and meta-xilinx-tools, all available from the Xilinx GitHub repository. For other platforms such as Raspberry Pi, NXP, or Intel, the equivalent vendor-provided BSP layers should be used. We can use git clone for the layers as shown in example below:

Xilinx

 git clone -b langdale https://github.com/Xilinx/meta-xilinx.git
git clone -b langdale https://github.com/Xilinx/meta-xilinx-tools.git

Intel - Altera

git clone https://git.yoctoproject.org/meta-intel-fpga

Additionally, many BSP layers depend on packages from the OpenEmbedded layer collection (meta-openembedded). Clone the appropriate branch of this collection as well:

 git clone -b langdale https://github.com/openembedded/meta-openembedded.git

Step 2 : Adding Layers

Add all required layers to the build using the bitbake-layers command. The exact set of layers depends on the target board. At minimum, the core Poky layers, the board BSP layers, and the AFE79 layer must be present. Only Layer cloned in previous step can be added using the command below:

 bitbake-layers add-layer <Path_to_layer>

For example, on ZCU102 following layers are needed:

 bitbake-layers add-layer ~/yocto-zcu102/meta-xilinx/meta-xilinx-core
 bitbake-layers add-layer ~/yocto-zcu102/meta-xilinx/meta-xilinx-bsp
 bitbake-layers add-layer ~/yocto-zcu102/meta-xilinx/meta-xilinx-standalone
 bitbake-layers add-layer ~/yocto-zcu102/meta-xilinx-tools
 bitbake-layers add-layer ~/yocto-zcu102/meta-openembedded/meta-oe
 bitbake-layers add-layer ~/yocto-zcu102/meta-openembedded/meta-python
 bitbake-layers add-layer ~/yocto-zcu102/meta-openembedded/meta-networking
 bitbake-layers add-layer ~/yocto-zcu102/meta-openembedded/meta-multimedia

Verify that all required layers are active using the command.

 bitbake-layers show-layers

Step 3: Adding hardware Description File and Target Machine

Many Yocto BSP workflows require a hardware description files that captures the complete hardware design of the target platform. Yocto uses hardware description file via local.conf format to automatically generate the correct FSBL, PMU firmware, and device tree for the specific hardware design.

conf/local.conf takes the hardware description file path and machine variables to correctly provide configs for build.

Open the file <project_directory/build_directory>/conf/local.conf in the build directory. and set the MACHINE variable to the identifier corresponding to your target board. This identifier is defined in the board's BSP layer. For example, the ZCU102 board uses the identifier zcu102-zynqmp.

.

Refer to your board's BSP documentation for the correct machine name.

Xilinx uses .XSA file and intel uses SOPC Information File.

For Xilinx:

Place the XSA file in a known location on the host system. The recommended location is within the custom layer:

meta-afe79/recipes-bsp/hdf/files/

Then add the following lines to the <project_directory/build_directory>/conf/local.conf file in the build directory, replacing the path and filename with those of your XSA file and the machine cariable:

MACHINE ??= "zcu102-zynqmp"
HDF_BASE = "file://"
FILESEXTRAPATHS:prepend:pn-external-hdf := "/absolute/path/to/meta-afe79/recipes-bsp/hdf/files:"
XILINX_RELEASE_VERSION = "v2023.2"
PREFERRED_VERSION_external-hdf = "2023.2"
LICENSE_FLAGS_ACCEPTED += "xilinx"
Note:

The XILINX_RELEASE_VERSION must match the Vivado version that generated the XSA file. An XSA generated by Vivado 2023.2 requires XILINX_RELEASE_VERSION = "v2023.2". Using a mismatched version causes the XSCT tool to fail when processing the hardware description.

Configure the hardware handoff path according to the requirements of your specific BSP layer. Refer to the BSP layer README for the correct variable name and path format, as this varies between vendor platform generations.