Ubuntu VM for LF - lf-lang/lingua-franca GitHub Wiki
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.
Downloads
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)
Base Image
Steps followed to produce this image
- 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)
Install packages
sudo apt install cmake curl g++ git libprotobuf-c-dev libprotobuf-dev maven openjdk-11-jre protobuf-c-compiler protobuf-compiler python3-pip
Install nodejs
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
lfc
and epoch
Install - 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)
Configure Firefox
- clear Firefox history
- set Firefox homepage to
https://wiki.lf-lang.org/
Known Issues (VirtualBox)
- 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).
Development Image
Steps followed to produce this image
lfvm-dev
Change hostname to - Change entry in
/etc/hostname
- Change entry in
/etc/hosts
Increase disk size
- 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
Install packages
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
riscv-gnu-toolchain
Install 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)
riscv-tools
Install 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