Dynamic Configuration with User Specified dtsi/dtbo Flow for Zynq/ZynqMP/Versal - 2023.2 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2023-10-18
Version
2023.2 English

This section provides information on the mechanism and infrastructure required to work with custom IPs that have readily (hand-stitched) available dtsi files instead of relying on the DTG to generate them when the FPGA manager is enabled. This generates/packs the dtbo and bin/pdi files into the rootfs /lib/firmware/xilinx directory.

Prerequisites

  • dtsi and its corresponding pdi/bit.bin or
  • dtbo and its corresponding pdi/bit.bin files

Build Steps

  1. Source the PetaLinux tool.
    source /opt/petalinux/petalinux-v<petalinuxversion>/settings.sh
  2. Create a Versal template project or BSP project
    petalinux-create -t project -n zynqmp-dfx --template versal
     petalinux-create -t project -s <bsp path> -n zynqmp
  3. Go to the project
    cd zynqmp-dfx
  4. Configure the project with static.xsa/base.xsa
    petalinux-config --get-hw-description <base.xsa/static.xsa>
  5. Enable FPGA manager using the following command:
     petalinux-config -> FPGA MANAGER
    Note: The PetaLinux FPGA manager configuration performs the following:
    • fpga-overlay Machine features
    • Enables the required kernel configs to load the fpgamanager driver
  6. Create the FPGA manager template
    petalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtsi can.bit.bin" --enable
    Or
    petalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtbo can.bit.bin" --enable
    Or
    petalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtsi can.pdi" --enable
    Or
    petalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtbo can.pdi" --enable
    Or
    petalinux-create -t apps -template dfx_user_dts -n usrapp -scruri "user.dts user1.dtsi user2.dtsi system.pdi" -enable
  7. Build the application.

    If you want to build as part of rootfs

     petalinux-build 
    Or
    petalinux-build -c rootfs
    If you want to build only the application.
    petalinux-build -c can interface

Boot Steps

Up the target with previously built images using any of the boot methods in the documentation. Once the target is up, run the following commands.

fpgautil -o /lib/firmware/can interface/pl.dtbo -b /lib/firmware/xilinx/can interface/design_1_wrapper.bit.bin