[CSE]  Advanced Operating Systems 
COMP9242 2018/S2 
UNSW
CRICOS Provider
Number: 00098G

PRINTER Printer-Friendly Version

Developing your AOS on the Virtual Machine

If you would like to work locally on your own machine running Windows or macOS (away from the CSE labs), the easiest way is to run Linux in a virtual machine. If you are the really adventurous type, you might try to port the tools via cygwin, but you will get stuck when it comes to serving NFS on Windows for the project. So don't waste your time.

Installing VirtualBox

We suggest installing Oracle VM VirtualBox in which to run the virtual machine.

  1. Install VirtualBox for Windows or macOS.
  2. Open the Oracle VM VirtualBox Extension Pack with VirtualBox to install it. (This is needed to support the passing the USB 3 ethernet adaptor to the virtual machine.)

Installing a Copy of the Virtual Machine

We provide a Ubuntu VirtualBox image that has all the tools needed pre-installed and pre-configured, and the networking configuration tweaked to work mostly straight out of the box.

We use a standard Ubuntu 18.04 server install (to keep it small-ish) and then simply followed the instructions for Developing on Linux. Note: you do not need to set up the provided VirtualBox image, it's already been done.

To get the image:

  • Obtain the Virtual Box image in one of the following ways:
    • Use ftp: ftp://ftp.cse.unsw.edu.au/pub/users/cs9242/aos-development-image.zip,
    • copy it from /home/cs9242/public_ftp/aos-development-image.zip on a CSE machine,
    • or download from this link.
    Note: It is a 1.6GB image!
  • Unzip it to somewhere sensible, usually the Virtual Machines folder.
  • Plug in the O-Droid C2 into two USB ports (serial, Ethernet) and turn it on. Windows might complain about lack of drivers, just ignore it.
  • Run VirtualBox, select File > Import Appliance... and select the aos-development-image.ova file.
  • Run the AOS Development virtual machine that was imported.
  • Login 'aos', password 'aos'

Now you are mostly set up. You will either need to install a desktop environment, or you can ssh into the virtual machine from Windows (run ifconfig to get the IP address to ssh in to). I personally run a Xserver on Windows or macOS and port forward from Linux to my display and use emacs, etc... You will need to apt-get install your favourite editor (if it is not vi) or any other software you generally use.

In order to SSH from windows, you will need to set up a 'NAT Network' network for the virtual machine.

  1. From the main VirtualBox window, select File > Host Network Manager....
  2. Create a new Host Network.
  3. Select the AOS Development machine and press Settings.
  4. Under the Network section, change Adapter 2 to be attached to a Host-Only Adapter.

To ssh in from the Windows:

  • install Cygwin and ssh or putty, and
  • install Xming.
  • For Putty, set it up with X display localhost:0.

To use graphical applications from macOS, install XQuartz. You will need to use the `xterm` application from XQuarts to ssh into the virtual machine rather than the macOS `Terminal` or other terminal applications.

Once logged in, use ip addr show to check that the enp0s3 network has an IP address that you can SSH to and that the eth0 network has the IP address 192.168.168.1, to which the O-Droid C2 can connect.

You should not need to adjust the tftp directory defined in our source tree. However, if you do, the tftpboot directory is specified by TFTPROOT in the top-level Makefile (edit directly), and CONFIG_SOS_NFS_DIR in .config (either by editing directly, or make menconfig).

You should now be able to follow the normal project instructions.


Last modified: 30 Jul 2018.