Skip to content

Latest commit

 

History

History
85 lines (51 loc) · 4.02 KB

File metadata and controls

85 lines (51 loc) · 4.02 KB

CS350 OS/161 Setup

Docker container for the OS/161 setup used in CS350 at the University of Waterloo. This setup is current as of the Fall 2016 term.

Set up a fully functional CS350 development environment with one command!

Quickstart on Debian/Ubuntu:

Step 1, put additional_processing.sh and install.sh in the same folder

Step 2

bash install.sh
# enter password as prompted

Supports most x86/x86-64 Linux/OS X systems.

Rationale

CS350 (Operating Systems) is a course at the University of Waterloo. In this course, to do the assignments, you need to either set up OS/161 locally, or use the student environment.

I prefer being able to do my work without requiring a network connection. However, the installation process requires a few things that are somewhat cumbersome with most desktop system configurations.

This Docker container contains a fully set up development environment for CS350 coursework, avoiding issues such as GCC versions, ncurses compatibility, and having to manually copy and paste commands around.

Usage

You do not need to clone or download this repository.

First, make sure you have Docker - refer to the official Docker installation instructions for details.

Download and extract the CS350 OS/161 archive into a convenient folder. This will be where you can work on the OS/161 code in here.

Note: On platforms that use Boot2Docker, like OS X, this folder will be read-only inside the container - changing files inside of the container will not change any files on the host machine.

Now, start an interactive shell inside the image by running the following in the same folder the OS/161 archive was extracted to (this folder should now contain a folder named os161-1.99):

sudo docker run --volume "$(pwd):/root/cs350-os161" --interactive --tty uberi/cs350:latest bash

If this is the first run, and you haven't built the image yourself, this might take a little while to start while Docker downloads the image from Docker Hub.

Now, you can edit the source code on the host machine, and compile/test/debug inside the Docker image.

If sys161 fails with sys161: Cannot open config file sys161.conf, just copy over the example config: cp /root/sys161/share/examples/sys161/sys161.conf.sample /root/cs350-os161/root/sys161.conf.

If the folder /root/cs350-os161/root is missing, simply create it (the OS/161 build scripts seem to have a bug where the folder isn't properly created): mkdir --parents /root/cs350-os161/root.

To run SYS/161:

cd /root/cs350-os161/root
sys161 kernel

Building

First, make sure you have Docker - refer to the official Docker installation instructions for details.

Download all of the archives listed in the Step 1 table, and place them in the same directory as this README. The os161.tar.gz archive is technically not necessary for building the image, but you will need it to actually use the environment.

To build the image, run the following in the repository root:

sudo docker build -t uberi/cs350:latest .

There will be a lot of warnings, but give it at least a few minutes and it'll build.

To upload the image to Docker Hub, I use the following command:

sudo docker push uberi/cs350:latest

License

The files that are part of this project are made available under the 3-Clause BSD license - see LICENSE.txt for details. That means you are free to copy/modify/distribute them with very few restrictions.

This project does not include the additional files that are separately downloaded from the course websites, as they do not seem to include a compatible license as of this writing.