Skip to content

How to Set Up the Kria KV260 Vision AI Starter Kit on Ubuntu Flow and Setting Up the Smart Camera Application #2024 #Familiarisation

The Kria KV260 Vision AI Starter Kit by Xilinx is a powerful tool for developing AI and vision applications. In this guide, I’ll walk you through the steps to set up the Kria KV260 as a fresh start and then I’ll guide you to tune it up for the Smart Camera Application.

Section 1: Set Up the Kria KV260 Vision AI Starter Kit on Ubuntu Flow

There are two methods to get started with the KV260: Ubuntu Flow (new method) and PetaLinux Flow (old method). In this guide, I focus on the new method, Ubuntu Flow.

  1. Ubuntu Flow
  2. PetaLinux Flow

Step 1. Setting up the SD Card Image (Ubuntu Flow)

The Starter Kit has a primary and secondary boot device, isolating the boot firmware from the run-time OS and application. This allows you to focus on developing and updating your application code within the application image on the secondary boot device, without having to touch the boot firmware. The primary boot device is a QSPI memory located on the SOM, which is pre-programmed (pre-loaded QSPI image) at the factory.  The secondary boot device is a microSD card interface on the carrier card.

For setting up the microSD card, you’ll need to download the latest SD card image and then write it using an Image Flashing tool.

  1. Download the Kria™ KV260 Vision AI Starter Kit Image and save it on your computer.
  2. Download the Balena Etcher  (recommended; available for Window, Linux, and macOS). Find additional OS-specific tool options below.
  3. Follow the instructions in the tool and select the downloaded image to flash onto your microSD card.

Step 2. Connecting Everything  (Ubuntu)

The following are the key connections for the AMD Kria™ KV260 Vision AI Starter Kit:

  1. Insert the microSD card containing the boot image in the microSD card slot (J11) on the Starter Kit.
  2. Get your USB-A to micro-B cable (a.k.a. micro-USB cable), which supports data transfer.* Do not connect the USB-A end to your computer yet. Connect the micro-B end to J4 on the Starter Kit.
  3. Connect the IAS Camera Module to J7 (or the USB camera module to U44 or U46).
  4. Connect to a monitor/display with the help of a DisplayPort™/HDMI cable.
  5. Connect the Ethernet cable for required internet access.
  6. Grab the Power Supply and connect it to the DC Jack (J12) on the Starter Kit. Do not insert the other end to the AC plug yet.

Step 3. Booting your Starter Kit  (Ubuntu)

When using the KV260 Ubuntu image, in addition to logging in using the traditional way over the serial port, there is also a full GNOME Desktop available. To take advantage of the GNOME Desktop, use the “Instructions for GNOME Desktop” section below.  This will require a keyboard, mouse, and monitor to be connected. 

Instructions for GNOME Desktop

To log in to the GNOME Desktop, you must connect a DisplayPort or HDMI monitor as well as a USB Keyboard and Mouse.

Power ON the Starter Kit by connecting the power supply to the AC plug. The power LEDs should illuminate, and after about 10-15 seconds, you should see console output on the connected display.  After about a minute, the desktop login screen should appear as pictured below:

Please note that the Starter Kit powers up immediately as you connect the AC plug to a wall. (There’s no ON/OFF switch on the board.)

If you see the heartbeat LED is active but there’s no output on the monitor, check your monitor to ensure that it’s powered on and the correct input is selected.

The default login credentials are:
username: ubuntu
password: ubuntu

The standard system policy requires you to change the password after the first time you log in with the default credentials.

Note: If you log in very quickly on the first boot, you may find that the password does not have to be changed. In this case, you will be required to update it the next time you log in or use sudo.

Once logged in, you should see the default Ubuntu 22.04 LTS GNOME 3 desktop.

Open a terminal and verify internet connectivity via “ping” or “DNS lookup.

ping 8.8.8.8


To stop a continuous ping command on most operating systems, you typically just need to press Ctrl + C (hold down the Control key and press C). 

If you can observe that packet transmit/receive worked and there is no packet loss with the above ping command, this means your Internet connectivity is working and active.

Please note: Without Internet connectivity, you will not be able to perform the ROS 2 Perception Node application steps or install the necessary tools & packages.

Set up the Xilinx Development & Demonstration Environment for Ubuntu 22.04 LTS 

Install the xlnx-config snap that is required for system management:

sudo snap install xlnx-config --classic --channel=2.x

For more information on using the xlnx-config snap, please refer to the xlnx-config snap page

Run the xlnx-config sysinit command to install a custom Xilinx version of Gstreamer – accept all defaults: : 

xlnx-config.sysinit

After this command, you can see a screen like this, multiple installations will occur and it takes about 20 minutes.

During the installation process, you may encounter several popup boxes. In my case, I pressed “Enter” for all default selections, such as “Keep local files…”.

Section 2: Setting Up the Smart Camera Accelerated Application

I follow the official documentation for the “Smart Camera accelerated application” here. You can access that page at – https://xilinx.github.io/kria-apps-docs/kv260/2022.1/build/html/docs/smartcamera/smartcamera_landing.html

The Smart camera implements face detection with network and display functionality. It comes with built-in machine learning for applications such as pedestrian detection, face detection, and people counting with local display and RTSP streaming.

Here are the steps I followed:

1. Search for the package feed for packages compatible with the KV260.

ubuntu@kria:~$ sudo apt search xlnx-firmware-kv260

2. Install the firmware binaries.

sudo apt install xlnx-firmware-kv260-smartcam

3. Load the application package

sudo xmutil unloadapp
sudo xmutil loadapp kv260-smartcam

4. Get the root permissions

sudo -i

5. Pull Smart Camera to Docker

docker pull xilinx/smartcam:2022.1 

After entering this command, you will need to install Docker. Follow the instructions in the terminal to complete the installation. Once Docker is installed, re-enter the command. During this process, your screen should look like the screenshot below:

6. Launch the Docker using the following command:

docker run \
--env="DISPLAY" \
-h "xlnx-docker" \
--env="XDG_SESSION_TYPE" \
--net=host \
--privileged \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
-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/smartcam:2022.1 bash

It will launch the smartcam image in a new container.

7. Navigate to the kv260-smartcam Directory

cd /opt/xilinx/kv260-smartcam/bin

8. Execute the script to start the RTSP stream:

./01.mipi-rtsp.sh 

9. Open VLC player and type:

rtsp://172.17.0.1:554/test or rtsp://192.168.8.157:554/test

Here is the final video output displayed through VLC:

Leave a Reply

Your email address will not be published. Required fields are marked *