In the software world of FPGA tools, the IDEs used to develop designs on FPGAs seems to be accelerating faster and faster with each passing year - full pun intended with my use of "accelerating" there. Which means there is no shortage of need for installation tips and tricks. So here am I again for AMD FPGA tools version 2024.2 because I found a couple of new things in this installation process (don't even ask about the sheer amount of hard drive space I've dedicated to Vivado/Vitis installations).
As usual, I'm working in an Ubuntu host environment. The following instructions have been tested and verified in Ubuntu versions 20.04 LTS, 22.04 LTS, and 24.04 LTS without Ubuntu Pro enabled. However I can't foresee any reason that Ubuntu Pro would have any impact on this installation flow unless a given firewall connection ends up blocking backend access to PetaLinux mirrors or Vivado's access to the online board definition file repository. Which is the most common thing I've run into working on company-issued computers versus my personal computers.
Ubuntu Environment PrepIf starting with a fresh install of Ubuntu or a previous version of the AMD FPGA tools has not been installed, check which system shell is being used. If it is currently set to dash it needs to be changed to the full functionality shell, bash:
~$ sudo dpkg-reconfigure dash
Vivado and PetaLinux also have several 32-bit package dependencies, so the 32-bit architecture also needs to be added to the environment to allow for those libraries to be installed:
~$ sudo dpkg --add-architecture i386
The following list of package dependencies for Vivado, Vitis (previously XSDK), and PetaLinux is something I have been curating for an Ubuntu host over the past several years.
For the most part it's been fairly consistent (with a couple of bonus things like gparted
for formatting SD cards for embedded Linux images built in PetaLinux), but I find it interesting when there are new packages that pop up because it can give me hints about what's different about the Vivado/Vitis IDEs under the hood.
I do verify this list by running the script built into the Vitis installation directory that checks for missing package dependencies post-installation every time which is how I've been catching what needs to be added to this list.
It's also worth noting that I have purposely broken up the packages across multiple apt install
commands. This is due to the past experience where I've found that trying to install too many packages at once seems to freak Ubuntu out and leads to the "impossible conditions" error.
~$ sudo apt-get install gparted xinetd gawk gcc net-tools ncurses-dev openssl libssl-dev flex bison xterm autoconf libtool texinfo zlib1g-dev iproute2
~$ sudo apt-get install make tftpd libselinux1 wget diffstat chrpath socat tar unzip gzip tofrodos lsb libftdi1 libftdi1-2 libnspr4-dev libnss3-dev
~$ 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 python3 pylint 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 cython3 google-perftools patch diffutils ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev
~$ sudo apt-get install libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev libncurses5:i386 libtinfo5 libstdc++6:i386 dpkg-dev:i386
~$ sudo apt-get install libdeflate-dev libgdk-pixbuf-2.0-dev libgdk-pixbuf-xlib-2.0-0 libgdk-pixbuf-xlib-2.0-dev libgdk-pixbuf2.0-dev
~$ sudo apt-get install libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblzma-dev libtiff-dev libtiffxx5
~$ sudo apt-get install icu-devtools libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev libbrotli-dev libcairo2-dev libdatrie-dev libdbus-1-dev libegl-dev
~$ sudo apt-get install libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libfribidi-dev libgles-dev libgles1
~$ sudo apt-get install libglvnd-core-dev libglvnd-dev libgraphite2-dev libgtk-3-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev libopengl-dev libpango1.0-dev
~$ sudo apt-get install libpixman-1-dev libsm-dev libthai-dev libwayland-bin libwayland-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxdamage-dev
~$ sudo apt-get install libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libxtst-dev pango1.0-tools wayland-protocols libxss-dev
Then in order for the Vivado and Vitis IDEs to be able to talk to FPGA hardware via serial connections, the user profile(s) on Ubuntu need to be added to the dialout group in order to be able to access the /dev/ttyUSB
serial port devices:
~$ sudo adduser $USER dialout
Download Installation FilesWith the Linux environment prepped and ready, it's time to download the installation files/installer for Vitis/Vivado. The AMD downloads page here defaults to the latest version, but also links all past versions as well if needed.
There are two versions of the installer: a self extracting web-based installer and a single file download installer. The the self-extracting installer downloads the installation files as they are needed during the installation process so that it doesn't take up extra hard drive space during the installation.
The single file download (SFD) installer contains all of the installation files in the installer's directory, so as the name implies you only wait on a single compressed file to be downloaded from the AMD website that contains everything.
Now while the web installer saves hard drive space during the installation process the actual hard drive space consumed by Vivado/Vitis installation itself is the same regardless of which installer used (which is approximately 150GB).
I've seen in some AMD documentation that the web installer is highly recommended to avoid waiting for the entire 124GB SFD installer to be downloaded initially, but from personal experience I've found that corporate firewall tend to not like whatever proxy the web installer uses to access the AMD server to download the installation files piecemeal. So I've personally always used/preferred the SFD installer.
It's also worth mentioning that the installer linked under the Vivado (HW Developer) tab and the Vitis (SW Developer) tab are the same installer because it's within the installer when you run it that you make the choice to install Vivado, Vitis, or both.
Run Vitis InstallerIf using the SFD installer, unzip the compressed file with a command like tar
then change directories into it and run the installer xsetup
:
~$ cd ./Downloads/FPGAs_AdaptiveSoCs_Unified_2024.2_1113_1001/
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2024.2_1113_1001$ sudo ./xsetup
Otherwise, make the web installer file executable with the chmod
command then run it:
~/Downloads$ chmod +x FPGAs_AdaptiveSoCs_Unified_2024.2_1113_1001_Lin64.bin
~/Downloads$ sudo ./FPGAs_AdaptiveSoCs_Unified_2024.2_1113_1001_Lin64.bin
The installer does require super user/root privileges to run.
The first page of the installer is just a welcome page, but will also warn you if the version of the host platform OS isn't officially supported. In my case here, I'm using Ubuntu 22.04 but I've updated the minor version to 22.04.5 and since the last officially supported version is 22.04.4 the installer throws the warning.
However, I've personally never found an issue with using an "unsupported" minor version of Ubuntu LTS like this. As long as the major is supported (ie - 20.04, 22.04, etc.) you should be good.
As I previously mentioned it's within the installer when you run it that you make the choice to install Vivado, Vitis, or both. The top option labeled just "Vitis" is the superset that installs both Vivado and Vitis with all accompanying tools, then the rest of the list shows the options for installing individual tools.
A couple of notes about this to be aware of:
1 - The installer can be rerun at any time even if a current installation of the same version already exists so you can come back to install anything you might have foregone in the previous installation process.
2 - The PetaLinux option does NOT actually go through the process of installing PetaLinux. It just downloads the PetaLinux installer for you.
A vast majority of applications will need the full installation including Vivado and Vitis, so after selecting Vitis the next page will give options for more specifics.
Personally, I have yet to need to change any of the default install options on this screen. Unchecking some options like different types of parts you may not use will save some hard drive space in the final installation, but I don't find it to be impactful enough to risk needing to come back and rerun in the installer later.
The next page is everyone's favorite of agreeing to the terms of service to use the AMD FPGA tools. Every "I Agree" box must be checked in order for the Next button to become enabled:
The final options screen allows you the opportunity to specify a custom installation directory if some other location is desired over the default /tools/Xilinx
directory.
If the specified installation directory does not currently exist then the installer will prompt you to verify that creating it is ok.
Once confirming the installation directory, a summary of the installation will be shown as the last window before starting the actual installation.
The installation time will vary depending on the selected options and which installer being used. The SFD does run faster since it doesn't need to wait for any source files to download, but how much faster depends on your internet speed (I highly recommend a hardwired connection for the download of the SFD installer or running the web installer while it's downloading source files).
On my Intel Core i9 with 32GB of RAM, the SFD installer took about 30 minutes to install Vivado and Vitis.
Once completed, a prompt will appear telling you the location of the script that checks for missing libraries/package dependencies.
While I have already included everything in this script in the list above, I still recommend always running this script as a sanity check:
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2024.2_1113_1001$ cd /tools/Xilinx/Vitis/2024.2/scripts/
/tools/Xilinx/Vitis/2024.2/scripts$ sudo ./installLibs.sh
After validating all of the libraries/package dependencies are installed, the cable drivers for talking to AMD FPGAs via USB and JTAG need to be installed. The script to install these drivers is located in the /<installation
dir>/data/xicom/cable_drivers/lin64/install_script/install_drivers/
directory:
/tools/Xilinx/Vitis/2024.2/scripts$ cd /tools/Xilinx/Vivado/2024.2/data/xicom/cable_drivers/lin64/install_script/install_drivers/
/tools/Xilinx/Vivado/2024.2/data/xicom/cable_drivers/lin64/install_script/install_drivers$ sudo ./install_drivers
Be sure that no FPGA JTAG cables are connected to the host PC when installing the cable drivers themselves.
As a final sanity check, I like to launch the Vivado and Vitis IDEs just to make sure they at least open before I move on to the PetaLinux installation.
Source the settings script to the environment and launch the desired IDE by name:
~$ source /tools/Xilinx/Vivado/2024.2/settings64.sh
~$ vivado
It's worth noting that the settings64.sh
script is the same in the Vitis and Vivado installation directories so it only needs to be sourced once to launch either IDE.
~$ source /tools/Xilinx/Vitis/2024.2/settings64.sh
~$ vitis
Now there is a last bit of Linux environment required for the Yocto-based PetaLinux tools in that it needs a TFTP service and its installation directory needs to be manually created and given the appropriate permissions.
Start by creating the rules file for the TFTP service:
~$ sudo gedit /etc/xinetd.d/tftp
With the following configuration:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
After saving and closing the TFTP rules file, create the directory for the TFTP server to operate in with the appropriate permissions and ownership:
~$ sudo mkdir /tftpboot
~$ sudo chmod -R 777 /tftpboot
~$ sudo chown -R nobody /tftpboot
Finally, restart the xinetd network service for the changes to the system to take effect.
~$ sudo /etc/init.d/xinetd stop
~$ sudo /etc/init.d/xinetd start
Then create the desired installation directory and give it the appropriate permissions. I personally like to install PetaLinux in the installation directory with the corresponding version of Vivado/Vitis following the same directory naming convention:
~$ sudo mkdir -p /tools/Xilinx/PetaLinux/2024.2/
~$ sudo chmod -R 755 /tools/Xilinx/PetaLinux/2024.2/
~$ sudo chown -R <user>:<user> /tools/Xilinx/PetaLinux/2024.2/
PetaLinux InstallationWhile the installation directory permissions needs to be set to 755, the actual PetaLinux installer itself needs full read/write permissions of 777.
Once the installer has the needed permissions, run it with the --dir
flag to specify the target installation directory:
~$ sudo chmod 777 ./Downloads/petalinux-v2024.2-11062026-installer.run
~$ ./Downloads/petalinux-v2024.2-11062026-installer.run --dir /tools/Xilinx/PetaLinux/2024.2/
The installer will prompt you to review and respond to the user license agreement:
Press enter to view the license agreement, then press the Q key to exit where you will be prompted to enter Y or N to agree or disagree to the terms of service to use the PetaLinux tools.
Then to check the installation source the PetaLinux tools to the environment and verify the petalinux
commands are now available:
~$ source /tools/Xilinx/PetaLinux/2024.2/settings.sh
~$ petalinux-config --help
~$ petalinux-create --help
Next StepsWith the full 2024.2 installation complete, I will be following up with some new getting started tutorials since there are changes to the overall workflow such as the new system device tree (SDT) for generating the device tree for PetaLinux designs.
Comments
Please log in or sign up to comment.