~ruther/nix-fpga

ref: 3ddf1cf4c8a7518b812090949e0a9f15b95a6410 nix-fpga/pkgs/xilinx/ise/udev.nix -rw-r--r-- 1.1 KiB
3ddf1cf4 — Rutherther chore: add gitignore 1 year, 19 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ pkgs, fxload, ise-fw, ... }:

pkgs.writeTextFile {
  name = "ise-udev-rules";
  destination = "/etc/udev/rules.d/05-xilinx-ise.rules";
  text = ''
    # version 0003
    SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0008", MODE="666"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0007", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusbdfwu.hex -D $tempnode"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0009", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusb_xup.hex -D $tempnode"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000d", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusb_emb.hex -D $tempnode"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="000f", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusb_xlp.hex -D $tempnode"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0013", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusb_xp2.hex -D $tempnode"
    BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0015", RUN+="${fxload} -v -t fx2 -I ${ise-fw}/share/xusb_xse.hex -D $tempnode"
  '';
}
Do not follow this link