Software Platform Data Creation

Introduction

The software platform data creation process consists of building software components, such as libraries and header files, boot files, and others, for each supported operating system (OS) running on the Zynq®-7000 All Programmable (AP) SoC or Zynq UltraScale+™ MPSoC device, and generating a software platform metadata XML file (.spfm) that captures how the components are used and where they are located. The platform folder <path_to_platform>/sw contains the software components, while the software platform metadata XML file (.spfm) is found in <path_to_platform>/sw/<platform>.spfm.

This chapter describes required and optional components of a software platform, and assumes the platform creator is able to create these components. For example, if your platform supports Linux, you will need to provide:

  • Boot files - first stage bootloader or FSBL; U-boot; Linux unified boot image image.ub or separate devicetree.dtb, kernel and ramdisk files; boot image file or BIF used to create BOOT.BIN boot files.
  • Optional prebuilt data used by SDSoC when building applications without hardware accelerators, such as a pre-generated hardware bitstream to save time and SDSoC data files.
  • Optional header and library files if the platform provides software libraries.
  • Optional emulation data files, if the platform supports emulation flows using the Vivado Simulator for programmable logic and QEMU for the processing subsystem.

If your platform supports the Xilinx Standalone OS (a bare-metal board support package or BSP), the software components are similar to those for Linux, but the boot files include the FSBL and BIF files.

Tip: Zynq UltraScale+ MPSoC boot files also require ELF files for the Power Management Unit firmware (PMUFW) and ARM Trusted firmware (ATF).

Once you build the software components for a target OS, use the SDSoC Platform Utility to add these components to the platform as described in Creating an SDSoC Platform.

Software Requirements

This section describes requirements for the run-time software component of an SDSoC platform.

The SDx IDE currently supports Linux, standalone (bare metal), and FreeRTOS operating systems running on the Zynq®-7000 AP SoC target, but a platform is not required to support all of them. The SDx IDE supports Linux and standalone (bare-metal) operating systems running on the Zynq UltraScale+™ MPSoC.

When platform peripherals require Linux kernel drivers, you must configure the kernel to include several SDx IDE specific drivers which are available with the linux-xlnx kernel sources in the drivers/staging/apf directory. The base platforms included with the SDx environment provide instructions in README files, for example platforms/zc702/sw/boot/generic.readme.

This linux kernel and the associated device tree are based on the 4.6 version of the linux kernel. To build the kernel:

  1. Clone/pull from the master branch of the Xilinx/linux-xlnx tree at github, and check out the xilinx-v2016.4-sdsoc tag.
    git checkout -b sdsoc_release_tag xilinx-v2017.1-sdsoc
  2. Add the following CONFIG attributes to xilinx_zynq_defconfig and then configure the kernel.
    CONFIG_STAGING=y
    CONFIG_XILINX_APF=y
    CONFIG_XILINX_DMA_APF=y
    CONFIG_DMA_CMA=y
    CONFIG_CMA_SIZE_MBYTES=256
    CONFIG_CROSS_COMPILE="arm-linux-gnueabihf-"
    CONFIG_LOCALVERSION="-xilinx-apf"

    One way to do this is:

    cp arch/arm/configs/xilinx_zynq_defconfig arch/arm/configs/tmp_defconfig
  3. Edit arch/arm/configs/tmp_defconfig using a text editor and add the above config lines to the bottom of the file.
    make ARCH=arm tmp_defconfig
  4. Build the kernel using:
    make ARCH=arm UIMAGE_LOADADDR=0x8000 uImage

By default, the SDSoC system compiler generates an SD card image for booting the platform.

For creating a standalone platform, you must first build the hardware component using the IP Integrator feature of the Vivado Design Suite, and run the hardware export command (write_hwdef) to create the hardware handoff file. Using this newly generated hardware handoff file, use the SDx environment IDE to create a hardware platform project. From this project, you can create a new board support project. The system.mss file, as well as the linker script can now be delivered as part of the platform. Details of this process can be found in SDSoC Platform Examples.