It's that time of year again! AMD has released the next version of their FPGA development tools, Vivado, Vitis, and PetaLinux. This marks the second version release of the new Vitis Unified IDE that centralizes more development functionality into a single IDE compared to its predecessor, Vitis Classic IDE.
And as always, I'm here to navigate the installation process for Vivado, Vitis, and PetaLinux on Ubuntu early to hopefully save others time and a potential headache (I make no promises though).
The 2024.1 release officially marks the end of support for Ubuntu 18.04, as the oldest supported Ubuntu release is now 20.04.4 LTS. The latest Ubuntu release officially supported is 22.04.3 LTS; however, I have never had compatibility issues with using later minor versions of Ubuntu than what is officially supported. I installed and have been using 2024.1 on Ubuntu 22.04.4 at the time of writing this, and all has been well so far. If anyone comes across an issue with this though, please let me know in the comments below.
Linux Environment PrepI always want these installation to be as complete as possible, so the following steps for Linux environment prep are not necessary if a 2023.2 or later version of Vivado/Vitis has previously been installed on the Ubuntu host PC.
However, like I mentioned in my 2023.2 installation tutorial I discovered some new dependencies for 2023.2 compared to 2023.1. So you have a 2023.1 or earlier version of Vivado/Vitis installed, you can skip to the package dependency step of this section.
This section is written to ensure all necessary dependencies are met for Vivado, Vitis, and PetaLinux even for a completely fresh install of Ubuntu straight from the ISO image.
I've refined these environment prep with each version of Vitis/Vivado since I switched to Ubuntu as my host OS (which started with 2017.2) so the order of the following steps is relevant, as well as how I've broken up the dependencies across multiple apt install commands.
First thing is to change the system shell from dash to bash:
~$ sudo dpkg-reconfigure dash
Then add the 32-bit architecture:
~$ sudo dpkg --add-architecture i386
Next, add the user to the dial out group so Vitis/Vivado can access the USB ports of the machine (this step is critical if using Ubuntu in a VM or on a computer not "officially" supported by Ubuntu):
~$ sudo adduser $USER dialout
Finally, install the following package dependencies:
~$ sudo apt-get install gparted xinetd gawk gcc net-tools ncurses-dev openssl libssl-dev flex bison xterm autoconf libtool texinfo zlib1g-dev
~$ sudo apt-get install iproute2 make libncurses5-dev tftpd libselinux1 wget diffstat chrpath socat tar unzip gzip python tofrodos lsb libftdi1 libftdi1-2
~$ sudo apt-get install lib32stdc++6 libgtk2.0-0:i386 libfontconfig1:i386 libx11-6:i386 libxext6:i386 libxrender1:i386 libsm6:i386 tree openssh-server
~$ sudo apt-get install debianutils iputils-ping libegl1-mesa libsdl1.2-dev pylint3 python3 cpio tftpd-hpa gnupg zlib1g:i386 haveged perl xvfb
~$ sudo apt-get install gcc-multilib build-essential automake screen putty pax g++ python3-pip xz-utils python3-git python3-jinja2 python3-pexpect
~$ sudo apt-get install liberror-perl mtd-utils xtrans-dev libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev
~$ sudo apt-get install util-linux sysvinit-utils cython google-perftools patch diffutils ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev
~$ sudo apt-get install libncurses5 libncurses5-dev libncursesw5:amd64 libncursesw5-dev libncurses5:i386 libtinfo5 libstdc++6:i386 libgtk2.0-0:i386 dpkg-dev:i386
And finish everything up by running an update and upgrade for good measure:
~$ sudo apt update
~$ sudo apt upgrade
Download InstallerWith the Ubuntu host OS prepped and ready to go, download the Vitis/Vivado installer from AMD's website here.
I did just want to point out for those that are newer to AMD FPGA tools, that Vitis and Vivado are installed using the same installer. So the links to download the installer under both the Vivado (HW Developer) tab and Vitis (SW Developer) tab link to the same installer.
There are three different options for installers: two web installers (one for Windows and one for Linux) and a single-file download (SFD) installer.
While AMD strongly recommends the web installers to save hard drive space, I've found that the SFD is the way to go for a couple of reasons. (and honestly, if you don't have enough hard drive space to use the SFD then you won't have enough space to create more than a couple of projects).
The first reason I think the SFD is better is that a slow/choppy internet connection can throw the web installer into an endless error loop. I think this is because the timeout period in the web installer is shorter than in a standard web browser, so the single compressed file download is more forgiving to internet connection issues.
The other reason is that I've found the web installer simply doesn't get along with most company firewalls. So to my industry friends reading this: the SFD is your only option. Don't waste your time on the phone with IT.
Vitis+Vivado InstallOnce the installer has been downloaded, extract it within the Downloads folder (if you need to save hard drive space, you can delete the compressed SFD after extracting it).
While I did cover this in the package dependencies above, just to be sure I didn't miss anything with this new version I always like to run the installLibs.sh script in the top level of the SFD installer directory:
~$ cd ./Downloads/FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023/
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023$ sudo ./installLibs.sh
The script will check for all dependencies and skip over any of the ones that it finds are already installed (aka running this script won't hurt anything even if everything is already installed).
Then the script will output a handy log file back into the top level of the SFD installer directory to help with troubleshooting in the event that something goes wrong:
Run the installer xsetup:
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023$ sudo ./xsetup
The welcome screen repeats the same installation requirements found in UG973, as well as a warning to disable any firewall to help speed up installation. I've found that the firewall doesn't really impact the SFD installer so this note is geared towards the web installer.
Like I previously mentioned, Vitis and Vivado are installed using the same installer. And while individual tools in the AMD FPGA tool set can be selected for installation, the option for Vitis in the installer is the superset that will tell the installer to install everything (minus PetaLinux). I recommend always just selecting Vitis.
For the options of the next window, I recommend leaving everything set to the default unless you know the other options are needed (keep in this installer can be rerun at any point though to add these options at any time in the future).
The next page is the standard fine print to agree to use the software:
The installer will then give you the option of where you want to install the AMD FPGA tools, as well as a handy view of how much hard drive space the installation will require:
On my machine (Intel 8-core i9, with 32GB of RAM) the installation took about 45 minutes.
When the installation is complete, a prompt will appear about running the same installLibs.sh script that was in the SFD installer directory. While I have run this script after the installation in the past, I've found it's better to make sure all dependencies are installed before installing Vitis/Vivado to avoid obscure one-off errors.
Once the installation is complete, I like to quickly test it by sourcing the Vivado/Vitis tools to the environment and launching the IDEs:
~$ source /tools/Xilinx/Vivado/2024.1/settings64.sh
~$ vivado
~$ source /tools/Xilinx/Vitis/2024.1/settings64.sh
~$ vitis
While I don't believe the cable drivers have changed in quite a while, I still like to run the cable drivers installation script with every new installation (this installs the USB drivers/rules to communicate with JTAG cables).
This script is located within the Vivado installation, so change directories into its location to run:
~$ cd /tools/Xilinx/Vivado/2024.1/data/xicom/cable_drivers/lin64/install_script/install_drivers/
/tools/Xilinx/Vivado/2024.1/data/xicom/cable_drivers/lin64/install_script/install_drivers$ sudo ./install_drivers
PetaLinux has its own installer so it is a separate process from the Vitis/Vivado installation process. I do have all of its package dependencies covered in the first section though.
One extra thing however, is that since PetaLinux is capable of creating an embedded Linux image with a TFTP boot option, the corresponding TFTP server needs to be created on the host machine.
So create the TFTP server if it doesn't already exist:
~$ sudo gedit /etc/xinetd.d/tftp
Then copy + paste the following rules for the TFTP server into it:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
Create the directory on the host machine for TFTP boot to operate from, give it the proper permissions and ownership, then restart the xinetd service:
~$ sudo mkdir /tftpboot
~$ sudo chmod -R 777 /tftpboot
~$ sudo chown -R nobody /tftpboot
~$ sudo /etc/init.d/xinetd stop
~$ sudo /etc/init.d/xinetd start
Download the PetaLinux installer (which can be done be rerunning the Vitis/Vivado installer and selecting PetaLinux on the second screen which will download the installer into the top level of the Vitis SFD directory, or it can be downloaded straight from AMD's website where the Vitis/Vivado SFD installer was downloaded from).
Create the installation directory for PetaLinux and give it the proper permissions/ownership:
~$ sudo mkdir -p /tools/Xilinx/PetaLinux/2024.1/
~$ sudo chmod -R 755 /tools/Xilinx/PetaLinux/2024.1/
~$ sudo chown -R <user>:<user> /tools/Xilinx/PetaLinux/2024.1/
Give the PetaLinux installer the necessary permissions, and pass the desired target installation directory when running it:
~/Downloads$ sudo chmod 777 ./petalinux-v2024.1-05202009-installer.run
~/Downloads$ ./petalinux-v2024.1-05202009-installer.run --dir /tools/Xilinx/PetaLinux/2024.1/
Reading the fine print to agree to in the PetaLinux installer can be a bit tricky for newer Linux users. Press enter when prompted, then press Q to exit the fine print screen, and Y to agree and enter again. This process will repeat twice.
Once the installer has successfully completes, check the installation by sourcing the PetaLinux tools to the environment and checking that all of the PetaLinux commands are available (type "petalinux" then double click the Tab key):
The final element to install is Xilinx Runtime (XRT). XRT is required for running software emulations in Vitis for embedded platforms.
I'm not sure why XRT isn't built into the Vitis/Vivado installer, but the corresponding debian/RPM package for your Linux distribution can be found under the Vitis Embedded Base Platforms tab on the downloads page:
Be sure to grab the matching version of your host OS (Ubuntu 22.04 in my case):
Install the debian package directly using apt:
~$ cd ./Downloads/
~/Downloads$ sudo apt install ./xrt_202410.2.17.319_22.04-amd64-xrt.deb
The XRT install goes through and checks for all package dependencies before building and installing the proper kernels:
And that's it! You now have a full installation of the AMD FPGA tools ready to go!
Comments