Install Vivado and Quartus Prime on Apple Silicon Mac I - Setting up the Ubuntu Virtual Machine with Rosetta

839 words
4 minutes
Install Vivado and Quartus Prime on Apple Silicon Mac I - Setting up the Ubuntu Virtual Machine with Rosetta

Overview#

FPGA toolchains (Vivado, Quartus, etc.) do not natively support macOS and ARM64 architecture. The workarounds including:

  • Crossover: A translation layer to provide support of Windows apps.
  • Virtual Machines: Install apps in either Windows or Linux Virtual Machines.

Crossover generally shows a very poor compatibility. The test showed that Quartus cannot successfully start up Questa for simulation. And Vivado does not run at all even a lot of workarounds have applied.

Virtual Machine with Windows ARM64 shows a very poor performance, so that apps cannot be used as normal. This is because the translation (x86 ISA to ARM64) implemented by Windows have nearly no hardware optimisation.

Apple Silicon have implemented TSO (Total Store Ordering), which provides acceleration when translating to x86 ISA. Rosetta 2, the translation layer implemented, provides 70% - 80% of the native performance. Additionally, Apple provides Rosetta in Linux Virtual Machines as well. Therefore, install Vivado and Quartus in Linux Virtual Machine is the primary choice.

Setting up Ubuntu Virtual Machine#

Ubuntu 22.04 is used since Vivado depends on libncurses5, which is deprecated in newer Ubuntu versions.

Prerequisite#

Configure the Virtual Machine and Install Ubuntu Server#

For UTM:#

Configure the virtual machine as Virtualise. You should NOT use Apple Virtualisation as it doesn’t support USB device connections. Instead, you should use QEMU as backend and make sure you enabled TSO. Then install Ubuntu as normal.

For Parallels Desktop#

Set up the virtual machine and install as normal, but just do NOT tick Use Rosetta to run x86-64 binaries. This is because the official support has issues, we will install Rosetta manually.

You are recommended to install Ubuntu with HWE kernel.

Install Desktop Environment#

Since the image is server edition, we should manually install desktop environment, by typing the following shell command:

Terminal window
sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop
sudo reboot

Enable Rosetta in Virtual Machine#

The official Rosetta support by Parallels Desktop cannot be enabled with Ubuntu 22.04, as the translator has not been registered into the system. So we need to enable it manually (both UTM and Parallels Desktop requires this step).

In host OS (macOS), go to the path /Library/Apple/usr/libexec/oah/RosettaLinux, rosetta binary files are there. You can either patch it follows this article or download my patched rosetta. Note that my version is 367.3, if yours is different from mine, you may encounter some issues and you should patch yours by yourself.

Create the folder by sudo mkdir /opt/rosetta, and move rosetta and rosettad into the folder /opt/rosetta. Edit rosetta_start.sh by sudo nano /opt/rosetta/rosetta_start.sh and paste the following content:

#!/bin/sh
sudo /usr/sbin/update-binfmts --install rosetta /opt/rosetta/rosetta \
--magic "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00" \
--mask "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
--credentials yes --preserve yes --fix-binary yes

Create a new service: sudo nano /etc/systemd/system/rosetta.service and paste the following content:

[Unit]
Description=Enable Rosetta 2 Translation Layer
[Service]
Type=oneshot
ExecStart=/bin/sh /opt/rosetta/rosetta_start.sh
[Install]
WantedBy=multi-user.target

Restart the service by sudo systemctl enable rosetta.service. Then reboot your virtual machine.

Enable AMD64 APT Sources#

Ubuntu uses ports.ubuntu.com for ARM64 and archive.ubuntu.com for x86. So we should additionally specify the architecture of each source.

Back up the source by sudo mv /etc/apt/sources.list /etc/apt/sources.list.back, then create new file sudo nano /etc/apt/sources.list and paste the following content into the file:

deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse
deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb [arch=amd64] https://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src https://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb [arch=amd64] https://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb [arch=amd64] https://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb [arch=amd64] https://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

You can use the mirror if you are in Mainland China:

deb [arch=arm64] https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb [arch=arm64] https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb [arch=arm64] https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb [arch=arm64] https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
deb [arch=amd64] https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb [arch=amd64] https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb [arch=amd64] https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb [arch=amd64] https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

Then enable the AMD64 repository by sudo dpkg --add-architecture amd64, followed by update sudo apt update.

Now, you have successfully configured Ubuntu 22.04 with Rosetta enabled. You can try to use x86_64 apps by simply install Chrome deb file.

References#

Install Vivado and Quartus Prime on Apple Silicon Mac I - Setting up the Ubuntu Virtual Machine with Rosetta
https://blog.rocklakegrass.eu.org/posts/vivado-quartus-apple-silicon/vivado-quartus-apple-silicon-i/
Author
RockLakeGrass
Published at
2026-03-19
License
CC BY-NC-SA 4.0
Random Posts Random
Profile Image of the Author
RockLakeGrass
Hello, I'm RockLakeGrass!
Categories
Tags
Site Statistics
Posts
1
Categories
1
Tags
4
Total Words
2,894
Running Days
0 days
Last Activity
0 days ago

Table of Contents