# Installation of Xilinx Alveo U55C on Ubuntu 22.04 ## Table of Content :::warning [toc] ::: ## Environment Ubuntu : 24.04 Vitis : 2024.1 Vivado : 2024.1 Vitis Design Flow : 2024.1 XRT: 2024.1 Motherboard: MSI MS-7D75 Processor: AMD R9-7950x ## Prerequisites 1. Update package list ``` sudo apt update sudo apt upgrade -y ``` 2.Install required dependencies ``` sudo apt install -y dkms libelf-dev build-essential linux-headers-$(uname -r) ``` ## Alveo u55c platform/XRT installation In `Ubuntu 22.04` and `Vitis 2024.1` environment, the required resource can be downloaded through the following links. After downloading and extracting all three files, execute the installation one by one. The downlaod URLs and the installation commands are as follows. ### Download URLs [Package Link](https://www.amd.com/en/support/downloads/alveo-previous-downloads.html/accelerators/alveo/u55c.html#alveotabs-item-vitis-tab) ### Installation Command (Install in order) ``` cd ~/Desktop sudo apt install ./xrt_202410.2.17.319_22.04-amd64-xrt.deb sudo apt install ./xilinx-u55c-gen3x16-xdma-3-202210-1-dev_1-3514517_all.deb sudo apt install ./xilinx-u55c-gen3x16-xdma-validate_3-3506150_all.deb sudo apt install ./xilinx-sc-fw-u55_7.1.23-1.4097d53_all.deb sudo apt install ./xilinx-cmc-u55_1.5.25-3395704_all.deb sudo apt install ./xilinx-u55c-gen3x16-xdma-base_3-3494559_all.deb ``` ### Bash Shell Setting After installing the Vitis tools as mentioned previously, the files will be placed in the `/tools/Xilinx` directory in the root of the Linux system, which is different from the `/opt/Xilinx` directory specified in the documentation. Be sure to pay special attention when verifying the `source` path. ![image](https://hackmd.io/_uploads/SJgORZqyZx.png) ### Install Additional Packages Download `opencl-headers` and `gcc-multilib` for building the project using the following commands: ``` sudo apt install opencl-headers sudo apt install gcc-multilib ``` ## Flashing the Card ### Check current status: use the xbmgmt tool to view the card status. ``` sudo /opt/xilinx/xrt/bin/xbmgmt examine ``` ### Flash the firmware ``` sudo /opt/xilinx/xrt/bin/xbmgmt program --base --device <management BDF> --image xilinx_u55c_gen3x16_xdma_base_3 ``` ### Cold Reboot ``` sudo reboot ``` ## Validation ### Commands for validation ``` source /opt/xilinx/xrt/setup.sh # Set environment variables xbutil examine # Check compute card status xbutil validate # Execute self validation ``` or ### Commands for validation ``` sudo /opt/xilinx/xrt/bin/xbutil examine # Check compute card status sudo /opt/xilinx/xrt/bin/xbutil validate # Execute self validation ``` ## Before modify BIOS, GRUB, Linux HWE kernel setting ![image](https://hackmd.io/_uploads/S1aZv7ie-l.png) The validation will be error in the verify kernel case, need to modify BIOS, GRUB(firmware settings) and downgrade Linux kernel HWE version. ### Linux kernel HWE downgrade Use the following command to install linux kernel 5.15.0-161-generic. ``` sudo apt install linux-generic linux-headers-generic ``` After download the linux kernel `5.15.0-161-generic`, needs to reboot and choose the `Advanced options for Ubuntu` & `Ubuntu, with Linux 5.15.0-161-generic` option to change the linux hardware kernel to `5.15.0-161-generic`(original `6.8`). ### GRUB settings (firmware settings) Use the following command open the nano in terminal to modify GRUB settings. ``` sudo nano /etc/default/grub ``` And the GRUB settings modification is in the following images. ![image](https://hackmd.io/_uploads/HJ-iuQox-e.png) If your processor brand is Intel, the settings of GRUB_CMDLINE_LINUX_DEFAULT `amd_iommu=off` can be replaced by `intel_iommu=off`. After modification of GRUB settings, use `Ctrl+O`and`Enter` to save and `Ctrl+X` to exit. And need to update the GRUB settings and reboot to update the computer by following commands. ``` sudo update-grub sudo reboot ``` ### BIOS settings Motherboard: MSI Processor: AMD For the MSI motherboard, press `Del` to open the BIOS settings. Settings -> Advanced -> PCIe/PCI Sub-system Settings 1. Above 4G Decoding -> Enable 2. Re-Size BAR Support -> Disabled 3. PCI_E1 Gen Switch -> Gen3 OC(Overclocking) -> Advanced CPU Configuration -> AMD CBS -> IOMMU -> Disabled After BIOS setting, press F10 to save and exit ### Reminder After GRUB settings modication and reboot, when the computer is power on and open the GRUB List, needs to reselect the `Advanced options for Ubuntu` & `Ubuntu, with Linux 5.15.0-161-generic` option to change the linux hardware kernel to `5.15.0-161-generic`, or the GRUB will select the previous option your computer opened before. ## After modify BIOS, GRUB, Linux HWE kernel setting ![image](https://hackmd.io/_uploads/ByfER7il-e.png) All task of validation pass!