Published on 3 March 2022 by Andrew Owen (7 minutes)
I’ve written before about running non-Apple Intel binaries on an M1 Mac. The solutions I discussed work for most general purpose apps, but there was one app in particular that I’d previously been running on Windows 10, that I really wanted to get working on an M1 Mac: Xilinx Vivado.
Among other things, Vivado is a tool that lets you build FPGA cores for Xilinx hardware (such as the main chip used in the Mega 65 project) from source code. Which version of Vivado you need will depend on your license and the hardware you’re developing for, and you’ll need a Xilinx account to download it. I use the free edition, which is fine for Mega 65 because it’s a non-profit open source project.
If you recall from last time, emulating x64 on M1 with UTM (a wrapper for QEMU) is slow. Speed should be slightly better on an M1X and continue to improve as Apple releases new faster processors. But for now it’s best to use the most lightweight OS available, which means the earliest possible version.
The oldest supported OSes for the Vivado 2021.2 are:
Windows is only an option for those with a Microsoft developer license. If you’re lucky enough to have one, you can use Parallels Desktop to install and activate Windows 11 ARM. It includes an equivalent to Roseta for translation x64 Windows binaries into ARM64. This is by far the best solution, but it may not be an option for you, in which case read on.
On cost grounds, Amazon and Red Hat are out straight away. The x64 version of Ubuntu in the UTM gallery is 14.04, so I’m assuming 16.04 will be too slow. That leaves us with CentOS 7.4 and SUSE 12.4. Red Hat has effectively killed CentOS, with full updates for CentOS 7 ending in August 2020. So that leaves SUSE.
Even if I’d had a choice, there were some other reasons to consider SUSE, not least its integrated support for qemu-kvm
which should improve the guest-host communication. The file you need is SLE-12-SP4-Server-DVD-x86_64-Boothole-Respin-DVD1.iso
and you can get it from the downloads page (click 12 SP4 in the Stable Releases section). Don’t get rid of the image after you install because you’ll need it to add certain packages to your system.
The main settings I used in UTM were:
I enabled clipboard and directory sharing. I found the only way to get the ISO image to boot was to import it from the drive settings area. I also added an IDE disk. Vivado takes up a lot of space, and it will run faster if it has a good amount of storage space to use as a scratch drive. I’m still trying to work out the optimal size to give it, but as a rule more is better. I’d recommend a minimum of 100 GB.
From the boot menu, select Installation. The installer will download an updated set of install files. You probably have time to make a hot beverage. After the installer restarts, you can select a Language and Keyboard Layout. Read the license. If you’re happy with the terms, agree to it and click Next.
The next section is Registration. You can install without registering, but you won’t get software updates. Registering is free, but it’s not required to run Vivado. Click Next when you’re done. Click Next to skip Add On Product. For System Role, select Default System and click Next.
At the Suggested Partitioning screen, click Edit Proposed Settings and clear the Propose Separate Home Partition check box. This is the quick and dirty way of making sure the system partition has enough room to install Vivado without going into the expert settings. I don’t know if changing the File System for Root Partition has any effect on performance. I left it as BtrFS. Click OK when you’re done and then click Next.
From here on, it’s much like any other Linux install. Select a time zone, create a user, create a root password and so on. You’ll have the option to change installation settings before you click Install. I’d suggest switching off the firewall, at least until you’ve got Vivado installed. You probably have time for a light meal while it installs. After the installation is done, you probably want to switch off password protection on the screen saver.
Now you have a (slow) working system. The mouse and keyboard are fairly responsive, but launching apps takes an age. Don’t keep on clicking them, or you’ll open multiple copies, and it will take you even longer to close the ones you didn’t want.
To install the SPICE guest tools, navigate to Applications > System and open YaST. Enter your password and select Software Management. Search for spice
and spice-vdagent
should automatically be selected. Click Accept, and the tools are installed. That doesn’t get you shared folders though. For those, you’ll have to install spice-webdavd
, but that’s not available from YaST. So far as I can tell, you’ll have to build it from source (https://gitlab.gnome.org/GNOME/phodav). I haven’t managed to do it yet. But if you do get it to work, you can click the Shared Folder icon in the VM window and select a shared folder. You should now be able to access files on your local file system.
Navigate to Applications > Internet and open Firefox. Go to https://www.xilinx.com/support/download.html and click the unified Linux installer. It’ll be named something like Xilinx Unified Installer 2021.2: Linux Self Extracting Web Installer (BIN - 272.8 MB)
. At this point, you’ll be prompted to sign in with your Xilinx credentials. Sign your life away and then click Download. When prompted, click Save File. By default, it’s saved in the Downloads folder.
Open the shell (Applications > System Tools > Terminal), navigate to the Downloads folder and do a chmod +x
on the binary to make it executable. Run the binary. Don’t use sudo
, or it won’t pick up the X11 environment variables. It will take a while to unpack and verify itself.
When the application launches, eventually you’ll get to the Welcome screen. It advises:
To reduce installation time, we recommend that you disable any antivirus software before continuing. Please disable any power saving settings of your machine (automatic sleep mode) when running the installer.
Enter your Xilinx credentials again on the Select Install Type page. I’d recommend selecting Download Image (Install Separately) and Selected Product Only (the Linux check box should already be selected). Set the download path to /home/
<username>
/Downloads/Vivado
, then click Next.
On the Select Product to Install screen, select Vivado and click Next. If you’re using the free edition, select Vivado ML Standard. Alternatively, select Vivado ML Enterprise. Then click Next. Select the components you require and click Next. If you’re not sure what you need, stick with the defaults. Then click Download. With default settings, the download is 42.39 GB in size.
For me, the next part involved multiple failed download attempts, most likely due to network connections being reset. While repeating the process to write this article, the estimated download time was over 30 hours. If at all possible, I’d strongly recommend using a wired network connection for this part of the process.
If you manage to get it to download you’ll have to figure out the rest of the installation for yourself, because as expected the download crapped out on me, and I’m not going through that process a second time. The first time around I used the download and install option, and eventually that worked for me.
Going back to my previous SUSE install, I changed various system settings. From Tweak Tool, I switched off animations, added Vivado to (and removed Xilinx Information Center from) the Startup Applications. From Privacy, I switched off the Screen Lock. From Power, I set Blank Screen to Never. From Users, I enabled Automatic Login.
Restart the machine, and you’ll have a working, albeit slow, Vivado. I’d suggest using a Git repository for your builds, which is also a neat workaround if you were unable to configure shared folders.