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

Building Linux Kernel Without AFE79xx SDK using PetaLinux Tools

This section describes building a standard Linux kernel for the ZCU102 board without AFE79xx driver integration, establishing the base system for the user-space driver approach. Since the AFE79xx SDK will be compiled and deployed as a user-space application in subsequent sections, the kernel build does not require custom driver modifications or AFE79xx-specific configuration. The resulting kernel image includes only the generic SPI device driver (spidev) and standard ZCU102 board support, providing the foundation upon which the user-space AFE79xx SDK will operate. This approach simplifies kernel management and allows the AFE79xx driver to be developed, updated, and deployed independently of the kernel.

The AFE79xx SDK needs a SPI interface to communicate with the device. Section 5 describes reference design for adding processor and SPI to ZCU102 FPGA. We can follow exactly to generate the .xsa and .bit.

Follow the steps below to build kernel without AFE79xx driver. This includes only SPI needed for AFE79xx configuration:

Step 1: On the Linux terminal , create a petaLinux project by running command

 petalinux-create -t project -n <Project_Name> -s <path to BSP>

Step 2: Change directory into the project folder <Project_Name> and run command

 petalinux-config –get-hw-description <path to XSA>

Step 3: Configure kernel using command

 petalinux-config -c kernel

The configuration menu will open. Navigate 'Device drivers' -> 'SPI support' and enable options Cadence SPI, Xilinx SPI, Xilinx Zynq QSPI and User mode SPI device driver.

 Kernle Config Menu Figure 3-1 Kernle Config Menu

Step 4: configure Root file system using command

 petalinux-config -c rootfs

This will open the RootFs configuration menu. To enable GCC compiler navigate to 'Filesystem packages' -> 'misc' -> 'packagegroup-core-buildessential' under this select 'packagegroup-core-buidessential' and 'packagegroup-core-buidessential-dev'

 RootFs Config Menu for Build DependenciesFigure 3-2 RootFs Config Menu for Build Dependencies

Step 5: The device tree must be updated to declare the AFE79xx device on the SPI bus, enabling the kernel to recognize and initialize the hardware. The system-user.dtsi file is used for custom device tree modifications in PetaLinux projects.

Go to device tree, add SPI to device tree by editing the system-user.dtsi file in path

 <Project_Name>/project-spec/meta-user/recipes-bsp/device-tree/files/

In device tree add entries for SPI slaves as shown below:

 Example Device TreeFigure 3-3 Example Device Tree

This will create a device in /dev by the name "/dev/spidev1.0" after bootup.

Step 6: Build your project using command:

 petalinux-build

This process may take 30-60 minutes depending on your host system performance.

Step 7: Package the file using

 petalinux-package --boot --fsbl < Project_Name >/images/linux/zynqmp_fsbl.elf --fpga <path to bit file> --u-boot –force

After successfully build, we should have all files needed for section 4.2. we can follow section 4.2 exactly to partition the SD card, copy the boot images and root filesystem to the appropriate partitions, and prepare the bootable media.