Advanced Operating Systems (LV 7680)
Developing with the Virtual Machine
If you would like to work locally on your own machine running Windows or macOS (away from the lab), 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.
- Install VirtualBox for Windows or macOS.
- Open the Oracle VM VirtualBox Extension Pack with VirtualBox to install it. (This is needed to support the passing the USB ethernet adaptor to the virtual machine.)
Installing a Copy of the Virtual Machine
We provide an 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:
Download the Virtual Box image from this link.
Note: It is a 1.6GB image!
Put 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. It may complain about a network adapter not being present. If that is the case, just follow the sugestions to select another interface.
- 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). Kevin reports that he personally runs an Xserver on Windows or macOS and port forwards from Linux to his display to use emacs, etc... You will need to apt-get install
your favourite editor (unless it is 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.
- From the main VirtualBox window, select File > Host Network Manager....
- Create a new Host Network.
- Select the AOS Development machine and press Settings.
- 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 XQuartz 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 enp0s8
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 may have to enable pass-through of your USB NIC to Virtualbox by selecting the appropriate device(s) und Devices -> USB.
You should not need to adjust the tftp directory defined in the source code. 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
(again edit directly).
You should now be able to follow the normal project instructions.