Skip to content

Virtual machine set up

Julius Baxter edited this page May 22, 2014 · 3 revisions

This page will indicate how to configure and run the VM (virtual machine) which contains all of the required tools to do the workshop.

The basics

The VM runs on [Oracle's VirtualBox] (https://www.virtualbox.org/wiki/VirtualBox) software. You will need to install this and a couple of add-ons for your platform.

The VM has the 32-bit [Ubuntu 14.04] (http://www.ubuntu.com/) operating system installed, along with everything described on the [OpenRISC tools install page] (https://github.com/embecosm/chiphack/wiki/OpenRISC-tools-install). It is set up and ready to go. All you need to do is get the VM running. You may need the username and password. They are

User: openrisc

Password: or1k

The system has SSH enabled on port 22 to allow people to run in headless mode if they prefer.

Download and extract the VM image

VM download link goes here

The VM image is 6 gigabytes compressed and uncompresses to around 18 gigabytes so ensure you have sufficient disk space to do this. The image has a dynamically sized disk which will get up to 32GB if needed, so to be safe I'd say you'd want at least 40GB spare before you attempt this.

Set up

Install VirtualBox

You will need the VM client to run the image. It was made with VirtualBox version 4.2.16, so something about as new, or newer, than that is going to be a good start. I was able to do this easily on Ubuntu by running apt-get install virtualbox but your mileage may vary depending on your distro.

Otherwise you can download it from the Virtualbox site: https://www.virtualbox.org/wiki/Downloads

Install the extensions

We will need the extension pack so that we can pass through the USB to the VM (otherwise you won't be able to interact with the board).

[This guide provided good details on going about this] (http://www.virtualbox.org/manual/ch01.html#intro-installing).

Notes for installing VirtualBox on a Linux machine

Add user to vboxusers

The host user will need to be added to the vboxusers group. Do this with

sudo usermod -a -G vboxusers your-username

You will have to log out and log back into your machine for this group change to take effect.

Notes for installing VirtualBox on a Windows machine

Please put them here.

Loading the VM image

Once VirtualBox is installed and the VM image has been uncompressed, point VirtualBox at the openrisc-vm directory containing the image.

VM configuration

Some config may need to be tweaked to get the VM running on your machine.

Networking

The VM has been configured with [bridged networking] (http://www.virtualbox.org/manual/ch06.html#network_bridged) however you may need to switch it to use NAT (Network Address Translation) in the VM's settings (Settings->Network->Attached to) before the VM will be able to talk to the outside world.

Window size

For those that don't want to X forward over SSH, the VM is stuck at 640x480. To have the VM resize to the containing window size, the virtualbox-guest-dkms packaged was needed to be installed with apt-get.

Run as root to get the USB to attach

Some people have reported that the VM needed to be run as root user (so, something like sudo virtualbox) in order to get it to talk to the USB ports successfully. This may change depending on your udev rules for the Altera Blaster (DE0 nano) device.

It's possible [this] (https://groups.google.com/forum/#!msg/chiphack/tgKmx7DSeVA/neimY9Xmy5sJ) will fix it.