-
Notifications
You must be signed in to change notification settings - Fork 63
Ubuntu VM for LF
Marten Lohstroh edited this page Oct 5, 2021
·
26 revisions
For convenience, we have prepared a VM image that has Lingua Franca and all of its dependencies installed. We provide a base image, which is more compact and intended for quick experimentation with LF, and a development image, which is set up as a full development environment for (new) LF contributors.
Go to https://vm.lf-lang.org/ and download one of the following images:
- Base Image
x86_64
:Ubuntu-for-LF.ova
(4.6GB) - Development Image
x86_64
:Ubuntu-for-LF-dev.ova
(TBA)
- Create a new VirtualBox image with 4 GB RAM, 32 GB disk space (dynamically allocated), 96 MB video, 4 CPUs
- Install 20.04.3 LTS Desktop (minimal installation)
- Set hostname:
lfvm
; user:lfvmu
(LF VM User); and password:lfvmu
(auto login) - Disable automatic screen lock
- Set screen resolution to 1360x768 (16:9)
sudo apt install cmake curl g++ git libprotobuf-c-dev libprotobuf-dev maven openjdk-11-jre protobuf-c-compiler protobuf-compiler python3-pip
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install 14.18.0
npm install -g pnpm
- Add
PATH="$HOME/.nvm/versions/node/v14.18.0/bin:$PATH"
to~/.profile
- Download artifacts from release page
- Add
lfc
andepoch
to$PATH
by adding these two lines to~/.profile
:
PATH="$HOME/lf-tools/epoch:$PATH"
PATH="$HOME/lf-tools/lfc/bin:$PATH"
- Create epoch.desktop in
~/.local/share/applications
(or/usr/share/applications
) with following contents:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Epoch IDE
Comment=IDE for Lingua Franca
Exec=/home/lfvmu/lf-tools/epoch/epoch
Icon=/home/lfvmu/lf-tools/epoch/icon.xpm
Terminal=false
chmod +x epoch.desktop
- Add
epoch
to favorites (Gnome dock)
- clear Firefox history
- set Firefox homepage to
https://wiki.lf-lang.org/
- Problem (1): Copy/paste between the host and VM (and vice versa) do not seems to work, even though the machine is configured with bidirectional copy/paste.
- Problem (2): The resolution does not match the host OS.
- Solution: Install "VirtualBox Guest Additions" (i.e., find the specific iso provided for your guest OS, load it in the virtual CD drive, and then install it on the guest OS).
- Change entry in
/etc/hostname
- Change entry in
/etc/hosts
- Increase size of
Ubuntu-for-LF-dev.vdi
to 96GB -
sudo apt install gparted
andsudo gparted
; increase/dev/sda2
(ext. partition) and/dev/sda5
(primary partition mounted as/
) to 96GB
-
sudo apt install
the following packages:
autoconf automake autotools-dev bc build-essential bison curl device-tree-compiler flex gawk gperf libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev libexpat-dev libtool patchutils pkg-config texinfo verilator zlib1g-dev
git clone https://github.com/riscv/riscv-gnu-toolchain
./configure --prefix=/opt/riscv --enable-multilib
make
- Add
/opt/riscv/bin
to$PATH
(/etc/profile
since the install is global as well)
git clone https://github.com/riscv-software-src/riscv-tools.git
-
cd riscv-tools
, then:
$ git submodule update --init --recursive
$ export RISCV=/opt/riscv/tools
$ ./build.sh