Getting Started with Weenix - brown-cs1690/handout GitHub Wiki

Getting Started

To get started, accept the Weenix Assignment from GitHub Classroom. Make sure to read the page "Developing Locally" before running Weenix.

To run Weenix, use the following commands from the project root:

make
./weenix -n

(note that the -n is only required for the first run, more on this later. The -n flag will run Weenix with a new disk).

Your Weenix should run and then panic with the following error:

initproc_start(): Not yet implemented: PROCS: initproc_start, file main/kmain.c, line 167

If this happens, you are all set to start working on Procs! (Note that all future assignment handouts are already on the Wiki).

If you get an error saying:

gtk initialization failed

The solution depends on the OS you are running:

  • On macOS, go to another terminal (outside your container/SSH) and type xhost +localhost. If it still doesn't work, make sure you ticked the "Allow connections from network clients" option in XQuartz (see "Developing Locally")
  • On Linux, if you are using the container, exit it and open docker-run-container.sh in your favorite text editor. Change the third to last line from -e DISPLAY=host.docker.internal:0 \ to:
-e DISPLAY=:1 \
  • On Windows, make sure VcXsrV is open.

If none of these work, please post on Ed or reach out in hours.

Note that although we're providing some functions, you'll still have to implement everything listed by the output of make nyi. To run Weenix with gdb, you should run the following:

./weenix -n -d gdb

We have provided some scripts below on how to use shortened commands to run Weenix and gdb. Check out the Tools page for tips and tricks that we recommend when working on Weenix.

Scripts

You may have noticed that when running Weenix in GDB, the QEMU window annoyingly stays open even after you quit GDB. You've probably noticed that running Weenix requires first cd'ing into the directory containing Weenix or typing the absolute path of the Weenix executable. The TAs a couple years ago wrote two very simple functions that rectified these problems: rw and wg (short for "run Weenix" and "Weenix GDB"). The first script will run Weenix (with the -n argument, if provided), while the second will run Weenix with GDB (with the -n argument, if provided), and will close QEMU after GDB exits. Both commands can be run from any directory. Inside Vagrant, these commands are preinstalled. On other systems, copy and paste the text found in weenix-scripts.txt into your .bashrc to use them (cat <weenix home dir>/weenix-scripts.txt >> ~/.bashrc). Make sure to source it afterwards (source ~/.bashrc). You must also replace <weenix home dir> with the directory where you normally run ./weenix. You can find this using pwd.