Setupxilinxtools9 1i

Abstract: This document describes the installation and configuration of Red Hat 5, and Xilinx EDK/ISE 9.1i.


Operating System Installation

Red Hat was chosen as the base system for development because it is well supported by the Xilinx products and has access to required programs through the EPEL Repositories.

The OS was installed by IT, and I am not sure on the specifics of the install; however, when we received the machine back Red Hat 5 was installed and some basic functionality (printers, network, sudo ) were configured. Upon receiving the machine, an update was performed

sudo yum update

note: Here is a quick tutorial on configuring sudo - misc

Adding the EPEL Repos (From Fedora Project)

The EPEL repos include many useful programs from the Fedora Project. You can add these repos using this command:

sudo rpm -Uvh

During the first use of this new repository you will be prompted to install the EPEL GPG key. This key is used to sign all the packages and verify there integrity as they pass over the internet to your computer. Allow yum to install this GPG key.

This will allow you to install the following programs. Install the programs that you need.

sudo yum install fxload # This program installs firmware for the Xilinx Platform USB Cable.
sudo yum install debootstrap # Useful script for creating Debian root file systems.
sudo yum install minicom # Used for observing serial communication similar to Hyperterm on Windows

Installing the Xilinx Tools

Prepare Installation Media

The installation media was provided to me as copies of disk images. I found that the installation does not handle spaces in the path to the setup script. Therefore I had to copy these images to a location such that there were no spaces.

cp -r <ISE 9.1 DVD> ~/install_files/ISE91DVD
cp -r <EDK 9.1 DVD> ~/install_files/EDK91DVD

note: replace <ISE 9.1 DVD> and <EDK 9.1 DVD> with your installation media.

Install ISE

To install Xilinx ISE you need to run the setup script in the root directory of the media.

cd ~/install_files/ISE91DVD
sudo ./setup

This will pop up a gui and let you select a options for the installation. Please select the following options.
-> Install dir is /opt/Xilinx/9.1/ISE
-> Install everything except the cable drivers (we will do this later)

Install EDK

To install Xilinx EDK you need to run the setup script in the root directory of the media.

cd ~/install_files/EDK91DVD
sudo ./setup

This will pop up a gui and let you select a options for the installation. Please select the following options.
-> Install dir is /opt/Xilinx/9.1/EDK

Install Cable Drivers

Download the drivers


Unpack the drivers in a local directory you have permissions to access.

tar xvzpf install_drivers.tar.gz

This command installs the Xilinx Cable drivers.

    cd install_drivers
    sudo ./install_drivers

We want to make sure that only a limited number of users are allowed to use the programming cable. Therefore we will setup a group named xilinx, which includes all the users allowed to access the cable, make this group own the cable and then allow all group members to access the device.

sudo /sbin/addgroup xilinx 
sudo vim /etc/rc.local # Add the following lines to the bottom
    chmod 660 /dev/windrvr6
    chown root.xilinx /dev/windrvr6
# save and exit
sudo adduser -a -G xilinx <user> <-- run multiple times with all users that should be able to access the device

IP License Installation

A goal of this installation is to allow multiple users to use the system, the default installation method for IP licenses is not designed for this use case. In order to allow each user to use all the licenses on the system a new folder will be created in /opt/XilinxLic and we will create symbolic links to each users home directory.

cd /opt/XilinxLic/
sudo unzip /path/to/
ln -s /opt/XilinxLic/.Xilinx ~/.Xilinx

note: replace /path/to/ with the path to your ip licenses.

Xilinx Open Source Linux Configuration

This will describe how to setup the Xilinx Open Source Linux for the XUPV2P.

Create an EDK Repository

The EDK tool has the ability to specify a global repository for all projects. We will take advantage of this for instlalling the board description and the device tree.

cd /opt/
sudo mkdir edk_user_repository

Now start EDK and edit the preferences so that global EDK Repo points to this directory.

Install Device Tree

cd /opt/edk_user_repository
sudo git clone git://

Install Board Description

