2008-10-28

How to install Xilinx cable drivers on Ubuntu

Yesterday I had to manually install the cable drivers on Ubuntu in order to be able to program a Xilinx FPGA board from ISE and Impact.
I'm using Ubuntu 8.04.1 and ISE WepPack 10.1; I found several detailed guides on the web but I want to write down the whole process in a compact form to easily replicate it on other machines:


sudo su
apt-get install git-core libusb-dev fxload
cd
mkdir CABLE_DRIVER
cd CABLE_DRIVER
git clone git://git.zerfleddert.de/usb-driver
tar zxvf usb-driver-HEAD.tar.gz
cd usb-driver
make
cp libusb-driver.so /usr/local/lib/
cd
rm -rf CABLE_DRIVER
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="03fd", MODE="666"' > /etc/udev/rules.d/libusb-driver.rules
echo "export LD_PRELOAD=/usr/local/lib/libusb-driver.so" >> $XILINX/settings32.sh


That's all; I would just suggest to execute the last two commands by hand being careful to understand what they really mean (in the first one I'm not sure that the single quote will work, in the second one I would insert the line at the beginning of the file rather than at the end but I think there's no shell operator to do this).