Thursday, January 12, 2012

sh can't open script? Quartus ii 11 + ubuntu 10.10


xx@xx-XXXXX:~/Quartus$ sh ./11.0sp1_quartus_free_linux.sh 
sh: Can't open ./11.0sp1_quartus_free_linux.sh


Solution:
http://ubuntuforums.org/showthread.php?t=1885162


bash ./11.0sp1_quartus_free_linux.sh


other problems report:
http://www.alteraforum.com/forum/showthread.php?t=31426


Installation guide:
http://fpga4u.epfl.ch/wiki/Install_Quartus_II#Download_the_Installer_2

Other installation problem:

./quartus: error while loading shared libraries: libsys_ictq.so: cannot open shared object file: No such file or directory

Cannot start the program:

Solution:

Repair broken link:

Add /opt/altera/version_number/quartus/linux(64)/

to ld.so.conf

Reference:
Lugman

Installation guide in PDF:
http://www.ece.auckland.ac.nz/~sinnen/QuartusII-on-UbuntuLinux.pdf

10.04 + Quartus 10
http://www.philpem.me.uk/elec/fpga/quartus-ubuntu/

Altera Wiki:
http://www.alterawiki.com/wiki/Quartus_for_Linux

Installation Manual from Altera official
http://www.altera.com/literature/manual/quartus_install.pdf


Right path to run program:

quartus/bin
http://alterauserforums.net/forum/showthread.php?p=117571

Make sure PATH point to quartus/bin

Install USB-Blaster Driver:

Please reference
Writing udev rules
http://www.reactivated.net/writing_udev_rules.html#syntax


Altera provides little support for the USB-Blaster drivers, only Red Hat is officially supported. Depending on your Linux distribution you will have to work a little to make it work. We will progressively add in the following subsections the information to install the USB-Blaster for each distribution. It will be difficult for us to test every distribution of Linux, so if your distribution is not listed there but one of the solution worked or if you had to look for a solution elsewhere, we encourage you to contribute to these subsections by sharing your experience.
To let users use the USB-Blaster device, you need to give them the right to. On Gentoo, you must add your user to the usb group (in /etc/group) to be able to program the device. On other distributions, you need to have write access to /proc/bus/usb/bus/id.
Here is an example for Ubuntu:
  • Create a new rule file with your favorite text editor (like vim):
sudo vim /etc/udev/rules.d/51-usbblaster.rules
  • Insert the following lines
# Altera USB-Blaster rule to set mode to 666.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chmod 0666 %c"
  • Load this new rule by typing:
sudo udevadm control --reload-rules



http://blog.codingwell.net/2011/03/quartus-programmer-linux.html


solve permission problem




We need to patch the JTAG server to look for devices in /sys/kernel/debug/usb/devices instead of /proc/bus/usb/devices, and in /dev/bus/usb/.../.../ instead of /proc/bus/usb/.../.../.
As the former won't fit in the string placeholder of the binary file, we choose to create a soft link.
sudo ln -s /sys/kernel/debug/usb/devices /dev/bus/usb/devices
This soft link will disappear on reboot, so if you don't want to type it every time, add this line in a script or in your /etc/rc.local file (without the sudo).
Now we will use sed to replace the paths that the JTAG server is looking at. There are 2 sets of commands, one for 32-bit OS and the other one for 64-bit. Select the set corresponding to your system. If you have a doubt, it won't harm to patch both files. Before executing the commands, replace<installation path> by your installation path (e.g., /opt/altera/10.0). Note that these commands will create a backup copy of the JTAG server (jtagd.bak).
For 32-bit OS:
sudo sed -i.bak 's/\/proc\/bus\/usb\/%03u\/%03u/\/dev\/bus\/usb\/%03u\/%03u\d0/g' <installation path>/quartus/linux/jtagd
sudo sed -i 's/\/proc\/bus\/usb\/devices/\/dev\/bus\/usb\/devices\d0/g' <installation path>/quartus/linux/jtag

sed
Search and Replace

Discussion on how to set up usb-blaster under ubuntu
http://www.alteraforum.com/forum/showthread.php?t=5893&page=7

USB configuration under debian:
http://www.eecg.toronto.edu/~laforest/USB-Blaster-Debian.html

2 comments:

  1. Thanks a lot! it was really helpful especially because you provided all information in a webpage.

    ReplyDelete
    Replies
    1. You are welcome, dude, the authors provide original solutions. Keep in touch. It seems we are in same path. Good Luck!

      Delete