After two days of banging my head against the wall, interspersed with issuing ineffectual commands, I’ve finally done it. (See shot below).
The cable drivers available with the Xilinx 9.1i software suite just won’t compile on my system. Apparently they use some proprietary functionality that does not support any kernel other than 2.4. And since I have 2.6 installed…
I had help from here, here and here.
Here’s a rundown of how I made it run on my system, which is a Debian 4.0 testing, with the following output for uname -a
Linux galileo 2.6.24-1-686 #1 SMP Thu Mar 27 17:45:04 UTC 2008 i686 GNU/Linux
I used bash throughout. If you use another shell, some commands may change.
1.
In order to avoid problems later, install libusb-dev and fxload.
aptitude install libusb-dev fxload
2.
Make a directory somewhere to store the driver’s sources.
mkdir ~/tmp/xildriver cd ~/tmp/xildriver
3.
Download the source tarball.
wget "http://git.zerfleddert.de/cgi-bin/gitweb.cgi/ usb-driver?a=snapshot;h=HEAD;sf=tgz" -O usb-driver.tar.gz
(without the line breaks)
tar zxvf usb-driver.tar.gz
cd usb-driver
4.
Compile the driver.
make
5.
copy the library to a lib directory.
su
cp *.so /usr/local/lib/
exit
This step is totally optional. Just make sure you substitute the right path in the next step.
6.
make the linker aware of the new library
export LD_PRELOAD=/usr/local/lib/libusb-driver.so
This step will need to be repeated every time you login. Or you can add it to your shell’s rc file. For bash this is /home/user/.bashrc.
All the previous steps are common to all tutorials and sources I’ve mentioned earlier. Its also given in the README file that comes with the source. After this though, its all from Verhaegen’s email.
7.
Make a new udev rule file
I absolutely do not understand this step, but I believe it has something to do with how the USB cable is detected.
su
vim /etc/udev/50-xilinx-usb-osdriver.rules # a new file with arbitrary
#name ("50" is recommended)
Now paste this into the file and save it.
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="03fd", MODE="666"
If you don’t know how to use vim, use nano instead ( or learn it). If you would rather use a graphical editor, then exit from root user and type
kdesu kwrite /etc/udev/50-xilinx-usb-osdriver.rules
Now restart udev.
/etc/init.d/udev restart
8.
Get the bus and number of the USB cable.
Plug the board in and type
lsusb | grep Xilinx
Note the bus number and the device number. Here’s my output
Bus 005 Device 016: ID 03fd:0008 Xilinx, Inc.
9.
Update firmware
If the ID in the above line is not 03fd:0008 in your case, do the following.
su
/sbin/fxload -v -t fx2 -I /home/zohair/installed/Xilinx91i/bin/ lin/xusbdfwu.hex -D /proc/bus/usb/005/016
Again without the linebreaks.
Replace your bus and device numbers from the above step into this command.
10.
Start impact (as normal user of course)
~/installed/Xilinx91i/bin/lin/impact
Impact should detect your cable automatically. If it does not go to Output->Cable Setup: and choose Xilinx USB cable.
If it still does not work, there are some more instructions in Verhaegen’s email (steps 13 onwards).
Credits
Credits go to Michael Gernoth who took the time out to make these drivers. And also to Paul Verhaegen’s excellent email and Luzerne GANHIR . Thanks guys.
I took one look at the post title on TeaBreak and knew it was you!