This is currently a work in progress translation of dries007's Arch install guide into a Gentoo install guide.
This guide provides an ebuild that you can use to install Quartus Prime (Lite Edition) and ModelSim 17.1 in Gentoo. This guide assumes you have created a local overlay; see this Gentoo guide on making your own overlay. Make sure that repoman
is installed.
- If you don't want to go through all of the formalities of installing through portage, you can just run the shell commands; in this case it might be simpler to refer to the original guide by dries007.
- However, the advantage of installing this through portage is that the proprietary installation binary runs in portage's sandbox to install into a temporary directory, and then before the files are merged into your actual filesystem portage checks for file conflicts. This means that if the proprietary installation binary breaks something on your system, it will be much more likely to error out (or at least warn you and give you a chance to control-C) instead of silently finishing.
- Don't use the attached ebuilds as references on how to write ebuilds. I did not attempt to follow best practices, I just needed something that would work quickly.
Download Quartus-lite-17.1.1.593-linux.tar
. Note that this will be under "Updates -> Complete Download". Check that the md5sum matches, and then move it to your DISTDIR (i.e. /usr/portage/distfiles).
Ensure that the following permissions are set:
-rw-rw-r-- 1 portage portage 8.1G Apr 10 23:59 /usr/portage/distfiles/Quartus-lite-17.1.1.593-linux.tar
If you know how to add ebuilds to your overlay you can probably do that and then skip to the During Install instructions (you will need to interact with a GUI and disable some options or the install will not work).
In your local overlay make sure sci-electronics/quartus-prime-lite
exists and put quartus-prime-lite-<version>.tar
in that folder. Then run repoman manifest
as root / portage (Quartus-lite-17.1.1.593-linux.tar
needs to already be in your DISTDIR for this to work).
If your setup is the same as mine (local overlay at /usr/local/portage
, have sudo
installed), then the following commands should accomplish this (don't just copy and paste them, execute them one at a time after understanding what they do and changing them according to your own situation):
sudo -u portage -s
mkdir -p /usr/local/portage/sci-electronics/quartus-prime-lite
cp <wherever you put quartus-prime-lite-17.1.1.593.ebuild> \
/usr/local/portage/sci-electronics/quartus-prime-lite-17.1.1.593.ebuild
# now go back to your user
exit
sudo repoman manifest
Then
sudo emerge -a =sci-electronics/quartus-prime-lite-17.1.1.593
A GUI window will pop up after it unpacks and starts running.
You need to accept the license to install. Keep the install path the same (should be something like /var/tmp/portage/<package>/otherstuff
). If you change it, the ebuild will not work.
When you see the prompt for the components to install, you must disable the following components:
- Help (near the top)
- ModelSim (near the bottom)
If you do not disable these components, the installer will hang. ModelSim will be installed separately later.
You can also pick and choose which FPGA boards to install support for at this step.
If you followed the above instructions, the installer should finish successfully and the emerge
command will finish. Quartus Lite will now be installed in /opt/quartus-lite-17.1.1.593
.
Also note that there is a bug with the installer that causes the installation to hang at the end; there is no way to work around this other than killing the program manually, whether you manually install or use the ebuild.
You need to download the setup file yourself Easy DL link. I recommend checking the md5sum after it finished downloading. Place it in your DISTDIR (i.e. /usr/portage/distfiles).
Then, download dries007's libfreetype tarfile and put it in your DISTDIR.
Ensure that the following permissions are set:
-rw-rw-r-- 1 portage portage 1.2G Apr 17 23:16 /usr/portage/distfiles/ModelSimSetup-17.1.0.590-linux.run
-rw-rw-r-- 1 portage portage 460K Apr 18 08:30 /usr/portage/distfiles/lib32-freetype2-2.5.0.1.tar.xz
Then follow more or less the same instructions as for Quartus to make sci-electronics/quartus-prime-lite-modelsim
and add quartus-prime-lite-modelsim-17.1.0.590.ebuild
to your local overlay.
Run emerge
:
emerge -a =sci-electronics/quartus-prime-lite-modelsim-17.1.0.590
You will need to manually kill the ModelSim installer or emerge
will never finish. To do this, wait for your computer fan / CPU usage to abruptly die down, then run ps aux | grep ModelSim
(or in some other way get the PID of the installer process), and then run kill <the PID number you found>
as root (don't kill the emerge
process, just the ModelSim installer). The emerge
command should then finish and you should be able to run ModelSim with /opt/quartus-prime-lite-modelsim-17.1.0.590/modelsim_ase/bin/vsim
. Or, if you want to use ModelSim in Quartus, proceed to Setting ModelSim path in Quartus near the bottom.
Manual installation into your home directory (~/intelFPGA/17.1
in this guide, replace this with whatever you want)
- Install dependencies (both 32 and 64 bit is required, the use flag is
abi_x86_32
inpackage.use
)- Note that unless otherwise stated, these might be named something different in Gentoo, since these are just the names taken from the Arch guide
- 64 bit:
expat fontconfig freetype2 xorg-fonts-type1 glibc gtk2 libcanberra libpng libpng12 libice libsm util-linux ncurses tcl tcllib zlib libx11 libxau libxdmcp libxext libxft libxrender libxt libxtst
- 32 bit
lib32-expat lib32-fontconfig lib32-freetype2 lib32-glibc lib32-gtk2 lib32-libcanberra lib32-libpng lib32-libpng12 lib32-libice lib32-libsm lib32-util-linux lib32-ncurses lib32-zlib lib32-libx11 lib32-libxau lib32-libxdmcp lib32-libxext lib32-libxft lib32-libxrender lib32-libxt lib32-libxtst
- ncurses 5 must be installed: in Gentoo this means install
/usr/portage/sys-libs/ncurses/ncurses-5.<INSERT CURRENT VERSION>
- Run setup file, from console, install in default location (
~/intelFPGA/17.1
) The setup hangs after completing. To kill it, wait until you are pretty sure it is done (your computer's fan will probably abruptly calm down / your CPU usage will go down), and then do something like this: runps aux | grep ModelSim
and you should find one process (the hanging installer). Runkill <the PID number you found>
as root. - Get
lib32-freetype2-2.5.0.1
and unpack libs to~/intelFPGA/17.1/modelsim_ase/lib32
- Modify the startup script (
~/intelFPGA/17.1/modelsim_ase/vco
)- Replace
linux_rh60
withlinux
- Add
LD_LIBRARY_PATH=${dir}/lib32
after$dir
is set
- Replace
Open Quartus and click on Tools --> Options, and then in the window that pops up go to EDA Tool Options. In ModelSim-Altera put /opt/quartus-prime-lite-modelsim-17.1.0.590/modelsim_ase/bin
and click OK.