Download the latest PetaLinux from the Xilinx download page: link
Navigate to the downloads folder and install using the executable installer file:
$ cd Downloads
Allow permissions for the installer and run the executable:
$ sudo chmod +x ./petalinux-v2021.1-final-installer.run
$ ./petalinux-v2021.1-final-installer.run -d <install destination>
Download KV260 BSPDownload the KV260 BSP from the Xilinx Downloads page: link
Source the settings.sh file inside of the install directory for PetaLinux:
$ source <install destination>/setting.sh
Create the PetaLinux project from the BSPRun the following command to create the project using the BSP file we downloaded earlier:
$ petalinux-create -t project -s /home/<user>/Downloads/xilinx-k26-starterkit-v2021.1-final.bsp -n kv260_RealSense
Once created step into the folder:
$ cd kv260_RealSense
Set Board VariantSo PetaLinux knows we're using the starter kit we need to set the variable using this command:
$ echo 'BOARD_VARIANT = "kv"' >> project-spec/meta-user/conf/petalinuxbsp.conf
Download Vitis Meta Layergit clone https://github.com/Xilinx/meta-vitis-ai.git -b rel-v2021.1
Add Vitis Meta Layer to Project$ petalinux-config --> yocto settings --> user layer
Add Path to "meta-vitis-ai"
Add Vitis Meta Layer to user packages$ echo "CONFIG_packagegroup-petalinux-vitisai" >> project-spec/meta-user/conf/user-rootfsconfig
Enable package in rootfs$ petalinux-config -c rootfs
user packages --> packagegroup-petalinux-vitisai
$ nano components/yocto/layers/meta-petalinux/recipes-core/packagegroups/packagegroup-petalinux-vitisai.bb
Navigate to petalinuxbsp.conf
Make sure the your file is identical to the one shown:
Run the following command to run the PetaLinux build process:
$ petalinux-build
Package up the PetaLinux filesCreate the SD card image with this command:
$ petalinux-package --wic --bootfiles "ramdisk.cpio.gz.u-boot boot.scr Image system.dtb"
The generated image file will be located at images/linux/petalinux-sdimage.wic.
Comments