Prepare Common Image
AMD provides pre-built image Common Image package for quick platform
creation and quick evaluation. The ‘common image’ packages contain a prebuilt Linux
kernel and root file system that can be used with any Zynq™, Zynq™ MP or Versal
board for embedded Vitis platform developers. The common image package has following
images
included:
#Versal
├── bl31.elf
├── boot.scr
├── environment-setup-cortexa72-cortexa53-xilinx-linux
├── Image
├── README.txt
├── rootfs.ext4
├── rootfs.manifest
├── rootfs.tar.gz
├── sdk.sh
├── site-config-cortexa72-cortexa53-xilinx-linux
├── sysroots
├── u-boot.elf
└── version-cortexa72-cortexa53-xilinx-linux
#Zynqmp
├── bl31.elf
├── boot.scr
├── environment-setup-cortexa72-cortexa53-xilinx-linux
├── Image
├── README.txt
├── rootfs.ext4
├── rootfs.manifest
├── rootfs.tar.gz
├── sdk.sh
├── site-config-cortexa72-cortexa53-xilinx-linux
├── sysroots
├── u-boot.elf
└── version-cortexa72-cortexa53-xilinx-linux
Download the AMD common image
from the
AMD
download page,
and use
following command to extract it, and place it in the project
folder.
tar xvf xilinx-zynqmp-common-v2023.2.tar.gz -C . #. means current directory.
Create DTB File
Use the "createdts" command in XSCT tool to generate DTB file. The zocl driver interface requires a device tree node to enable the interrupt connection. Add the -zocl option when using this command. The following code shows the usage of this command with its options.
createdts -hw <full path of XSA file> -zocl -platform-name mydevice -git-branch xlnx_rel_v202X.X -board zcu104-revc -compile
The system.dtb file is located in <mydevice/psu_cortexaXX_0/device_tree_domain/bsp> folder.
-
-name
: Platform name -
-hw
: Hardware XSA file with path -
-git-branch
: device tree branch -
-board
: board name of the device. You can check the board name at /device_tree/data/kernel_dtsi. -
-zocl
: enable the zocl driver support -
-compile
: specify the option to compile the device tree
The following is an example of the zocl device node for your reference.
&amba {
zyxclmm_drm {
compatible = "xlnx,zocl";
status = "okay";
interrupt-parent = <&axi_intc_0>;
interrupts = <0 4>, <1 4>, <2 4>, <3 4>,
<4 4>, <5 4>, <6 4>, <7 4>,
<8 4>, <9 4>, <10 4>, <11 4>,
<12 4>, <13 4>, <14 4>, <15 4>,
<16 4>, <17 4>, <18 4>, <19 4>,
<20 4>, <21 4>, <22 4>, <23 4>,
<24 4>, <25 4>, <26 4>, <27 4>,
<28 4>, <29 4>, <30 4>, <31 4>;
};
};
For more information, refer to the XRT documentation: https://xilinx.github.io/XRT/master/html/yocto.html.