Build the Versal Custom PetaLinux Platform - 2023.2 English

Vitis Tutorials: AI Engine

Document ID
XD100
Release Date
2023-11-29
Version
2023.2 English

Now that we have our customized PetaLinux image, the next step is to create a Versal custom platform with that Linux image. Packaging a platform requires the following software components for EXT4 rootfs:

  • build/vck190_linux/images/linux/linux.bif: Boot image generation description file

  • build/vck190_linux/images/linux/bl31.elf: Component referred to by the linux.bif file in same folder

  • build/vck190_linux/images/linux/u-boot.elf: Component referred to by the linux.bif file in the same folder

  • build/vck190_linux/images/linux/system.dtb: Component referred to by the linux.bif file in the same folder

  • build/image/boot.src - U-Boot configuration file

First, add the BIF file (linux.bif) to the build/vck190_linux/images/linux directory. We have provided one for you to copy. When you open the linux.bif file, the file names should match the contents of the boot directory. They are the source for creating the BOOT.BIN.

cp linux.bif build/vck190_linux/images/linux/linux.bif

Next, prepare the image directory. The contents of this directory are packaged to FAT32 partition by the v++ --package tool. Copy the boot.src script for U-Boot initialization into the image directory.

mkdir build/image
cp build/vck190_linux/images/linux/boot.src build/image/.

Lastly, create the Versal custom PetaLinux platform (.xpfm) using the xsct_create_pfm.tcl script.

xsct xsct_create_pfm.tcl vck190_custom ../Module_04/build/rev1/hw/beamforming.rev1.hw.xsa

This script uses the XSA from Module 04 and the custom Petalinux image to generate a new Versal custom platform (.xpfm) in the build/vck190_custom/ directory. The new XPFM platform is used in the v++ --package step in Module 09 to generate the SD card image.