Download Versal common image from Xilinx website download page, place it under your
WorkSpace
directory, and extract the common image.tar xvf ../xilinx-versal-common-v2023.1.tar.gz .
Create the device tree file Device tree describes the hardware components of the system.
createdts
command can generate the device tree file according to the hardware configurations from XSA file. If there are any settings not available in XSA, for example, any driver nodes that do not have corresponding hardware, or the user has their own design hardware, the user needs to add customization settings insystem-user.dtsi
.Besides, uboot in common image does not have default environment variables. So update the bootargs manually. A pre-prepared system-user.dtsi file, which adds pre-defined bootargs is under
ref_files
directory. Copysystem-user.dtsi
toWorkSpace
directory and follow below steps to generate the DTB file.cd WorkSpace source <Vitis_Install_Directory>/settings64.sh xsct
Then execute
createdts
command in XSCT console like the following:createdts -hw <full path>/vck190_custom_hw.xsa -out . -zocl \ -platform-name mydevice -git-branch xlnx_rel_v2023.1 -board versal-vck190-reva-x-ebm-02-reva -dtsi system-user.dtsi -compile
Notice that
-hw
option is your XSA file generated in step1 located in your Vivado Project directory namedvck190_custom_hw.xsa
. Besides, the following information would show in XSCT console. Ignore the following warning and that means you succeed to get system.dtb file, which is located inmydevice/psv_cortexa72_0/device_tree_domain/bsp/
.pl.dtsi:9.21-46.4: Warning (unit_address_vs_reg): /amba_pl@0: node has a unit name, but no reg property pl.dtsi:41.26-45.5: Warning (simple_bus_reg): /amba_pl@0/misc_clk_0: missing or empty reg/ranges property
Type
exit
in console to exit XSCT console.Create Vitis platform
Create two directories under
WorkSpace
directory for FAT32 partition and boot components. Then prepare images like the following:cd WorkSpace mkdir sd_dir mkdir boot cp xilinx-versal-common-v2023.1/boot.scr sd_dir/ cp xilinx-versal-common-v2023.1/bl31.elf boot/ cp xilinx-versal-common-v2023.1/u-boot.elf boot/ cp mydevice/psv_cortexa72_0/device_tree_domain/bsp/system.dtb boot/
Install SDK tool by typing
sh xilinx-versal-common-v2023.1/sdk.sh -d xilinx-versal-common-v2023.1/ -y
in console. Option of -d is to specify the directory where to install. Option of -y means confirmation. So it gets installed inxilinx-versal-common-v2023.1/
folder.Run Vitis by typing
vitis --new -w .
in the console. -w is to specify the workspace.In the Vitis IDE, select File > New Component > Platform to create a platform component.
Enter the Component name. For this example, type
vck190_custom
, click Next.In the XSA selecting page, click Browse button, select the XSA file generated by the Vivado. In this case, it is located in
Your Vivado Project Directory>/vck190_custom.xsa
. Click Next.Set the operating system to linux and set the processor to psv_cortexa72. Click Next.
Review the summary and click Finish.
Click the linux On psv_cortexa72 domain.
Update the Display Name to
xrt
by clicking the entry bar and inputting the name. It is indicated that this is a Linux domain has XRT installed and can run acceleration applications.Set Bif file: Click the button as shown in the following diagram and generate BIF file. The BIF file is generated in the resource directory.
Boot Components Directory: Browse to boot and click OK. Bootgen looks for boot components referred by BIF in this directory to generate
BOOT.BIN
.FAT32 Partition Directory: Browse to sd_dir and click OK. Files in this directory are copied to FAT32 partition of SD card.
QEMU Data: Browse to boot/ and click OK. Emulator will use boot components from this directory.
In the Flow view window, click the drop-down button to select the component. In this case, select vck190_custom component and click the Build button to generate the platform.
Note: If there are additional QEMU settings, update
qemu_args.txt
accordingly.After this step2, the platform creation process is completed. Next, run an application to validate this platform.