Xilinx
From Ece
Contents |
Xilinx
Xilinx must be tricked into working.
Installing Cable Driver Kernel Modules
Xilinx modules
Base installation
- Obtain the xpc4drvr parallel port programmer driver source code provided by Xilinx. Ignore the windrvr source code bundled in the tarball, as it is v7.00, and a newer version, v7.02 is available elsewhere:
ftp://ftp.xilinx.com/pub/utilities/M1_workstation/linuxdrivers.2.6.tar.gz
- Untar this and cd into the xpc4drvr directory, run ./configure and type 'make' to compile the xpc4drvr driver module. Once it has compiled, copy the resulting xpc4drvr.ko driver into /lib/modules/<kernel>/misc/ or run 'make install'
- Next, obtain the windrvr6 driver interface provided by Jungo (the source ver 8.11 produces windrvr6, instead of windrvr8, oddly enough)
http://www.jungo.com/st/download/WD920LN.tgz (works with 2.6.23.15-80.fc7)
- Untar this and cd into the 'WinDriver/redist' directrory and just type './configure' and 'make' to compile the windrvr6 driver module. Once it has compiled, copy the resulting windrvr6.ko driver into /lib/modules/<kernel>/misc/ or run 'make install'
- When not using UDEV, add the following to /etc/conf.d/local.start - make sure this script is executed before startise is run the first time or parallel port programming will not work
insmod /lib/modules/2.6.23.15-80.fc7/kernel/drivers/misc/windrvr6.ko
set -- $(grep windrvr6 /proc/devices)
rm -f /dev/windrvr6
mknod -m 0666 /dev/windrvr6 c $1 0
insmod /lib/modules/2.6.23.15-80.fc7/kernel/drivers/misc/xpc4drvr.ko
set -- $(grep xpc4drvr /proc/devices)
for i in 0 1 2 3
do
rm -f /dev/xpc4_$i
mknod -m 0666 /dev/xpc4_$i c $1 $i
done
An alternative to fix permissions is to add a permission rule to UDEV:
mkdir /etc/udev/permissions.d echo windrvr6:root:root:0666 >> /etc/udev/permissions.d/50-udev.permissions
Using udev
If you don't use hotplug you have to use udev. This is also usefull if you don't want to use the rc.local script.
- Find and comment (or remove) this line in (for instance) /etc/udev/rules.d/05-udev-early.rules
#SUBSYSTEM=="module", OPTIONS="ignore_device"
- Make the rules file: /etc/udev/rules.d/52-xilinxusb.rules containing:
ENV{UDEVD_EVENT}=="1", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex -D $env{DEVNAME}"
ENV{UDEVD_EVENT}=="1", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex -D $env{DEVNAME}"
ENV{UDEVD_EVENT}=="1", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000b", RUN+="/sbin/fxload -v -t fx2 -I /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex -D $env{DEVNAME}"
ENV{UDEVD_EVENT}=="1", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex -D $env{DEVNAME}"
ENV{UDEVD_EVENT}=="1", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex -D $env{DEVNAME}"
ACTION=="add", DEVPATH=="/module/windrvr6", RUN+="/bin/rm -f /dev/windrvr6"
ACTION=="add", DEVPATH=="/module/windrvr6", PROGRAM="/bin/grep windrvr6 /proc/devices" RUN+="/bin/mknod -m 0666 /dev/windrvr6 c %c{1} 0"
ACTION=="remove", DEVPATH=="/module/windrvr6", RUN+="/bin/rm -f /dev/windrvr6"
ACTION=="add", DEVPATH=="/module/xpc4drvr", RUN+="/bin/rm -f /dev/xpc4_?"
ACTION=="add", DEVPATH=="/module/xpc4drvr", PROGRAM="/bin/grep xpc4drvr /proc/devices" RUN+="/bin/mknod -m 0666 /dev/xpc4_0 c %c{1} 0"
ACTION=="add", DEVPATH=="/module/xpc4drvr", PROGRAM="/bin/grep xpc4drvr /proc/devices" RUN+="/bin/mknod -m 0666 /dev/xpc4_1 c %c{1} 1"
ACTION=="add", DEVPATH=="/module/xpc4drvr", PROGRAM="/bin/grep xpc4drvr /proc/devices" RUN+="/bin/mknod -m 0666 /dev/xpc4_2 c %c{1} 2"
ACTION=="add", DEVPATH=="/module/xpc4drvr", PROGRAM="/bin/grep xpc4drvr /proc/devices" RUN+="/bin/mknod -m 0666 /dev/xpc4_3 c %c{1} 3"
ACTION=="remove", DEVPATH=="/module/xpc4drvr", RUN+="/bin/rm -f /dev/xpc4_?"
- run 'udevcontrol reload_rules'
[HOWTO Xilinx - Gentoo Linux Wiki]
Other Links
[Xilinx USB cable in Fedora 7]
[XILINX JTAG tools on Linux without proprietary kernel modules]




