Running Vivado under Ubuntu 15.10 (Wily Werewolf)

It seems that my fresh shiny installation of Ubuntu Wily isn’t liked much by the recent versions of Vivado. After a little too long, I managed to get Vivado working just fine, though it wasn’t trivial.

Basically the problem is down to the fact that 14.04 is the most recent supported version of Vivado. The solution then is to run Vivado in a 14.04 chroot, which, with schroot, can be pretty seamless.

The following shows how I got it working, as much for my reference as anything else. See man pages, as well as the Ubuntu and Debian docs on chroot and schroot for more info on the various aspects of the problem. You’ll obviously need schroot installed as a prerequisite.

We use Vivado 2015.03 here, but anything else should be much the same with suitably twiddles to paths and so on.

Essentially, install a new root file system that can be accessed through a chroot with something like:

sudo debootstrap --variant=buildd --arch amd64 trusty /var/chroot/vivado_chroot http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/

This installs a 64-bit bootstrap installation of Ubuntu 14.04 Trusty Tahr into /var/chroot/vivado_chroot. You can change the installation directory, the arch or the mirror as you require or desire.

Add something like the following to the end of /etc/schroot/schroot.conf:

[vivado-trusty]
description=Vivado inside Ubuntu Trusty
directory=/var/chroot/vivado_chroot
users=whg
groups=sbuild
root-groups=root
# Preserve the environment, for e.g. X
preserve-environment=true

Now append the following to your fstab so all the relevant system directories are visible (since the purpose is not specifically to sandbox Vivado, there is no problem with exposing everything through the chroot):

# Chroot setup
/proc /var/chroot/vivado_chroot/proc none rbind 0 0
/dev /var/chroot/vivado_chroot/dev none rbind 0 0
/sys /var/chroot/vivado_chroot/sys none rbind 0 0
/tmp /var/chroot/vivado_chroot/tmp none rbind 0 0
/home /var/chroot/vivado_chroot/home none rbind 0 0
/media /var/chroot/vivado_chroot/media none rbind 0 0

At this point I installed lsb. I’m not sure this is necessary for running Vivado itself, but some of the support tools may fail quietly if it’s not present (specifically, this may be a problem for the license acquisition step). This can be done from the chroot, accessing it as root:

sudo schroot -c vivado-trusty
apt-get install lsb

Now you should have the chroot set up properly and can enter it with schroot -c vivado-trusty.

Now at this point, I simply used a previously installed version of Vivado, though it would also be a good time to install Vivado from scratch if you haven’t already.

If you use a previously installed version, it needs to be visible to the chroot. In my case it was in home due to the way I’d set up my partitions, root being small by comparison, so was visible inside the chroot with the mounts that I’d set up.

It was necessary for me to run install_fnp.sh (inside Xilinx/Vivado/2015.3/bin/unwrapped/lnx64.o) which sets up the “trusted” server (or whatever it’s called).

One important thing that was problematic for the generation of the license was that the ethernet device has a different name in 15.10 (due to some persistent naming changes). The Vivado license manager expects the older style naming of “eth0”, “eth1” etc to look up the mac address. Without changing the ethernet device name, every attempt to get a new license presented my with a greyed out box.

I reverted this by adding net.ifnames=0 biosdevname=0 to the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub, so the line now looks something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash net.ifnames=0 biosdevname=0"

and running sudo update-grub. At this point, the license manager was able to generate an html page that allowed me to generate a new license.

This all got Vivado up and running. For a bit of polish I created two additional files to make running Vivado simpler. In ~/bin I created

#!/bin/bash

(
    source /opt/Xilinx/Vivado/2015.3/settings64.sh
    vivado $@
)

and

#!/bin/bash
schroot -c vivado-trusty -- vivado_in_env $@

chmod both those to be +x and you can now run vivado from outside the chroot and it will all automagically work. You shouldn’t even notice it’s running in a chroot. For some reason WordPress seems to be removing the underscores from vivado_in_env in the above script. Of course they need to be there.

(if you’re interested, the parentheses in vivado_in_env creates a sub-shell that prevents the annoying environment leakage that breaks other commands when source /opt/Xilinx/Vivado/2015.3/settings64.sh is run.)

Advertisements

About Henry Gomersall

I'm a engineer wanting to make things actually useful. I'm someone that wants to drive technology and ideas to be helpful for everyone. I'm someone that realises the disconnect between technology and utility and I hope to correct that...
This entry was posted in Uncategorized. Bookmark the permalink.

5 Responses to Running Vivado under Ubuntu 15.10 (Wily Werewolf)

  1. Nick P. says:

    Thanks this was a great help

  2. Royi says:

    Hello,

    Is there a mail to contact you?

    Thank You.

  3. Alex says:

    Very interesting way to solve the Vivado bug. I’m new to chroot, so forgive me ignorance. When you say ‘append the following to your fstab…’ do you mean the fstab file in /etc/ on the host or in a directory inside the chroot itself?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s