cd ~
mkdir xup-ref
cd xup-ref
sudo cp -r lib/* /opt/edk_user_repository/

Build a Cross Compiler

sudo yum groupinstall 'Development Tools' # download if not already installed
cd /opt
sudo mkdir crosstool
sudo chown user.user crosstool <-- use your username
tar xvzpf crosstool-0.43.tar.gz
cd crosstool-0.43
<wait a very long time>
sudo chown -R root.root /opt/crosstool
Append the following lines to your .bashrc
    # PowerPC Cross Compiler aliases
    export PATH=$PATH:/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-405-linux-gnu/bin
    alias ppckmake="make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu-"
    alias ppcmake="make CC=powerpc-405-linux-gnu-gcc"
# Save and exit

Finishing Up and Usability Enhancements

Start up Scripts

cd /usr/local/bin
sudo vim start_edk
    # Simple start up script for Xlinx EDK 
    source /opt/Xilinx/9.1/ISE/settings*.sh && \
    source /opt/Xilinx/9.1/EDK/settings*.sh && \
    /opt/Xilinx/9.1/EDK/bin/lin/xps &
# Save and exit
sudo vim start_ise
    # Simple start up script for Xlinx ISE
    source /opt/Xilinx/9.1/ISE/settings*.sh && \
    /opt/Xilinx/9.1/ISE/bin/lin/ise &
# Save and exit
sudo vim start_xilenv
    # Simple start up script for Xlinx ENV
    source /opt/Xilinx/9.1/ISE/settings*.sh && \
    source /opt/Xilinx/9.1/EDK/settings*.sh && \
# Save and exit
Create Desktop files 
cd ~/Desktop
vim Xilinx\ EDK.desktop    
    [Desktop Entry]
    Name[en_US]=Xilinx EDK
    Comment[en_US]=Do some embedded development?
    Name=Xilinx EDK
    Comment=Do some embedded development?
# Save and exit
vim Xilinx\ ISE.desktop
    [Desktop Entry]
    Name[en_US]=Xilinx ISE
    Comment[en_US]=Do some hardware describing?
    Name=Xilinx ISE
    Comment=Do some hardware describing?
# Save and exit
vim Xilinx\ ENV.desktop
    [Desktop Entry]
    Name[en_US]=Xilinx ENV
    Comment[en_US]=Your doing something fancy...
    Name=Xilinx ENV
    Comment=Your doing something fancy...
# Save and exit

Make It easy to add new users

In order to make the task of adding new users easier we will use the /etc/skel directory. This directory holds a set of files that are automatically copied to a new users home directory.

cd /etc/skel # This directory is the SKELaton for new users
sudo cp ~/.bashrc .
sudo cp ~/Desktop .
sudo cp ~/.qt . # copies config of EDK
sudo ln -s /opt/XilinxLic/.Xilinx .Xilinx

Change permissions on Serial Ports

In order to allow a normal user to access the serial port you need to change the permissions on it. This is accomplished on each boot using a package called udev. udev has a configuration in /etc/udev
specifically we will alter the 50-udev.rules.

cd /etc/udev/rules.d/
vim 50-udev.rules

Find the following line. Then change GROUP from uucp to serial.

KERNEL=="tty[A-Z]*",            NAME="%k", GROUP="uucp", MODE="0660" # BAD
KERNEL=="tty[A-Z]*",            NAME="%k", GROUP="serial", MODE="0660" # GOOD


How to Add New Users

This can be accomplished in the system-config-users gui or using these console commands.

sudo adduser <user>
sudo usermod -a -G xilinx <user> # run this if the user need access to programming tool
sudo usermod -a -G serial <user> # run this if the user needs access to the serial port(ex: minicom)

How to the Update Xilinx Products

Some time it may be neccessary to update the Xilinx products. The following routine allows an admin to upgrade the products.

[spenser@avionics02 ~]$ sudo -i
[root@avionics02 ~]# /usr/local/bin/start_xilenv 
[root@avionics02 ~]# webupdate

Adding new IP Licenses

This is how you add new IP License to the system so that all users have access to them.

Get HostID and hostname

The following routine allows you to find the hostid of the system.

[spenser@avionics02 ~]$ lmutil hostid
[spenser@avionics02 ~]$ lmutil hostid -hostname

Now you need to ask Xilinx for the licenses. note: hostname is now neccessary as Xilinx has changed their licensesing procedure.

Install the licenses

All license are stored in /opt/XilinxLic and symlinked to each users home directory. The following routing installs the new licenses.

cd /opt/XilinxLic
sudo unzip /path/to/

Update The Drivers

It will be necessary to update the cable drivers each time a new kernel is installed on the system. This routine accomplishes this.

cd ~/install_files/install_drivers/
sudo ./install_drivers
sudo vim /etc/rc.local # Verify the setup


SE Linux Issues

Issue: Cannot start the installer with sudo ./setup but no error messages?
Answer: Make sure SELinux is set to disabled.

Library Issues

Issue: Cannot start the installer and error message about missing
Answer: Install libstc++-compat package.