The FPGA manager provides an interface to Linux for reconfiguring the programmable region later. It packs the dtbos and bitstreams files into the /lib/firmware/xilinx directory in the root file system.
This section helps to build and boot DFX design for the ZynqMP 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
dfx_user_dts
install to pack only pdi as part of rootfs.Prerequisites
- ZynqMP static design(static xsa) contains static bitream which includes static PL IPs and reprogrammable regions
- ZynqMP reconfigurable module design(rm.xsa) which includes bitstream with ips that you want to program
- You can have more than one rm xsa files
Build Steps
- Source the PetaLinux
tool.
source /opt/petalinux/petalinux-v<petalinuxversion>/settings.sh
- Create a ZynqMP template project or BSP
project
petalinux-create project -n zynqmp-dfx --template zynqmp petalinux-create project -s <bsp path> -n zynqmp-dfx
- Go to the
project
cd zynqmp-dfx
- Configure the project with static.xsa/base.xsa
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 apps --template dfx_dtg_zynqmp_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_zynqmp_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 apps --template dfx_dtg_zynqmp_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.
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