Introduction - 2024.2 English - UG1647

Porting Guide for embeddedsw Components System Device Tree Based Build Flow (UG1647)

Document ID
UG1647
Release Date
2024-11-27
Version
2024.2 English

The legacy methodology of building AMD embeddedsw components takes .xsa as a handoff file from the hardware persona and uses mdd, mld, and mss files for different software configurations. This makes the legacy approach dependent on AMD proprietary tools such as the software command-line tool (XSCT) and hardware software interface (HSI). Without these proprietary tools, the embeddedsw components cannot be compiled using the legacy approach.

The new system device tree based flow aims to avoid such dependencies by embracing open-source industry standards. It uses the system device tree, CMAKE, and a Python-based open source tool named Lopper to organize the required build system.

The system device tree is a superset of a regular Linux device tree. Unlike a regular Linux device tree which represents hardware information required for Linux/APU only, a system device tree represents the complete hardware information in device tree format, thus creating opportunities to work with more use cases. It contains information about all the processors such as the platform management controller (PMC), PS management controller (PSM), real-time processing unit (RPU), application processing unit (APU), and all peripherals in the system. To generate a system device tree, see Generating a System Device Tree Using XSCT.

The system device tree based flow uses Lopper to extract the required hardware metadata from the system device tree. Software configurations that were earlier done using mld/mss files in the legacy approach are now replaced with the CMAKE-based infrastructure where the CMAKE variables are set to generate the required headers. In the legacy flow, component specific information were stored in mdd/mld/mss files but in the new flow, they are stored in a YAML file. Python scripts read these YAML files, configure the component's sources using Lopper and CMAKE commands, and populate the standalone BSP specific data, accordingly. Thus, the whole build system replaces the usage of proprietary AMD files and tools with the available open-source infrastructure.

Porting existing embeddedsw standalone and RTOS components is necessary to ensure legacy software components work seamlessly in this system device tree based flow. The following sections explain the steps and changes required to port a legacy embeddedsw driver/library/application to the new system device tree based flow.