![]() Kria™ KV260 Vision AI Starter Kit Tutorial |
Generation of Firmware binaries |
Generation of Firmware binaries¶
Testing custom Accelerator/firmware binaries¶
Customers requiring to test custom hardware/accelerator can do so by following the below steps on the ubuntu platform.
It is assumed that a custom platform design has been generated using Vivado/Vitis and bitstream/xclbin is available. Similarly a correct device-tree overlay for the custom hardware is created or generated, Xilinx DTG could be used for device-tree generation. Refer to the link for more info on DTG.
From previous steps, following binaries are available:
custom-hardware.bit (obtained by Vivado or Vitis)
custom-metadata.xclbin (obtained by Vitis) (optional)
custom-devicetree.dtsi (obtained by DTG or hand written)
On ubuntu platform the bitstream header is stripped to obtain fpga configuration data as a bin object (*.bin). The metadata xclbin is consumed as is from Vitis. A runtime devicetree blob corresponding to the PL bitstream is required (.dtbo) to be loaded as an overlay, which when loaded in kernel invokes all the drivers corresponding to the PL bitstream.
A makefile is provided to generate the required firmware binaries and install. This makefile take the above binaries and provides the following outputs as shown below. The artifacts of the makefile are installed on the target device at /lib/firmware/xilinx/< accelerator-dir >. The firmware is loaded at runtime using xmutil.
custom-hardware.bit -> custom-hardware.bin
custom-devicetree.dtsi -> custom-devicetree.dtbo
An example has been illustrated below for reference:
git clone --branch xlnx_rel_v2022.1 https://github.com/Xilinx/kria-apps-firmware.git
cd kria-apps-firmware
mkdir -p kv260/custom
mv custom-hardware.bit custom-metadata.xclbin custom-devicetree.dtsi kv260/custom
cp kv260/smartcam/shell.json kv260/custom
make
Note: The above make command will build all firmware artifacts available in the repository. The output products will be available in the kv260/custom folder. The shell.json file is copied form an existing example as is.
For more info refer to the instructions provided in the readme file here