You can build the Zephyr RPU Device Tree with OpenAMP nodes in one flow. You start with the XSA and domain YAML files. You use the Yocto AMD EDF project as the reference flow. The following example shows the EDF BSP all-in-one build flow from XSA and domain YAML to a Zephyr Device Tree:
yocto/edf/build$ gen-machineconf parse-sdt \
--template ../sources/meta-amd-adaptive-socs/meta-amd-adaptive-socs-bsp/conf/machineyaml/versal-2ve-2vm-vek385-revb-sdt-seg.yaml \
-c ../sources/meta-amd-adaptive-socs/meta-amd-adaptive-socs-bsp/conf/
The file versal-2ve-2vm-vek385-revb-sdt-seg.yaml references openamp-overlay-versal-2ve-2vm.yaml in meta-xilinx/meta-xilinx-standalone-sdt.
The domain YAML file openamp-overlay-*.yaml defines the RPU firmware
boot area, the IPC area, and the IPIs that you use. The gen-machineconf
command also generates a Linux bootable device tree in DTS format. That Linux device
tree includes the corresponding reserved memory, mailbox (IPI), and remoteproc node for
ELFLOAD. The flow configures the Linux and RPU device trees by combining the
design-generated SDT with the domain YAML.
You can find the generated Linux and Zephyr RPU device trees here:
yocto/edf/build$ repo status
project sources/meta-amd-adaptive-socs/ (*** NO BRANCH ***)
-m meta-amd-adaptive-socs-bsp/conf/dts/versal-2ve-2vm-vek385-revb-sdt-seg/cortexa78-linux.dts
-m meta-amd-adaptive-socs-bsp/conf/dts/versal-2ve-2vm-vek385-revb-sdt-seg/versal-2ve-2vm-vek385-revb-sdt-seg-cortexr52-0-zephyr.dts