[[ubuntu_virtual_cae_system]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
ubuntu_virtual_cae_system [2019/03/27 14:20]
beckmanf [Preconfigured VirtualBox virtual machine] Replaced my vm with Hans vm
ubuntu_virtual_cae_system [2020/03/22 13:49]
beckmanf install 13.0sp1 on lubuntu 18.04 64bit
Line 5: Line 5:
 ==== Preconfigured VirtualBox virtual machine ==== ==== Preconfigured VirtualBox virtual machine ====
  
-Hans Färber has build a [[https://​www.hs-augsburg.de/​homes/​haf/​php/​dokuwiki/​doku.php?​id=public:​praktikum_digitaltechnik:​cae-virtual-machine:​caevm-install|preconfigured virtual cae machine]] based on Lubuntu. ​+Hans Färber has build a [[https://​www.hs-augsburg.de/​homes/​haf/​php/​dokuwiki/​doku.php?​id=public:​praktikum_digitaltechnik:​cae-virtual-machine:​caevm-install|preconfigured virtual cae machine]] based on Lubuntu. 
 + 
 +===== Install on Lubuntu 18.04 LTS ===== 
 + 
 +[[vcae-lubuntu-18.04|Install on Lubuntu 18.04]] 
 + 
 + 
 +===== Build your own from scratch (NEW) ===== 
 + 
 +The base system is Lubuntu 18.04 LTS. Download the  
 + 
 +==== Virtual Machine ==== 
 + 
 +There are different virtual machine environments.  
 + 
 +== VMWare == 
 + 
 +VMWare(r) provides a commercial version VMWare Fusion for Mac OS(r). This has a very good integration in MacOS and I use it with MacOS 10.13.6 (High Sierra). It is not free. For Windows(r) there is the VMWare Player. The VMWare Player is free. I have not tested it.  
 + 
 +== VirtualBox == 
 + 
 +VirtualBox(r) is available for Windows, Linux and Mac OS. It is free. From my experience with MacOS it is not as good integrated as VMWare Fusion.  
 + 
 +=== Get the virtual machine === 
 + 
 +Download and install the the virtual machine software from [[https://​www.virtualbox.org|https://​www.virtualbox.org]] 
 + 
 + 
 +=== Get the Lubuntu 18.04 install image === 
 + 
 +Download the ISO file for the 64 Bit Lubuntu 18.04.4 LTS Desktop version. You can download the image from here: 
 + 
 +[[http://​cdimage.ubuntu.com/​lubuntu/​releases/​18.04.4/​release/​lubuntu-18.04.4-desktop-amd64.iso]] 
 + 
 + 
 +=== Install the Lubuntu machine === 
 + 
 +This depends on the virtualization environment that you use. 
 + 
 +== VMWare == 
 + 
 +Create a new virtual machine with minimum 20GB hard disk. The hard disk will result in a file on the host operating system (Here MacOs) but the file size on the host will be dynamic, i.e. it will depend on the actual usage in the virtual machine. I have selected 300GB. Use the username "​caeuser"​ with password "​caeuser"​ because that is the setting in the lab and all descriptions are based on this. The name of your computer shall be "​vcae"​.  
 + 
 +You need to install the guest additions. Without the guest additions, the interaction with the host system is not working (file sharing / Clipboard). Run "​Virtuelle Maschine -> VMWare Tools installieren"​ in the VMWare menu. Then run the following:​ 
 + 
 +<​code>​ 
 +cd 
 +mkdir vmware 
 +cp /​media/​caeuser/​VMwareTools-<​versionnumber>​ vmware 
 +cd vmware 
 +tar -xvzf VMwareTools-<​versionnumber>​ 
 +cd vmware-tools-distrib 
 +sudo ./​vmware-install.pl  
 +</​code>​ 
 + 
 +Say "​yes"​ to all questions... 
 + 
 + 
 +== Virtualbox == 
 + 
 +to be done 
 + 
 + 
 +===== Install Quartus 13.0.1 ===== 
 + 
 +Install the software at "/​opt/​altera/​13.0.sp1"​. Create the altera directory and change the owner to your username.  
 + 
 +<​code>​ 
 +sudo mkdir /​opt/​altera 
 +sudo chown caeuser:​caeuser /​opt/​altera 
 +</​code>​ 
 + 
 +==== Install 32Bit Libraries ​ ==== 
 + 
 +Quartus and Modelsim require 32Bit Libraries which are not installed by default.  
 + 
 +Enable multiple architectures (32 Bit / 64 Bit) 
 + 
 +<​code>​ 
 +sudo dpkg --add-architecture i386 
 +sudo apt-get update 
 +</​code>​ 
 + 
 +Install the 32Bit libraries 
 + 
 +<​code>​ 
 +sudo apt-get install libc6:i386 libpng16-16:​i386 libfreetype6:​i386 libsm6:i386 libxrender1:​i386 libfontconfig1:​i386 libxext6:​i386 libxft2:​i386 libncurses5:​i386 
 +</​code>​ 
 + 
 +=== Missing libpng12 === 
 + 
 +The quartus software requires the libpng12 library but Lubuntu 18.04 comes with libpng16. If you do not install libpng12, then the following error will occur: 
 + 
 +<​code>​ 
 +fritz@vcae:​~$ quartus 
 +quartus: error while loading shared libraries: libpng12.so.0:​ cannot open shared object file: No such file or directory 
 +caeuser@vcae:​~$  
 +</​code>​ 
 + 
 +The following check shows that libpng16 is installed but quartus needs libpng12. 
 +<​code>​ 
 +fritz@vcae:​~$ dpkg -l | grep png 
 +ii  libpng16-16:​amd64 ​                    ​1.6.34-1ubuntu0.18.04.1 ​            ​amd64 ​       PNG library - runtime (version 1.6) 
 +caeuser@vcae:​~$ 
 +</​code>​ 
 + 
 +So download, compile and copy the libpng12 library to the quartus install directory. You have to install both, the 32bit and the 64bit versions. 
 + 
 +<​code>​ 
 +cd 
 +cd cae 
 +sudo apt install build-essential gcc-multilib zlib1g-dev:​i386 
 +wget https://​www.hs-augsburg.de/​homes/​beckmanf/​public/​libpng-1.2.59.tar.gz 
 +tar -xvzf libpng-1.2.59.tar.gz 
 +cd libpng-1.2.59 
 +CFLAGS='​-m32'​ ./configure --libdir=/​usr/​lib/​i386-linux-gnu 
 +make 
 +sudo make install 
 +make clean 
 +./configure --libdir=/​usr/​lib/​x86_64-linux-gnu 
 +make 
 +sudo make install 
 +</​code>​ 
 + 
 +==== Download and install Quartus 13.0sp1 ==== 
 + 
 +The following steps will install  
 + 
 +  * Altera Quartus II Web Edition Version 13.0sp1 (13.0.1 build 232) 
 +  * Modelsim Altera Starter Edition Version 10.1d (included in 13.0sp1) 
 + 
 +These versions are required for the Altera DE1 board which is used in the digital design lab and is available in the library. This Quartus version is the last version that supports the Altera Cyclone II FPGA which is on that board. So do not install a later version if you want to use that board. 
 + 
 +<​code>​ 
 +cd 
 +mkdir cae 
 +cd cae 
 +wget http://​www.hs-augsburg.de/​~beckmanf/​public/​Quartus-web-13.0.1.232-linux.tar 
 +tar -xvf Quartus-web-13.0.1.232-linux.tar 
 +./​setup.sh 
 +</​code>​ 
 + 
 +The installation directory is /​opt/​altera/​13.0sp1. You do not need to install the Arria, Cyclone V and MAX device support. Choose the ModelSim-Altera Starter Edition (Free). The Help files are optional. 
 + 
 +In order to be able to start the binaries from the commandline,​ the path for the binaries has to be in the PATH environment variable. For that you have to modify the .profile file in your home directory. Append the following snippet to the .profile file with [[http://​heather.cs.ucdavis.edu/​~matloff/​UnixAndC/​Editors/​ViIntro.html|vi]]. 
 + 
 +<code bash .profile>​ 
 +# Include the ALTERA fpga software 
 +PATH="​$PATH:/​opt/​altera/​13.0sp1/​quartus/​bin"​ 
 +# Include the ALTERA Modelsim VHDL simulator 
 +PATH="​$PATH:/​opt/​altera/​13.0sp1/​modelsim_ase/​bin"​ 
 +</​code>​ 
 + 
 +Then you have to logout and login again to make the changes active. 
 + 
 +=== Fix linux_rh60 vco script problem === 
 + 
 +When you run modelsim and see: 
 + 
 +<​code>​ 
 +caeuser@vcae:​~/​cae$ vsim 
 +Error: cannot find /​opt/​altera/​13.0sp1/​modelsim_ase/​bin/​../​linux_rh60/​vsim 
 +caeuser@vcae:​~/​cae$ 
 +</​code>​ 
 + 
 +then, you have to fix the vco script. First change the permissions such that you can modify the script. 
 + 
 +<​code>​ 
 +cd /​opt/​altera/​13.0sp1/​modelsim_ase 
 +chmod u+w vco 
 +</​code>​ 
 + 
 +Open the vco with 
 + 
 +<​code>​ 
 +vi vco 
 +</​code>​ 
 + 
 +and find the following section 
 + 
 +<​code>​ 
 +      else 
 +        case $utype in 
 +          2.4.[7-9]*) ​      ​vco="​linux"​ ;; 
 +          2.4.[1-9][0-9]*) ​ vco="​linux"​ ;; 
 +          2.[5-9]*) ​        ​vco="​linux"​ ;; 
 +          2.[1-9][0-9]*) ​   vco="​linux"​ ;; 
 +          3.[0-9]*) ​            ​vco="​linux"​ ;; 
 +          *)                vco="​linux_rh60"​ ;; 
 +</​code>​ 
 + 
 +And change the "​linux_rh60"​ entry to "​linux"​. 
 + 
 +=== Fix the libfreetype problem === 
 + 
 +If you see 
 + 
 +<​code>​ 
 +caeuser@ADLab-Tools-OS:​~$ vsim 
 +Error in startup script: 
 +Initialization problem, exiting. 
 + 
 +Initialization problem, exiting. 
 + 
 +    while executing 
 +"​InitializeINIFile quietly"​ 
 +    invoked from within 
 +"​ncFyP12 -+" 
 +    (file "/​mtitcl/​vsim/​vsim"​ line 1) 
 +** Fatal: Read failure in vlm process (0,0) 
 +caeuser@ADLab-Tools-OS:​~$ 
 +</​code>​ 
 + 
 +then you have to install an old version of libfreetype. Enable the deb-src packages in the /​etc/​apt/​sources.list file to make the build dependencies work. It should look like this: 
 + 
 +<​code>​ 
 +#deb cdrom:​[Lubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/​ bionic main multiverse restricted universe 
 + 
 +# See http://​help.ubuntu.com/​community/​UpgradeNotes for how to upgrade to 
 +# newer versions of the distribution. 
 +deb http://​de.archive.ubuntu.com/​ubuntu/​ bionic main restricted 
 +deb-src http://​de.archive.ubuntu.com/​ubuntu/​ bionic main restricted 
 + 
 +## Major bug fix updates produced after the final release of the 
 +## distribution. 
 +deb http://​de.archive.ubuntu.com/​ubuntu/​ bionic-updates main restricted 
 +deb-src http://​de.archive.ubuntu.com/​ubuntu/​ bionic-updates main restricted 
 +</​code>​ 
 + 
 +Then do the following 
 + 
 +<​code>​ 
 +cd 
 +cd cae 
 +sudo apt update 
 +sudo apt build-dep -a i386 libfreetype6 
 +wget https://​download.savannah.gnu.org/​releases/​freetype/​freetype-2.4.7.tar.gz 
 +tar -xvzf freetype-2.4.7.tar.gz 
 +cd freetype-2.4.7 
 +CFLAGS='​-m32'​ ./configure  
 +make -j8 
 +</​code>​ 
 + 
 +Now copy the libfreetype library files to the modelsim directory 
 + 
 +<​code>​ 
 +mkdir /​opt/​altera/​13.0sp1/​modelsim_ase/​lib32 
 +cp objs/​.libs/​libfreetype.so* /​opt/​altera/​13.0sp1/​modelsim_ase/​lib32/​ 
 +</​code>​ 
 + 
 +Now you have to change modelsim vco file and find the location: 
 + 
 +<​code>​ 
 +dir=`dirname "​$arg0"​` 
 +</​code>​ 
 + 
 +After that line add 
 + 
 +<​code>​ 
 +export LD_LIBRARY_PATH=/​opt/​altera/​13.0sp1/​modelsim_ase/​lib32 
 +</​code>​ 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
  
 ===== Build your own from scratch (Ubuntu 12.04) ===== ===== Build your own from scratch (Ubuntu 12.04) =====
  • ubuntu_virtual_cae_system.txt
  • Last modified: 2024/06/03 00:28
  • by beckmanf