This post we’ll go through the steps for updating the boot firmware of your Kria SoM. I describe how I updated my Kria SoM boot firmware on the KV260 starter kit. If you are unaware Ubuntu 22.04 is NOT compatible with the Boot Firmware that comes installed on the KV260 SoM.
Introduction
The Kria Starter Kits use a two stage boot process. The primary boot firmware is pre-installed at the factory on the QSPI device. The secondary boot device is an SD card containing the Linux kernel and Linux root filesystem (rootfs). The Starter Kit pre-built FW and SW are aligned with their specific Starter Kits. When using pre-built applications from the Xilinx App Store you need to ensure to align your Starter Kit Linux version with the target application's assumed Linux version. The K26 based Starter Kits are supported with Ubuntu Desktop 22.04 and the K24 Starter Kits are supported with Ubuntu Server 22.04. The configurations between the two Ubuntu OS are primarily the same with the primary functional difference being the inclusion of the desktop GUI.
There is a Warning that appears at the bottom of the page Step 3. Booting your Starter Kit (Ubuntu), in the KRIA Getting started docs pages.. The Warning, Basically states that you need to ensure compatibility with the SOM BOOT Firmware and the version of Ubuntu you will install.
Another Warning is given in the wiki page Ubuntu Desktop LTS: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1641152513/Kria+SOMs+Starter+Kits#Ubuntu-Desktop-LTS
Gives another warning and known limitations that:
- “KV260: Legacy boot FW (2021.1) will not boot the Ubuntu 22.04 image. Upgrade to 2022.1 Boot FW prior to loading Ubuntu 22.04 image”
- Kira Starter Kit users of Ubuntu 22.04 LTS should update their boot FW to the recommended version in the table below to ensure full platform functionality.
- Legacy KV260 kits REQUIRE the 2022.1 boot FW update prior to booting Ubuntu 22.04. Update should be completed with your current Linux image or via the Boot Image Recovery tool.
2022.1 Boot FW Update
So you need the 2022.1 Firmware Update. Here are the main features of the update:
- 2022.1 Boot FW Update compatible with Ubuntu 22.04
- Unified FW for KV260 and KR260 Starter Kits. Addresses KR260 USB2.0 interfaces on U46 connector stack. Addresses KR260 PS Ethernet functionality on J10C physical interface. Fixes Linux WOL functionality for KR260 SGMII interface. Workaround for vai-lab chipset based USB hub.
- Supports KV260, KR260 starter kits.
- Xilinx download - 2022.1_update3_BOOT.BIN
What to do next
SO what do you do to install or update to Ubuntu 22.04 LTS on a SOM with Boot Firmware 2021.1? The next sections will describe How I upgraded my KV260 starter kit.
Boot Image Recovery Tool
If you do not have not booted up the SOM with a a compatible Ubuntu version on your sim then you need to use this tool to put the proper image on the SOM, Otherwise proceed to the next steps.
What do you do if you need to update the BOOT Firmware before installing Ubuntu version like 22.04? You can use this tool described at this link:
To reset the board to factory settings they can use the “Boot Image Recovery Tool '' which is a stand alone, ethernet-based application for manually loading and configuring content of both A and B boot partitions.
Use Ubuntu 20.04 image to Update the Kria Firmware.
If you already have this image booting your SOM, then the following sections will describe how to upgrade both Boot firmware and Upgrade to Umbuntu 22.04.
TO UPDATE THE KRIA Firmware TO 2022.1, use the following steps.
- Get the file 2022.1_update3_BOOT.BIN
- Rename the file to BOOT.BIN
- Check the current firmware that we have on our Kria SoM:
- sudo xlnx-config --xmutil bootfw_status
- Now use xmutil to update the firmware on our Kria SoM:
- sudo xlnx-config --xmutil bootfw_update -i BOOT.BIN
- Press the RESTART button
- Log back into Ubuntu an run this command to confirm that the new firmware resulted in a successful Linux boot:
- sudo xlnx-config --xmutil bootfw_update -v
- Finally we can check to see that we are now booting from the other partition (in my case, B). Note that the version displayed has not changed since we did the update, but that’s normal, this is the factory installed version and it will not change when you update the boot partitions.
- sudo xlnx-config --xmutil bootfw_status
xmutil <Utility Name>
Use the xmutil cmd to execute the following utilities
sudo xlnx-config --For example: $ sudo xlnx-config --xmutil boardid
Utility Name |
Description |
xmutil boardid |
Reads all board EEPROM contents. Prints information summary to command line interface. |
xmutil bootfw_status |
Read primary boot device information. Prints A/B status information, image IDs, and checksums to the command line interface. |
xmutil bootfw_update |
Tool for updating the primary boot device with a new boot image in the inactive partition. |
xmutil getpkgs |
Queries Xilinx package feeds and provides a summary to the debug interface of relevant packages for the active platform based on board ID information.NOTE: This functionality is not supported in Kria Ubuntu. |
xmutil listapps |
Queries on the target hardware resource manager daemon of pre-built applications that are available on the platform and provides a summary to the debug interface. |
xmutil loadapp |
Loads the integrated HW+SW application inclusive of the bitstream, and starts the corresponding pre-built application software executable. |
xmutil unloadapp |
Removes accelerated application inclusive of unloading its bitstream. |
xmutil xlnx_platformstats |
Reads and prints a summary of the following performance related information: CPU frequency, RAM usage, temperature, and power information. |
xmutil ddrqos |
Utility for changing configuration of PS DDR quality of service (QoS) settings. Initial implementation focuses on PS DDR memory controller traffic class configuration. |
xmutil axiqos |
Utility for changing configuration of PS/PL AXI interface quality of service (QoS) settings. Initial implementation focuses on AXI port read/write priority configurations. |
xmutil pwrctl |
Utility for PL power control and status |
xmutil desktop_disable |
Disables the desktop environment NOTE: This functionality is not supported in Kria Ubuntu Server. |
xmutil desktop_enable |
Enables the desktop environment NOTE: This functionality is not supported in Kria Ubuntu Server. |
xmutil dp_bind |
Binds the display driver |
xmutil dp_unbind |
Unbinds the display driver |
INSTALL Ubuntu 22.04
And Verify we can boot Ubuntu 22.04
Now that we have the right boot firmware on the Kria SoM, Download Ubuntu for Kria and make sure you pick version 22.04 Extract and write the image to an SD card (I’m using a new SD card so I can Have a 64GB 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.
NOTE: If using a sd card that has been used on a windows PC with a SD card slot for extra disk space, Make sure it is ejected before removing it….. You can eject it on File manager by a right mouse click over the drive letter and select “Eject”
I was receiving an error that Etcher Could not flash the device until I finally figured this out.
- Download the Kria Ubuntu Desktop 22.04 LTS Image and save it on your computer.
- Download the Balena Etcher ( available for Window)
- Follow the instructions in the tool and select the downloaded image to flash onto your microSD card.
When flashing is complete,plug the SD card into the Kria and power it up.
Now verify that you can boot up Ubuntu 22.04 on the Kria KV260 Vision AI Starter Kit by updating the boot firmware in the Kria SoM. At this point we have updated the firmware and confirmed that it was successful.
EVERYTHING IS WORKING. 01/18/2024
I now have a new Ubuntu 22.04 on a 128GB sd Card.
On to the next instructions
Update the system and install the Xilinx snap
As with any fresh Linux install, we want to start by updating the system. Unlike in the last post, I didn’t have to disable unattended-upgrades to run these commands. Perhaps it’s a difference with Ubuntu 22.04 or perhaps I just gave Kria more time to empty the update queue.
- DONE Open a terminal (Ctrl-Alt-T) and run these commands:
sudo apt update
sudo apt -f install
sudo apt full-upgrade
At the end of the updates, I got this message saying that a new kernel was available and that a reboot was required. I closed everything down and power cycled the board.
- DONE Now we can install the xlnx-config snap (note that we use the 2.x channel this time):
sudo snap install xlnx-config --classic --channel=2.x
- DONE Then we run the xlnx-config.sysinit command:
sudo xlnx-config.sysinit
You will have to answer “Yes” to a lot of questions after running that command.
At the end of that, I got this message asking which services should be restarted. I just left the default selection and pressed OK. Eventually it completed, leaving me with the screen below.
Conclusion
If all is well you will now be:
- Booting the SoM 2022.1. Firmware from the other partition B instead of A
- Running Ubuntu 22.04 from the SIM card.