This section provides information on the mechanism and infrastructure required to work with custom IPs that have readily (hand-stitched) available dtsi files instead of relying on the DTG to generate them when the FPGA manager is enabled. This generates/packs the dtbo and bin/pdi files into the rootfs /lib/firmware/xilinx directory.
Prerequisites
- dtsi and its corresponding pdi/bit.bin or
- dtbo and its corresponding pdi/bit.bin files
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 zynqmp-dfx --template versal petalinux-create -t project -s <bsp path> -n zynqmp
- 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 FPGA manager
template
Orpetalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtsi can.bit.bin" --enable
Orpetalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtbo can.bit.bin" --enable
Orpetalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtsi can.pdi" --enable
Orpetalinux-create -t apps --template dfx_user_dts -n can-interface --srcuri "can.dtbo can.pdi" --enable
petalinux-create -t apps -template dfx_user_dts -n usrapp -scruri "user.dts user1.dtsi user2.dtsi system.pdi" -enable
- Build the application.
If you want to build as part of rootfs
Orpetalinux-build
petalinux-build -c rootfs
If you want to build only the application.petalinux-build -c can interface
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/can interface/pl.dtbo -b /lib/firmware/xilinx/can interface/design_1_wrapper.bit.bin