Published On: November, 14, 2023 By: Eshtaartha Basu | Updated: November 7, 2024 by Neeraj Dantu
This tutorial will walk you through the steps required to generate Acceleration Ready Petalinux Software Components with Vitis-AI 2.0 and Xilinx Real Time (XRT) support. We will be using the OSDZU3-REF Petalinux BSP as an example starting point.
This tutorial can be used standalone or as Part 2 of a 4-part Acceleration tutorial series that will help you run Vitis-AI DPU-TRD based Face Detection demo, ADAS Detection demo (and other AI demos) on the OSDZU3-REF board. An overview of the flow is shown below:
This tutorial assumes the user is already familiar with the OSDZU3-REF Vivado and Vitis Design Flow by going through:
The user has already gone through Part 1 of this Tutorial series and has generated OSDZU3-REF_Accl_Platform.xsa file.
To make the existing OSDZU3-REF Petalinux BSP Acceleration Ready, the user needs to:
This tutorial will require the following software setup.
This section will describe the steps required to create a new Petalinux project using OSDZU3-REF Petalinux BSP.
mkdir petalinux cd petalinux
source <your_petaLinux_install_dir>/settings.sh
petalinux-create -t project -n osdzu3-ref_accl_platform -s <path_to_osdzu3-ref-2021.2.bsp>
petalinux-config --get-hw-description=<path_to_your_acceleration_ready_vivado_xsa_file>
petalinux-config --get-hw-description= ~/Downloads/osdzu3_sip-master_latest/osdzu3_sip-master/Vv_21_2/OSDZU3_Ref_Design/Vivado/ OSDZU3-REF_Accl_Platform.xsa
nano project-spec/meta-user/conf/user-rootfsconfig
# base XRT support: CONFIG_xrt # Packages for easy system management CONFIG_dnf CONFIG_e2fsprogs-resize2fs CONFIG_parted CONFIG_resize-part # Packages for Vitis-AI dependencies support: CONFIG_packagegroup-petalinux-vitisai #Packages for natively building Vitis AI applications on target board: CONFIG_packagegroup-petalinux-self-hosted CONFIG_cmake CONFIG_packagegroup-petalinux-vitisai-dev CONFIG_xrt-dev CONFIG_opencl-clhpp-dev CONFIG_opencl-headers-dev CONFIG_packagegroup-petalinux-opencv CONFIG_packagegroup-petalinux-opencv-dev # Packages for running Vitis-AI demo applications with GUI CONFIG_mesa-megadriver CONFIG_packagegroup-petalinux-x11 CONFIG_packagegroup-petalinux-v4lutils CONFIG_packagegroup-petalinux-matchbox # To install Vitis AI 2.0, VART 2.0 and dependent packages into rootfs CONFIG_vitis-ai-library CONFIG_vitis-ai-library-dev CONFIG_vitis-ai-library-dbg
Vitis-AI applications may use remote display feature to show machine learning results over SSH. To improve the remote display experience, replace the default Dropbear SSH with OpenSSH. OpenSSH has the potential for up to 4x faster data transmission.
Make Petalinux generate EXT4 Rootfs:
petalinux-config
/dev/mmcblk1p2
Make Petalinux use EXT4 Rootfs during boot:
petalinux-config
earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk1p2 rw rootwait cma=512M
clk_ignore_unused: it tells Linux kernel not to turn off unused clocks. This is useful to keep clocks that only drive PL kernels ON because PL kernels are not represented in device tree.
Make Petalinux generate .EXT4 Root FS image output
petalinux-config
During debugging, especially over JTAG, the hardware server on the Host machine talks to the processor regularly. If CPU idles during debugging, the system will hang due to incomplete AXI transactions. Therefore, it is beneficial to disable CPU IDLE during project development. It can be re-enabled in the final product.
Set sdhc1 to low-speed mode by adding the following lines to <your_petalinux_project_dir>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi:
&sdhci1 { no-1-8-v; disable-wp; };
petalinux-build
petalinux-build --sdk
From Petalinux project root,
petalinux-package --boot --u-boot --fpga --force
petalinux-package --wic --wks support/sd-boot.wks
Continue the OSDZU3 Acceleration journey and generate an Acceleration Ready Vitis Platform by reading Part 3 of the 4-part Acceleration Tutorial.
Get notified of updates to this Application Note and all of our Technical Documentation.
"*" indicates required fields
Revision Number | Revision Date | Changes | Author |
1 | 11/13/2023 | Initial Revision | Eshtaartha Basu |
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields