(轉貼) 如何安裝Quartus II 8.0 for Linux? (SOC) (Quartus II) (Linux)

來源:互聯網
上載者:User

Abstract
Quartus II 8.0 for Linux的安裝方式。

Introduction
轉貼自NiosWiki的QuartusforLinux

The latest Altera Design Software 8.0 is supported on the following Linux operating systems and versions:

  •    Red Hat Enterprise Linux 3 (32 bit & 64 bit)
  •    Red Hat Enterprise Linux 4 (32 bit & 64 bit)
  •    SUSE 9 Enterprise Linux

You can use CentOS 4.6 , which is free and binary compatible with RHEL4.
You may find step by step guide on Linux installation and usage from Redhat's doc .
It is possible to use other Linux distro.
The procedures described here work with Ubuntu 8.04, Fedora 9 and Suse 10.3.
Make sure you have tcsh isntalled, otherwise install it, as root or via sudo
On Fedora,RHEL/Centos,
yum install tcsh
On Suse,
zypper install tcsh
On Debian/Ubuntu, (via sudo)
apt-get install tcsh
On Ubuntu, check if the default shell is "bash" , (the default might be "dash", which won't work with install scripts)
ls -l /bin/sh
This should give "/bin/sh -> bash",
Otherwise, change it with,
sudo rm /bin/sh
sudo ln -s bash /bin/sh
followed by a logout and log back in again.
The jtag port USB Blaster needs usbfs to work. On Ubuntu/Suse, add/edit the following line in the file /etc/fstab.
usbfs /proc/bus/usb usbfs devmode=0666 0 0
This will automatically mount the usbfs to the location /proc/bus/usb on startup. The mode will be set to 0666 which means that everyone can read/write the files that are created there.
Once the line has been added to /etc/fstab, you can mount the file system by entering the command
sudo mount /proc/bus/usb
You could also restart your system if that's easier.
You can download and install all Altera design suits from Altera's website.
ftp://ftp.altera.com/outgoing/release/80_altera_installer.tar
ftp://ftp.altera.com/outgoing/release/80_quartus_linux.tar
ftp://ftp.altera.com/outgoing/release/80_nios2eds_linux.tar
ftp://ftp.altera.com/outgoing/release/80_modelsim_ae_unix.tar
Put these files in a dir, as root or via sudo
tar xf 80_altera_installer.tar

ModelSim installation will fail with included install_download script. (have a look at /opt/altera8.0/download_install_8.0_log.txt)

Replace install_download file with: install_download (A patch is included)

./install_download
This will install the programs in the following default directories :
Quartus        = /opt/altera8.0/quartus
IP Megacore = /opt/altera8.0/ip
Nios II EDS   = /opt/altera8.0/nios2eds
Modelsim      = /opt/altera8.0/modelsim
(Ed., we don't need "8.0" numbered for each subdir when the parent dir already spelled it. while "nios2eds" and "ip" are more officially used by Altera.)
If you have a valid license file, it should be /opt/licenses/license.dat, and begin with
SERVER localhost <your nic> 1800
VENDOR alterad "/opt/altera8.0/quartus/linux/alterad"
VENDOR mgcld "/opt/altera8.0/modelsim/modeltech/linuxaloem/mgls/lib/mgcld"
....
Even if you  don't have the license to run quartus, you can still use other tools (such as jtag download and jtag debugger) for software development. Just ignore the license manager.
Then prepare data for jtag server. As root or via sudo.
mkdir /etc/jtagd
cp /opt/altera8.0/quartus/linux/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts
Add these lines to /etc/rc.local to start license manager and jtag server. As root or via sudo.
echo 356 40000 32 32000 > /proc/sys/kernel/sem
/opt/altera8.0/quartus/linux/lmgrd -c /opt/licenses/license.dat
/opt/altera8.0/quartus/bin/jtagd
(You may need to reboot, or you can run these command lines to start these servers)
Login as a user. Put this line in a script file , say "n2sdk", in ~/bin dir. remember "chmod +x n2sdk".
QUARTUS_ROOTDIR=/opt/altera8.0/quartus  /opt/altera8.0/nios2eds/sdk_shell
Open a shell terminal, enter "n2sdk". This will open a Bourne-again shell (bash) with a pre-configured environment.
------------------------------------------------
Welcome To Altera SOPC Builder
Version 8.0, Built Tue May 27 22:59:48 PDT 2008
------------------------------------------------
------------------------------------------------
Welcome to the Nios II Embedded Design Suite
Version 8.0, Built Tue May 27 23:54:28 PDT 2008
Example designs can be found in
    /opt/altera8.0/nios2eds/examples
------------------------------------------------
(You may add a startup script: /opt/altera8.0/nios2eds/user.bashrc)
~
[NiosII EDS]$
Now you can run quartus, just enter "quartus" in this command shell.
[NiosII EDS]$ quartus
If quartus ask you the license file for the first run, enter "1800@localhost" .
You can find more usage of command line tools on section 2-4 of  Embedded Design Handbook (highly recommended reading).
Now, you can install nios2gcc tools and uClinux-dist. Build the uClinux kernel image.
Next, create an empty file in your home directory named “.jtag.conf ”.
touch ~/.jtag.conf
Then plug in your USB Blaster, connect to your dev board (2C35 here).
You can try out the jtag port.
[NiosII EDS]$ jtagconfig
1) USB-Blaster [USB 5-1.2]
  020B40DD   EP2C35
[NiosII EDS]$ nios2-configure-sof /opt/altera8.0/nios2eds/examples/verilog/niosII_cycloneII_2c35/full_featured/NiosII_cycloneII_2c35_full_featured.sof
Info: *******************************************************************
Info: Running Quartus II Programmer
Info: Command: quartus_pgm --no_banner --mode=jtag -o p;/opt/altera8.0/nios2eds/examples/verilog/niosII_cycloneII_2c35/full_featured/NiosII_cycloneII_2c35_full_featured.sof
Info: Using programming cable "USB-Blaster [USB 5-1.2]"
Info: Started Programmer operation at Fri Dec  8 11:35:01 2006
Info: Configuring device index 1
Info: Device 1 contains JTAG ID code 0x020B40DD
Info: Configuration succeeded -- 1 device(s) configured
Info: Successfully performed operation(s)
Info: Ended Programmer operation at Fri Dec  8 11:35:04 2006
Info: Quartus II Programmer was successful. 0 errors, 0 warnings
    Info: Processing ended: Fri Dec  8 11:35:04 2006
    Info: Elapsed time: 00:00:22
[NiosII EDS$ nios2-download -g ~/uClinux-dist/images/zImage
Using cable "USB-Blaster [USB 5-1.2]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 1016KB in 16.2s (62.7KB/s)
Verified OK
Starting processor at address 0x04500000
[NiosII EDS$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [USB 5-1.2]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.17-uc1 (hippo@darkstar) (gcc version 3.4.6) #46 PREEMPT Thu Dec 7 15:22:06 CST 2006
You can try out flash programmer, or add flash file conversion to your build script. Or run GDB debugger.
Happy hacking.
Miscelaneus Fixes

  1. If the Nios II EDS installer does not work, edit the install script at line 143 :
         From : x=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${x/~/$HOME}
         To     : ##x=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${x/~/$HOME}
  2. If the modelsim installer doesnt work, edit the install.ms script :
    At line 172 :
        From    : tar xfo {$script_path}/modeltech_altera_unix.tar
        To        : tar xfo {$script_path}/modeltech_altera_unix.tar --no-same-permissions
    At line 174 :
        From    : tar xfo {$script_path}/modeltech_altera_unix.tar $file1.Z $file2.Z $file3.Z
        To        : tar xfo {$script_path}/modeltech_altera_unix.tar $file1.Z $file2.Z $file3.Z --no-same-permissions
  3. If the SOPC builder keeps giving language error (minor problem). This is an issue with Perl. To fix it, type this in a terminal :
           cd /usr/lib/locale
           cp -r en_US.utf8 en_US
  4. To fix the “Unknown Linux Processor” issue, download the file 'arch' and put it in /bin. You will need administrator access to do this.
  5. Sometimes the Licences in Quartus menu will not open. This can be solved by copying the provided file 'libX11.so.6.2' into/opt/altera7.2/quartus/linux. You will need administrator privileges. Then type this in a terminal:
         cd /opt/altera7.2/quartus/linux
         sudo ln -s libX11.so.6.2 libX11.so.6
Old info (outdated)

The version of Linux distro is important. Some latest distro use udev, and need extra hacking, see Instalation on unsupported distributions. Though it is possible to use other Linux disto or version, it might be difficult for newbies.
To install Altera Design Software 7.2 in Ubuntu Linux, follow this step by step tutorial : Altera Software Installation Tutorial for Ubuntu.pdf
This tutorial show how to install all the tools including setting up usbfs for USB blaster. It might also apply for other Linux distros based on Debian.

See Also
(轉貼) 如何安裝Quartus II 6.1 for Linux? (SOC) (Quartus II) (Linux)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.