The FPGA manager provides an interface to Linux for reconfiguring the programmable region. It packs the dtbos and bitstreams/pdi files into the /lib/firmware/xilinx directory in the root file system.
This section helps to build and boot PL applications with DFX design for the Versal platform.
Note: If DFX applications (rm.xsa) have any memory-mapped PL
IPs, only then use fpgamanager_dtg_dfx template. If not, you can use --template install
to pack only pdi as part of rootfs.
Prerequisites
- Versal static design(static xsa) contains static pdi which includes Versal cips + NOC + DDR + PL(static PL + empty RP regions)
- Versal reconfigurable module design(rm.xsa) which includes pdi with ips that we want to program
- You can have more than one rm xsa file
Build Steps
- Source the PetaLinux
tool.
source /opt/petalinux/petalinux-v<petalinuxversion>/settings.sh
- Create a Versal template project or BSP
project
petalinux-create -t project -n versal-dfx --template versal petalinux-create -t project -s <bsp path> -n versal-dfx
- Go to the
project
cd versal-dfx
- Configure the project with static.xsa/base.xsa if you have
created the project using the template
flow
petalinux-config --get-hw-description <base.xsa/static.xsa>
- Enable FPGA manager using the following
command:
petalinux-config -> FPGA MANAGER
Note: The PetaLinux FPGA manager configuration performs the following:- fpga-overlay Machine features
- Enables the required kernel configs to load the fpgamanager driver
- Create the static application using the following command from static
xsa
petalinux-create -t apps --template dfx_dtg_versal_static -n <static-app> --enable --srcuri "<static xsa>"
The previous command creates and packages the static dtbo and pdi files into the rootfs (/lib/firmware/xilinx/) using dfx_dtg_versal_static template.
- Create the partial application to configure the partial region using the rm xsa
in the following command. You should point static pl app name as
--static-pn
command line option to define the relation between base and partial.
This command generates and packages the rm dtbo, pdi files into the rootfs (/lib/ firmware/xilinx/<static-app>/<rm-app>).petalinux-create -t apps --template dfx_dtg_versal_partial -n <rm-app> -- enable --srcuri <rm.xsa>" --static-pn <static-app>
- To build the application, use the following command. The following command
generates the rootfs containing both static and rprm dtbos, and respective pdi
files.
To build only the applicationpetalinux-build or petalinux-build -c rootfs
In <TMPDIR>/deploy/rpm you can see <static-app>.rpm and <rm-app>.rpmpetalinux-build -c <static-app> petalinux-build -c <rm-app>
Note: The pdi's in the design should have i*_partial.pdi in the xsa files to avoid an error.Note: In the DFX use case, you can use the static xsa to create the Versal boot firmware images so static pdi is packaged as a part of BOOT.BIN.
Boot Steps
Up the target with previously built images using any of the boot methods in the documentation. Once the target is up, run the following commands.
fpgautil -o /lib/firmware/xilinx/<static-app>/<static-app>.dtbo
fpgautil -b /lib/firmware/xilinx/<staticapp>/rp0/<rprm-app>/<rprm-app>.pdi -o /lib/firmware/xilinx/<staticapp>/rp0/<rprm-app>/<rprm-app>.dtbo -f Partial -n PR0