2010-09-01

Altera Quartus II Web Edition 10.0 with Lucid 64-bit, part 2

Today I finally managed to do my first "design" using Quartus II on Linux. It all went fairly well (thanks to various references and trial and error), but when programming was attempted, no hardware was supported.

"Oh well, must be some usb-device permission thingy", so after writing an udev permissions rule, I tried again. Still no hardware detected. How odd.

After several straces and googling like crazy, the issue seems to be that usbfs is missing from Lucid's kernel. And from the various messages and bug tracker entries, it's not coming back.

usbfs was mounted on /proc/bus/usb previously, but has been more or less replaced by udev (/dev/bus/usb).

After digging some more around, probably the best reference for the "solution" was this forum posting. The solution I opted to implement in the end was this:
  1. sudo mount --bind /dev/bus /proc/bus
  2. sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices
Yes, it's completely evil and you'll need to do the kludge after each reboot (but not too early, since it hides /proc/bus/pci and /proc/bus/input).

After the kludge, this is what jtagconfig says:
czr@igor:~/altera/10.0/quartus/bin$ bash ./jtagconfig
/home/czr/altera/10.0/quartus/adm/qenv.sh: line 109: warning: setlocale: LC_CTYPE: cannot change locale (en_US): No such file or directory
1) USB-Blaster [USB 2-1.2]
020B30DD EP2C15/20
So yes, it's a victory. Now Quartus also finds the USB-blaster (I'm using an older devkit with Cyclone II).

As a result, my infinitely simple (but probably quite patentable) "Three ANDs and an OR" circuit with 6 switch inputs and one LED output finally works. So, next step is obviously some "?" before the last step "profit".

Anyhow, thanks Altera for making an Linux version, and hopefully you'll manage to fix your programs so that they will work directly via udev built namespace soon (Quartus II 10.1 should be out before the end of this year).