On Ubuntu Server 22.04 LTS (no GUI), I installed Xilinx ISE 14.7 including cable drivers, but the cable driver installation failed with:

Installing hotplug script.....
error: failed to install hotplug script "/etc/hotplug/usb/digilentusb"
error: failed to install Adept Runtime, exitcode = 4
See "/opt/Xilinx/14.7/ISE_DS/common/bin/lin64/digilent/digilent.adept.runtime_2.13.1-x86_64/README" for information regarding installation.
[...]
error: one or more components failed to install
[...]
--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.

--real rc=2

--Driver installation failed.

--Digilent Return code = 9
--Xilinx Return code = 1
--Return code = 1

So then I installed the cable drivers via cd /opt/Xilinx/Vivado/2024.2/data/xicom/cable_drivers/lin64/install_script/install_drivers && sudo ./install_drivers, which supposedly succeeded.

When I run source /opt/Xilinx/Vivado/2024.2/settings64.sh and program_ftdi -read now, I either get that no devices were found or that a device was found but I have no permission to access it.

I also get:

❯ /usr/sbin/fxload -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xp2.hex -D /dev/bus/usb/001/002
can't modify CPUCS: Broken pipe

I just want to flash my Urukuls from my Ubuntu Server 22.04 LTS (no GUI).

Has anybody made the flashing work on headless Ubuntu? If yes, how? With what udev rules?

Or must I absolutely use Windows? If yes, what do I need to install on it (aside from Xilinx ISE 14.7)?

Nobody is using Windows here (except, regrettably, for Altium Designer). Urukul can be flashed without the Xilinx tools and using xc3sprog instead, as explained in the repository's README.

    sb10q It errors out:

    ❯ ./flash_xc3.sh jtaghs2
    + xc3sprog -c jtaghs2 -m /opt/Xilinx/14.7/ISE_DS/ISE/xbr/data -v build/urukul.jed:w
    XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
    Free software: If you contribute nothing, expect nothing!
    Feedback on success/failure/enhancement requests:
    	http://sourceforge.net/mail/?group_id=170565 
    Check Sourceforge for updates:
    	http://sourceforge.net/projects/xc3sprog/develop
    
    Using built-in device list
    Using built-in cable list
    Cable jtaghs2 type ftdi VID 0x0403 PID 0x6014 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 60
    Could not open FTDI device (using libftdi): unable to fetch product description
    Unable to access FTDI device with either libftdi or FTD2XX

    I believe the reason that it errors out is

    ❯ /usr/sbin/fxload -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xp2.hex -D /dev/bus/usb/001/002
    can't modify CPUCS: Broken pipe

    from my post above. Both commands are from the README on https://git.m-labs.hk/M-Labs/urukul-pld.

    Do you know what I should do?

    To make really sure that the problem wasn't my software installations:

    • I plugged out the Digilent JTAG-HS2 cable.
    • I deleted all Xilinx-relevant rules in /etc/udev/rules.d/.
    • Finally, I restarted the computer.

    Then I plugged the cable back in and got:

    ❯ /usr/sbin/fxload -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xp2.hex -D /dev/bus/usb/001/003
    Permission denied : /dev/bus/usb/001/003

    and

    ❯ sudo /usr/sbin/fxload -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xp2.hex -D /dev/bus/usb/001/003
    can't modify CPUCS: Broken pipe

    Do you know what I can do?

    Yeah I'm not sure where this fxload step is coming from and I don't recall ever needing it. AFAIK recent cables are just a FTDI chip and they do not need any firmware (i.e. not the Digilent Adept Runtime either).

      sb10q The cable / FTDI chip might not need firmware, but they do need Digilent Adept to be installed on Ubuntu. I know, because I tried to flash my Urukul also before installing anything from Digilent Adept on Ubuntu and I got (the aforementioned):

      ❯ ./flash_xc3.sh jtaghs2
      + xc3sprog -c jtaghs2 -m /opt/Xilinx/14.7/ISE_DS/ISE/xbr/data -v build/urukul.jed:w
      XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
      Free software: If you contribute nothing, expect nothing!
      Feedback on success/failure/enhancement requests:
      	http://sourceforge.net/mail/?group_id=170565 
      Check Sourceforge for updates:
      	http://sourceforge.net/projects/xc3sprog/develop
      
      Using built-in device list
      Using built-in cable list
      Cable jtaghs2 type ftdi VID 0x0403 PID 0x6014 Desc "Digilent USB Device" dbus data e8 enable eb cbus data 00 data 60
      Could not open FTDI device (using libftdi): unable to fetch product description
      Unable to access FTDI device with either libftdi or FTD2XX

      I do not know if Runtime and Utilities are both required or if one of them is enough.

      Sidenote: I also installed Digilent Adept SDK for Linux x64, but I assume that the SDK does not matter for the cable / chip.