Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Trusted Contributor
bborko
Posts: 35
Registered: ‎06-24-2008

Installing usb cable driver (ubuntu)

I know that ubuntu is not a supported operating system but it is possible to get the cable driver working.

 

I am running the ./install_drivers script that Xilinx provides and am receiving errors when it gets to windrvr6.  I am not a linux guru so the output doesn't mean very much but I suspect I am missing some library or maybe something is not linked properly.  Could someone comment on the compile errors or offer a suggestion for me to try? Is there some library I must install? I think it is strange that the source code exists but fails to compile due to what looks like syntax errors.  I don't want to give up because last time I tried this a few months ago, on the same operating system, the programming cable worked perfectly.

 

 

I am using:

ubuntu 9.04

gcc/g++ 4.3 (have tried 4.1 if that matters)

bash

 

 Also installed:

libusb-dev

fxload

 

 

--Installing windrvr6---------------------------------------------
--Checking version.--File /lib/modules/2.6.28-15-generic/kernel/drivers/misc/windrvr6.ko does not exist.
--File LINUX.2.6.28-15-generic.i386/windrvr6.ko does not exist.
--Setting source version to 900.
--File LINUX.2.6.28-15-generic.i386/windrvr6.ko is newer than the destination file.
loading cache ./config.cache
checking for cpu architecture... i386
checking for WinDriver root directory... /home/borko/Desktop/install_drivers/linux_drivers/windriver32
checking for linux kernel source... found at /lib/modules/2.6.28-15-generic/build
checking for lib directory... ln -sf $(ROOT_DIR)/lib/$(SHARED_OBJECT).so /usr/lib/$(SHARED_OBJECT).so
checking which directories to include... -I/lib/modules/2.6.28-15-generic/build/include
checking linux kernel version... 2.6.28-15-generic
checking for modules installation directory... /lib/modules/2.6.28-15-generic/kernel/drivers/misc
checking for gcc kernel version... 4
checking output directory... LINUX.2.6.28-15-generic.i386
checking target... LINUX.2.6.28-15-generic.i386/windrvr6.ko
checking for usb support... yes
checking for regparm kernel option... 1
checking for right linked object... windrvr_gcc_v3_regparm.a
checking for modpost location... /lib/modules/2.6.28-15-generic/build/scripts/mod/modpost
checking for udev support... no
creating ./config.status
creating makefile
rm -f core LINUX.2.6.28-15-generic.i386/windrvr6.ko LINUX.2.6.28-15-generic.i386/*
cc -c -O2 -Wall -DLINUX -D__KERNEL__ -DMODULE -DWINDRIVER_KERNEL  -DLINUX_USB_SUPPORT -mpreferred-stack-boundary=2 -mregparm=3 -nostdinc -iwithprefix include -Wstrict-prototypes -Wno-trigraphs         -fno-common -pipe -O -I/lib/modules/2.6.28-15-generic/build/include -I/home/borko/Desktop/install_drivers/linux_drivers/windriver32/include -I/home/borko/Desktop/install_drivers/linux_drivers/windriver32  -fno-strict-aliasing -D"KBUILD_STR(s)=#s" -D"KBUILD_MODNAME=KBUILD_STR(windrvr6)" -D"KBUILD_BASENAME=KBUILD_STR(windrvr6)" -include /lib/modules/2.6.28-15-generic/build/include/linux/autoconf.h -c -o LINUX.2.6.28-15-generic.i386/linux_wrappers.o linux_wrappers.c
In file included from /lib/modules/2.6.28-15-generic/build/include/linux/posix_types.h:47,
                 from /lib/modules/2.6.28-15-generic/build/include/linux/types.h:11,
                 from /lib/modules/2.6.28-15-generic/build/include/linux/mod_devicetable.h:11,
                 from /lib/modules/2.6.28-15-generic/build/include/linux/pci.h:43,
                 from linux_wrappers.c:19:
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/asm/posix_types.h:13:22: error: features.h: No such file or directory
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/asm/posix_types.h:14:35: error: no include path in which to search for asm/posix_types.h
In file included from /lib/modules/2.6.28-15-generic/build/include/linux/mod_devicetable.h:11,
                 from /lib/modules/2.6.28-15-generic/build/include/linux/pci.h:43,
                 from linux_wrappers.c:19:
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:12:23: error: asm/types.h: No such file or directory
In file included from /lib/modules/2.6.28-15-generic/build/include/linux/mod_devicetable.h:11,
                 from /lib/modules/2.6.28-15-generic/build/include/linux/pci.h:43,
                 from linux_wrappers.c:19:
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__kernel_dev_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ino_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mode_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nlink_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘off_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pid_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘daddr_t’
/lib/modules/2.6.28-15-generic/build/include/linux/types.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘suseconds_t’

 

...similar compile errors for over 1000 lines

Newbie
ericpope
Posts: 5
Registered: ‎10-21-2009
0

Re: Installing usb cable driver (ubuntu)

I'm having a similar issue but it looks like my installation script is breaking before the point where yours does:

 

$~/Desktop/install_drivers$ sudo ./install_drivers
--Driver versions in this package: windrvr=900, xpc4drvr=1041
--Script name = ./install_drivers
--HostName = C3ITester
--Current working dir = /home/eric/Desktop/install_drivers
--Script location = /home/eric/Desktop/install_drivers
--Kernel version = 2.6.28-15-generic.
./install_drivers: 380: arch: not found
--Arch = .
--Installer version = 1053
--Unsetting ARCH environment variable.
./install_drivers: 384: arch: not found
--User has root permission.
--File /lib/modules/misc/install_windrvr6 does not exist.
--Installing USB drivers------------------------------------------
--Using udev.
--File /usr/share/xusbdfwu.hex exists.
./setup_pcusb: 191: Bad substitution
--File /sbin/fxload exists.
--Installing windrvr6---------------------------------------------
--Checking version.
--File /lib/modules/2.6.28-15-generic/kernel/drivers/misc/windrvr6.ko does not exist.
--File LINUX.2.6.28-15-generic.i386/windrvr6.ko does not exist.
--Setting source version to 900.
--File LINUX.2.6.28-15-generic.i386/windrvr6.ko is newer than the destination file.
loading cache ./config.cache
./configure: 531: Syntax error: "(" unexpected
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
--make windrvr install rc= 2
--install_windrvr6 rc = 2
--Module windrvr6 is not running.
--Module xpc4drvr is not running.
--Note: By default, the file permission of /dev/windrvr6 is enabled for the root user only
  and must be changed to allow access to other users.

--Return code = 2
 

 I'm interested to see if we can get these cable drivers running on Ubuntu.

Trusted Contributor
bborko
Posts: 35
Registered: ‎06-24-2008
0

Re: Installing usb cable driver (ubuntu)

I ran into that problem and was able to get through it by changing the shell.

 

Ubuntu uses something called dash by default but the install script works with bash (your error is syntax related).

 

You might be able to just type at the command line 

> bash

 

then try to run the script.

 

 

 

 

 

 

I didnt do this but actually changed my default shell with the commands below:

 

To see that your shell is infact dash type

> ls -l /bash/sh

 

It should say something like sh -> /bin/dash

 

I fixed this by changing the symbolic link at /bin/sh with commands

> cd /bin

> sudo rm sh

> sudo ln -s bash sh

 

 

 

 Like I said, I'm no linux expert and actually have a second windows machine for downloading bitfiles.

 

It bugs me because at one point in time I had the drivers working on ubuntu 9.04

 

 

 

Newbie
ericpope
Posts: 5
Registered: ‎10-21-2009
0

Re: Installing usb cable driver (ubuntu)

I managed to get through my problem with the cable. As it turns out the Xilinx 11.1 software is able to use the Ubuntu native libusb drivers. So don't even bother trying to build the usb drivers from Xilinx unless you can't get libusb for your Ubuntu. I think they are alredy installed by default on the newest distrubutions of Ubuntu, you can try and get them by using apt-get:

 

apt-get install libusb-0.1-4

another handy tip:

to start chipscope you need to first start the  cs_server:

/opt/Xilinx/11.1/ChipScope/bin/lin$ ./cs_server.sh

then start chipscope in another terminal:

/opt/Xilinx/11.1/ChipScope/bin/lin$ sudo ./analyzer.sh

 

Visitor
dhthomas
Posts: 7
Registered: ‎08-18-2008
0

Re: Installing usb cable driver (ubuntu)

Can you provide some more info on how you got this working? I have the libusb drivers installed, but Impact still complains about windrvr6 not being loaded.
Newbie
ericpope
Posts: 5
Registered: ‎10-21-2009
0

Re: Installing usb cable driver (ubuntu)

hi dhthomas,

I used version 11.1 of the Xilinx tools on Ubuntu Jaunty Jackalope and later on Karmic Koala. What versions are you using, and could you say what the error message looks like? Also have you tried running the /opt/Xilinx/11.1/settings32.sh script?

Super Contributor
k-50
Posts: 101
Registered: ‎08-16-2008
0

Re: Installing usb cable driver (ubuntu)

Newbie
ericpope
Posts: 5
Registered: ‎10-21-2009
0

Re: Installing usb cable driver (ubuntu)

Sorry, I just recently upgraded to 9.10 and I think I'm actually having the same issue you are. I was mistaken earlier when I said I had it working in 9.10. You should be able to get it working in 9.04 without trouble. Here's what I am seeing:

 

 

Welcome to iMPACT
iMPACT Version: 11.1
Project: /home/eric//auto_project.ipf created.
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
GUI --- Auto connect to cable...
// *** BATCH CMD : setCable -port auto
AutoDetecting cable. Please wait.
PROGRESS_START - Starting Operation.
Reusing A0150001 key.
Reusing 24150001 key.
OS platform = i686.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
File version of /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.hex = 1030.
File version of /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex = 1030.
Using libusb.
Cable connection failed.
Reusing 78150001 key.
Reusing FC150001 key.
OS platform = i686.
Connecting to cable (Parallel Port - parport0).
Linux release = 2.6.31-16-generic.
WARNING:iMPACT - Module windrvr6 is not loaded. Please reinstall the cable drivers. See Answer Record 22648.
Cable connection failed.
Reusing 79150001 key.
Reusing FD150001 key.
OS platform = i686.
Connecting to cable (Parallel Port - parport1).
Linux release = 2.6.31-16-generic.
WARNING:iMPACT - Module windrvr6 is not loaded. Please reinstall the cable drivers. See Answer Record 22648.
Cable connection failed.
Reusing 7A150001 key.
Reusing FE150001 key.
OS platform = i686.
Connecting to cable (Parallel Port - parport2).
Linux release = 2.6.31-16-generic.
WARNING:iMPACT - Module windrvr6 is not loaded. Please reinstall the cable drivers. See Answer Record 22648.
Cable connection failed.
Reusing 7B150001 key.
Reusing FF150001 key.
OS platform = i686.
Connecting to cable (Parallel Port - parport3).
Linux release = 2.6.31-16-generic.
WARNING:iMPACT - Module windrvr6 is not loaded. Please reinstall the cable drivers. See Answer Record 22648.
Cable connection failed.
PROGRESS_END - End Operation.
Elapsed time = 2 sec.
Cable autodetection failed.
WARNING:iMPACT:923 - Can not find cable, check cable setup !

 Note where it says Using libusb and cable connection failed. It seems like it is finding the libusb driver but it isn't locating the cable for some reason. The windrvr6 error messages all seem to be associated with the parallel port.

 

Maybe someone with more knowlege can help us out?

 

 

Super Contributor
k-50
Posts: 101
Registered: ‎08-16-2008

Re: Installing usb cable driver (ubuntu)

check the installation of libusb and fxload. then set rules for udev

 

 

sudo sed /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' > /etc/udev/rules.d/xusbdfwu.rulessudo cp /opt/Xilinx/11.1/ISE/bin/lin/xusb*.hex /usr/share/ 

sudo /etc/init.d/udev restart 

 

it  works on ubuntu 9.10 without no problem

Newbie
ericpope
Posts: 5
Registered: ‎10-21-2009
0

Re: Installing usb cable driver (ubuntu)

I'm trying to understand the script you wrote here. I can look at the xuxbdfwu.rules file so I get what that is about... but the stuff after '-e' is pretty dense... the s:TEMPNODE:tempnode:g clause is completely foreign to me. After that you seem to be redirecting output to a file so no mystery there, but then there is the copy command 'cp' and I'm totally lost again. Should there have been a carriage return before the cp to make it a separate command or is it part of the same oneliner?