If you are just starting with this Board, you will stumble over this starting guide

The guide is fine and will teach you two important things. First, Ubuntu 22.04 Image is the newest and second, to use the new Image you have to update your firmware.

But how to update your firmware will not be shown. You will find the “Kria KV260 Vision AI Starter Kit User Guide (UG1089)” via a short google search. In this user guide, the method is described to update the firmware, but where to find the current firmware as binary isn’t stated.

When you find this Wiki, you are on the right track.

Upgrading Firmware

  1. Download 20.04 or Petalinux (links below or in the confluence)
  2. Starting 20.04 and download firmware
  3. Installing firmware with ubuntu 20.04
  4. Download 22.02 and start the Kit

Download ubuntu 20.04

You can either use ubuntu 20.04 or the latest petalinux . I used BlendaEtcher to flash ubuntu 20.04 to the SD Card.

Start up the Board like a Raspberry Pi. In my case, I only connected the board to power an ethernet. SSH access was enabled by default. I could connect with the following statement. After first login I had to change my password.

$ssh ubuntu@<IP> 

To download the newest Firmware, you can run this command

$wget https://www.xilinx.com/member/forms/download/design-license-xef.html?filename=BOOT-k26-starter-kit-20230516185703.bin -O BOOT-k26-starter-kit-20230516185703.bin 

Installing new Firmware

I will copy the guide 1:1 here. For the latest updates, see here

  1. Download the boot firmware update from the table above. It should be a Xilinx BOOT.BIN file.
  2. Move the BOOT.BIN file to the SOM Starter Kit target using FTP (or similar method). Note when copying file remotely you must copy it to the petalinux user directory.
  3. Execute the A/B update process through these steps
    1. Execute “sudo xmutil bootfw_update -i <path to boot.bin>”.
    2. The tool returns the image (A or B) that is updated, and is marked for boot on the next boot.
    3. You can verify the updated status of the boot firmware using the sudo xmutil bootfw_status utility.
  4. After the image write is completed issue a power-on reset. This can be accomplished by pressing the RESET push-button or power cycling the board.
  5. After restart it is required by the user verify that Linux fully boots with the new boot FW to verify functionality. This is completed by executing “sudo xmutil bootfw_update -v to validate successful boot against the new firmware. Note this must be completed on the platform restart immediately following the update, else the platform will fall back to the other boot partition on the next restart.

Unfortunately, I did the upgrade without taking screenshots. So you have to experience my trouble a little bit.

DPU test with smart vision A.I.

I’m testing the DPU with the smart vision example from Xilinx. Here again, this tutorial would not work for me.

But a combination from the “Booting Kria Starter Kit LInux” and “Setting up the Board and Application Deployment” does the trick.

Set up your environment

# Install xlnx-config for an easy setup 
$sudo snap install xlnx-config --classic --channel=2.x

# Add Xillinx Repos to you apt manager 
$sudo xlnx-config.sysinit

# Install Docker (docker.com) 
# Add GPG Key 
$sudo install -m 0755 -d /etc/apt/keyrings
$curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
$sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add Repo 
$echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

#Install docker 
$sudo apt-get update

$sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Make Docker usable without sudo 
$sudo groupadd docker
$sudo usermod -a -G docker  $USER

# INstall xrt zocl driver 
$sudo apt install xrt-dkms

Start Testapp

Great! Now we can start our first app. I looked up a face, on the Internet and downloaded the file to the Kira-Board. Place the file in the location /tmp/image.jpg

docker run \
--env="DISPLAY" \
-h "xlnx-docker" \
--env="XDG_SESSION_TYPE" \
--net=host \
--privileged \
-v /tmp:/tmp \
-v /dev:/dev \
-v /sys:/sys \
-v /etc/vart.conf:/etc/vart.conf \
-v /lib/firmware/xilinx:/lib/firmware/xilinx \
-v /run:/run \
-it xilinx/nlp-smartvision:2022.1 bash

In the docker container, we can now execute the command to detect a face with the smart vision AI.

root@xlnx-docker:/tmp/test# nlp-smartvision  \ 
  --test \
image_640_360.jpeg \ 
densebox_640_360

Please note that this command is executed in the folder where I mounted the Image.

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0711 18:24:12.024806    26 process_result_facedetect.hpp:29]  1.00044 0.395312 0.202778 0.203125 0.5

For a better visualization, I drew the rect into the Image I used. The first of the five values is used for the label. One is a face. The second and third values are the x and y cords. The fourth and fifth values are the wide and the bright of the box

I think, this was straightforward for a DPU test 🙂

If you have any questions that this post not answers, leave a comment. I’ll add the missing Information to this post