Kria™ Booting Kria Starter Kit Linux |
Booting Kria Starter Kit Linux on KR260¶
Introduction¶
This document shows how to boot AMD Kria™ Starter Kit Linux on KR260 and perform common one-time updates and installations required prior to running any AMD released KR260 application in Linux.
This guide is targeted for Ubuntu 22.04 and Xilinx 2022.1 toolchain.
Boot Process¶
Flash the Kria Starter Kit Linux image into the SD Card (minimum 16GB).
Refer to the KR260 Getting Started Page to flash SD card with an Ubuntu 22.04 image.
You can reuse the same SD card to evaluate all the applications released for Ubuntu 22.04.
Set up the hardware. Each application requires a different set of peripherals, below lists the minimum required to boot Linux.
microSD:
Insert the SD card into slot at J11.
Monitor:
Connect the monitor to the board via either DP port on J6. Refer to each application documentation for monitor resolution requirement.
UART/JTAG interface:
For interacting and seeing boot-time information, connect a USB debugger to J4. Some applications only run through commands issued through UART interface.
Network connection:
Connect the Ethernet cable from J10C or J10D to your local network with DHCP enabled to install Linux packages. Image recovery app and some applications (such as 10GigE Vision Camera) requires J10C.
Ensure that the Starter Kit Boot firmware is up to date.
The SOM Starter Kits have factory pre-programmed boot firmware that is installed and maintained in the SOM QSPI device. Update the boot firmware in the SOM QSPI device to ‘2022.1 Boot FW’ Image.
See the Kria Wiki to obtain boot firmware binary and instructions to update QSPI image using xmutil, after Linux boot.
QSPI image update persists through power cycles or SD card changes.
Boot Linux on your Starter Kit (Ubuntu) following the instruction from this page.
For some applications, it is required to work with commandline instead of GNOME Desktop.
If not done so yet, perform system update to pull in the latest kernel and AMD packages. There might be some errors during installation. Refer to known issues if you encounter issues. In this step we manually add the AMD-specific Ubuntu PPAs, and then perform a system update and upgrade to pull in the latest Xilinx libraries. The apt upgrade step might take some time.
sudo add-apt-repository ppa:xilinx-apps --yes && sudo add-apt-repository ppa:ubuntu-xilinx/sdk --yes && sudo add-apt-repository ppa:xilinx-apps/xilinx-drivers --yes && sudo apt update --yes && sudo apt upgrade --yes
Note: if the kernel was updated, make sure to follow the apt upgrade instruction (and command such as
sudo reboot
) to reboot the platform to boot with the latest kernel.Some KR260 Ubuntu 22.04 applications are deployed as Docker containers. Follow instructions from docker.com to install Docker.
Enable the user to properly use the Docker commands without using sudo for every docker command.
sudo groupadd docker sudo usermod -a -G docker $USER
This is only needed to be done once if re-using the same SD card for running multiple applications.
Install the latest xrt zocl driver:
sudo apt install xrt-dkms
This flow is only needed to be done once if re-using the same SD card for multiple applications. However, you can choose to update and upgrade again to install newly available updates that are made available later.
Known issues¶
Sometimes, Ubuntu has a background process ongoing by the time it boots to command prompt and does not yet ask you to change the password. In such cases, doing a snap install might result in a message like following:
error: too early for operation, device not yet seeded or device model not acknowledged
Try again in a minute or two and you should be prompted to update password and above error should disappear.
If a prompt like the following appears:
Choose “keep the local version currently installed.” For more details, refer to this wiki page.
During
sudo xlnx-config.sysinit
orsudo apt upgrade
commands, you might see the following errors and exit installation. Rerun the commands and installation should continue and complete.flash-kernel: deferring update (trigger activated) /etc/kernel/postinst.d/zz-flash-kernel: flash-kernel: deferring update (trigger activated) Errors were encountered while processing: flash-kernel need restart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
Misc Information¶
The ubuntu user does not have root privileges. Most commands used in tutorials must be run using sudo, and it may be prompted to enter your password.
For security, by default, the root user is disabled. If you want to login as a root user, perform the following steps. Use the ubuntu user’s password on the first password prompt, then set a new password for the root user. You can now login as a root user using the newly set root user password.
ubuntu@kria:\~\$ sudo -i
sudo\] password for ubuntu:
root@kria:\~#
If needed, the following are commands to set System Timezone and locale:
Set timezone
sudo timedatectl set-ntp true
sudo timedatectl set-timezone America/Los_Angeles
timedatectl
Set locale
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale
The following example command sets the date and time.
sudo date --set "11 January 2023 16:47:00"
The storage volume on the SD card can be limited with multiple dockers. If there are space issues, use the following command to remove the existing container.
sudo docker rmi --force $INSTALLED_DOCKER_IMAGE
License¶
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright© 2023 Advanced Micro Devices, Inc.