Getting Started with Certified Ubuntu 20.04 LTS for Xilinx Devices
The Xilinx Certified Ubuntu 20.04 LTS for Xilinx Devices image is an official Ubuntu image with certified hardware support for select Xilinx evaluation boards. This page details how to boot and use the official desktop environment image released by Canonical for Xilinx ZCU102, ZCU104, and ZCU106 evaluation boards as well as the Kria KV260 Starter Kit. You can read more and download the certified Ubuntu hardware here.
For the 22.04 Jammy Jellyfish release, please refer to the 22.04 getting started page: Getting Started with Certified Ubuntu 22.04 LTS for Xilinx Devices
Table of Contents
- 1 Hardware and Software Requirements
- 2 Installing the Image
- 3 First Boot and Getting Started
- 4 Set up the Xilinx Development & Demonstration Environment for Ubuntu 20.04 LTS
- 5 Overview of the Out-of-the-Box Demos
- 6 Creating a Custom Hardware Platform
- 7 Getting Help
- 8 Resources & References
- 8.1 General Unsupported Usage Exceptions
- 8.2 Changing the Kernel bootargs Used By U-Boot
- 8.2.1 Example bootargs lines
- 8.3 Installing & Using the Xilinx PPA
- 8.4 Pre-Installed Packages
- 8.5 Checking the Xilinx Kernel Configuration
- 8.6 Special Considerations for the ZCU104 Evaluation Board
- 8.7 Special Considerations for the Kria KV260 Vision AI Starter Kit
- 8.8 DisplayPort to HDMI Adapters
- 9 Related Links
Hardware and Software Requirements
| SD Card | Networking | USB Peripherals | Miscellaneous |
---|---|---|---|---|
ZCU102 (Rev 1.0+) | 8GB+ SD Card | Wired Ethernet cable (100Mbps+) required to download updates and additional reference designs | Micro USB-A to USB-A Adapter, (Optional) USB hub for peripherals (ex: keyboard, mouse) | A DisplayPort cable and monitor may be used for a graphical desktop experience. Else, connect via USB UART terminal or SSH. If DisplayPort Monitor is not available, please see the DisplayPort to HDMI Adapters section below for compatible adapters. |
ZCU104 (Rev 1.0+) | 8GB+ Micro SD Card | (Optional) USB hub for peripherals (ex: keyboard, mouse) | ||
ZCU106 (Rev 1.0+) | 8GB+ SD Card | |||
Kria KV260 Starter Kit | 8GB+ Micro SD Card |
Note: The ZCU104 & ZCU106 VCU ROI TRD demonstrations additionally require the following accessories: HDMI monitor, HDMI source device (ex: DVD player), and HDMI cables. HDMI is not used on the ZCU102 design.
Installing the Image
Once you have downloaded the Certified Ubuntu for Xilinx Devices image fromInstall Ubuntu on AMD | Ubuntu , you can write it to your SD card using any disk writing tool such as Balena Etcher, Win32 Disk Imager, or dd
.
The screenshots below show how to write the disk image with Win32 Disk Imager.
For Linux & Mac Users, you can follow the instructions here: https://ubuntu.com/download/iot/installation-media
After opening Win32 Disk Imager, ensure the correct SD card drive is selected in (1) and then used the folder button (2) to locate the disk image.
The final disk image name may be different for you. Make sure that you are using the disk image that you downloaded.
After selecting the disk image, click the Write button to write the disk image to the SD card. The process will take approximately 10 minutes depending on the speed of your SD card and card reader.
First Boot and Getting Started
Before powering on the board, make sure all of the cables and peripherals are attached. At a minimum, attach the following:
Power Adapter
USB UART cable
(Micro) SD Card
For the best experience, additionally connect the following:
DisplayPort or HDMI Monitor
USB Keyboard & Mouse (may be attached via USB hub)
Ethernet networking (with Internet access)
For detailed information about preparing each of three evaluation boards for booting from the SD card, please refer to the following links:
ZCU102: Vitis-AI/dsa/DPU-TRD/prj/Vitis at v1.3.2 · Xilinx/Vitis-AI
ZCU104: Zynq UltraScale+ MPSoC ZCU104 VCU HDMI ROI 2020.2 | 1.5 Board Setup
ZCU106: Zynq UltraScale+ MPSoC ZCU106 VCU HDMI ROI TRD 2020.2 | 1.5 Board Setup
Kria KV260 Starter Kit: Getting Started with Kria KV260 Starter Kit, Step 3: Connecting Everything
For general information about how the boot process works for the ZCU10x image, please refer to Booting Certified Ubuntu for Xilinx Devices. For information on how the boot process works for the Kria KV260 Starter Kit, please refer to the Kria K26 SOM wiki page.
Logging in via the Terminal
If you choose to boot without the optional accessories, you can monitor the boot process via the USB UART terminal output. Once you see the zynqmp login:
prompt you can log into the system.
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.
Logging in via the Graphical Desktop
If you are using the graphical interface via a monitor, the login process is similar:
The Ubuntu Desktop configuration used for this image is ubuntu-desktop-minimal
. This configuration does not include Ubuntu Software by default. While you can always install Debian packages and snaps from the command line, if you would like to install the Ubuntu Software application, you can run the following command in a terminal:
sudo snap install snap-store
Network Setup
If your network is configured with a DHCP server, the Certified Ubuntu for Xilinx Devices system will automatically obtain an IP address. If a static address is required, you can use the ip
command from the command line to configure the network interface. For more information, please see Configuring networks | Ubuntu
If you are using the Gnome 3 graphical interface, you can configure networking via the Network Settings options in the GUI.
Set up the Xilinx Development & Demonstration Environment for Ubuntu 20.04 LTS
Before diving into the demos, the Certified Ubuntu on Xilinx Devices environment needs to have some additional resources downloaded and installed. The primary utility for switching between configurations and managing the system is called xlnx-config
. The xlnx-config
utility is deployed as a snap and which is available from the Canonical Snap store (http://snapcraft.io).
For more information about using xlnx-config
, please refer to the xlnx-config wiki page.
Install the custom Xilinx
gstreamer
For ZCU104 & ZCU106 users, download a Vitis AI Model
To install the xlnx-config
snap, execute the following command from a terminal:
$ sudo snap install xlnx-config --classic --channel=1.x |
The heart of the ZCU10x demonstration experience is the Xilinx Deep Learning Processing Unit (DPU). In addition to setting up the system, the xlnx-config
snap provides the DPU via dpu.xclbin
to other snaps that depend on it. The xlnx-config
snap also provides infrastructure which allows users to package up other hardware platforms to enable other custom development and demonstration workflows. For more information about creating and installing custom platforms via xlnx-config
, see the Usage Example section on the xlnx-config developer page.
After installing the xlnx-config snap, you can use it to set up the remainder of the system by executing the following command in a terminal:
$ xlnx-config.sysinit
xlnx-config.sysinit
takes care of the following items, depending on the system it's run on:
Install the Custom Xilinx gstreamer
By default, the Ubuntu 20.04 LTS root filesystem includes the open source upstream version of gstreamer
that is packaged with Ubuntu 20.04 LTS. In order to take advantage of the unique features provided by Xilinx multimedia IP, xlnx-config.sysinit
installs a customized Xilinx-specific version of gstreamer
with specialized extensions and plugins.
Download a Vitis AI Model (ZCU104 and ZCU106 Only)
During xlnx-config.sysinit
, the densebox_640_360
model is downloaded from the Xilinx Model Zoo to facilitate running of the VCU ROI TRD Demo on ZCU10x platforms.
Overview of the Out-of-the-Box Demos
Each ZCU10x evaluation board boot image contains a default bitstream & device tree combination that is configured during the first boot. Each ZCU10x platform includes the Xilinx Deep Learning Processing Unit (DPU) in the Zynq UltraScale+ Programmable Logic (PL). These platforms also include a software stack (XRT + Vitis AI) required to take advantage of it. The Kria KV260 Starter Kit includes a series of Vitis platforms to support various accelerated applications (AAs). All of the out-of-the-box images are based on Xilinx 2020.2 (2020.2.2 for Kria) tools, IP, drivers, and firmware.
The default platforms for the three boards are:
Evaluation Board | Reference Hardware Platform |
---|---|
ZCU102 | |
ZCU104 | |
ZCU106 | |
Kria KV260 Starter Kit |
Running the ZCU10x DPU Demos
Each of the Out-of-the-Box demo designs includes the Xilinx DPU for machine learning inference. The ZCU104 & ZCU106 designs include a 4096x1 configuration. The ZCU102 includes 4096x3 configuration. Each DPU configuration has an identical feature set and they are compatible with the pre-built models in the Xilinx Model Zoo that target the ZCU10x boards.
Running the Vitis AI Library Samples Snap
The xlnx-vai-lib-samples
snap includes a pre-built subset of the Vitis AI Library sample applications available as source in the Vitis AI Github repository. After installing the snap, users can experiment with twenty-seven different Vitis AI samples and over 90 different pre-built models. For users on the ZCU10x platforms, this is all you need to do. Users on the Kria KV260 Starter Kit will require a compatible bitstream. The xlnx-nlp-smartvision snap includes a bitstream that is compatible with the xlnx-vai-lib-samples application.
For more information regarding using the xlnx-vai-lib-samples
snap, please visit the xlnx-vail-lib-samples developer page.
Building the Vitis AI Library Sample Applications from Source
For users that would like to build the Vitis AI Library sample applications from source on the target, please visit the Building Vitis-AI Sample Applications on Certified Ubuntu 20.04 LTS for Xilinx Devices page for detailed steps.
Using the ZCU104 & ZCU106 VCU Region of Interest (ROI) TRD Demo
The primary goal of the VCU ROI design is to demonstrate the use of the Xilinx Deep learning Processor Unit (DPU) block for extracting the Region of Interest (ROI) data from input video frames. This information is then used to perform ROI-based encoding using the Video Codec Unit (VCU) encoder hard block present in Zynq UltraScale+ EV devices.
For instruction for running the VCU ROI TRD Demo on the supported platforms, please visit the Running the VCU ROI Demo on Certified Ubuntu 20.04 LTS for Xilinx Devices page for detailed steps.
Running the Kria KV260 Demos
The NLP SmartVision accelerated application is available as an Ubuntu snap. For more information, see the NLP SmartVision Snap wiki page.
Creating a Custom Hardware Platform
For the ZCU10x boards, users can replace the out-of-box hardware platform with customized versions. The xlnx-config snap helps facilitate switching between platforms.
For more information on how to package your custom boot assets into a Platform Assets Container (PAC) that xlnx-config can consume,, please refer to the xlnx-config Usage Example for ZCU10x.
Getting Help
Xilinx recommends posting on the Xilinx Embedded Linux Forum for any questions related to the Certified Ubuntu 20.04 LTS on Xilinx Devices release.
Resources & References
This section outlines how to begin extending your usage beyond the initial Getting Started instructions.
For even more tips and tricks, see the Tips & Tricks page.
General Unsupported Usage Exceptions
The following configurations and use models are not supported:
Portrait mode is unsupported
Wake on USB (eg, pressing a key on a keyboard or clicking a button on a mouse) is not supported
Changing the Kernel bootargs
Used By U-Boot
If your application or configuration requires specific arguments you can configure U-Boot to pass these arguments automatically.
Example bootargs
lines
To update only the CMA value (256M in this case, 1000M is the default):
To update only the root filesystem location:
To update multiple arguments (CMA and root filesystem location):
After updating the Linux kernel boot arguments, be sure to update the U-Boot configuration so that these arguments are passed to the Linux kernel on the next reboot
Remember to reboot the system for the changes to take place.
Installing & Using the Xilinx PPA
Xilinx has a Personal Package Archive (PPA) hosted by Canonical Launchpad at updates (deprecated) : “Ubuntu Xilinx” team . This PPA contains packages for some Xilinx-specific binaries that are not available in other upstream repositories. The standard method for installing PPA’s in Ubuntu desktop environment is documented here. To install the PPA via the command line, issue the following commands:
Xilinx updates the packages in the PPA from time to time. You can view the current list of packages in the archive by issuing the following command:
Pre-Installed Packages
The Certified Ubuntu on Xilinx Devices release contains some pre-installed packages. The default list of packages (and their versions) is described in the table below.
Package Name | Version | Description & Notes |
---|---|---|
|
| Xilinx BootGen tool used for creating bootable images |
|
| Libraries and tools required to use the FPGA Manager framework on Xilinx platforms |
|
| libEGL libraries for the Mali GPU |
|
| Firmware required for the VCU operation |
|
| Xilinx U-Boot bootloader - u-boot-zynqmp |
|
| Vitis AI libraries & Vitis AI DNNDK legacy libraries |
|
| Open source driver for Arm GPU from the Endless OS Foundation xf86-video-armsoc repository. |
|
| Applications for encoding & decoding video streams ( |
|
| OMX decoder and encoder tools ( |
|
| Boot assets (bitstream, firmware, bootloaders, dtb, etc.) |
|
| Libraries required to support XRT on Arm platforms |
|
| Ubuntu meta-package for support of the Certified Ubuntu on Xilinx Devices image on Kria platforms |
|
| Xilinx support for FPGA Manager in the Linux kernel |
|
| Kria SOM device tree and device tree overlays |
Checking the Xilinx Kernel Configuration
If you would like to check the configuration of the current Ubuntu kernel, you can find the file in /proc/config.gz
. You can output the contents of this file using the zgrep command:
Special Considerations for the ZCU104 Evaluation Board
The ZCU104 evaluation board has less physical memory than the other supported boards. This difference means that resolutions higher than 1080p are not supported on the GNOME Desktop. Switching to a resolution lower than 1080p (e.g. 1280x720) can create a more responsive desktop experience. Full-screen video playback on the desktop should also be avoided to reduce the chance of running into out-of-memory performance issues.
Here are some recommendations for using the ZCU104 with this release:
Before running
xlnx-config.sysinit
from the Gnome Desktop:Ensure that nothing else is running in the background.
Change the desktop resolution to 1280x720.
Do not update the desktop background
If you want the best desktop experience but are not interested in using the VCU, you can reduce the amount of contiguous memory(CMA) that is allocated by changing the kernel bootargs. 256M is recommended. Please refer to the Changing the Kernel bootargs Used By U-Boot section.
If the desktop gets into an unstable state, you can try restarting it from the console with the following command:
If you’re working from the serial port console or through ssh, you can shutdown the desktop to maximize available memory:
Special Considerations for the Kria KV260 Vision AI Starter Kit
COMING SOON!
DisplayPort to HDMI Adapters
Historically, DisplayPort to HDMI adapters have been problematic when used with the ZCU10x boards. However, there are some that work consistently. The table below lists ones that are known to work as well as some that did not work.