We’ll be using two sets of tools in this class: QEMU, a machine emulator for running your kernel; and a compiler toolchain, including assembler, linker, C compiler, and debugger, for compiling and testing xv6.
For this quarter we have arranged for a Linux machine to be made
available to you:
umnak.cs.washington.edu
. You can use ssh to connect to this machine
using your CSE credentials just like attu.
The CSE support has installed the tools required to build and run xv6 on umnak, so that you can use it for development and testing. To enable the toolchain and add the programs to your path, you can (in bash) run
You may find it useful to add this to your .bash_profile
.
Proceed to the first lab to fetch the xv6 source and run xv6.
If you want to work on your own Linux, a recent version of Debian/Ubuntu/Fedora/Arch should work.
Ubuntu (tested on 19.10):
Arch:
Check that the tools on your Linux are up-to-date (QEMU 4.1, Bintuils 2.32, and GCC 9.2 recommended). If necessary, update your Linux distribution, or build QEMU and the RISC-V compiler toolchain from source code.
If you are using other operating systems, an easier option is to run a Linux virtual machine, in two steps. First, install a virtualization platform, such as QEMU, VirtualBox, VMware Player, or VMware Fusion. Next, create a VM to install a Linux distribution of your choice.
We do not recommend using the CSE VM (CentOS), as its toolchains are out-of-date (unless you want to build them from source code yourself).
It is possible to install the toolchains on macOS (tested on 10.15 Catalina). First, install Homebrew. Then, type the following commands:
If the brew formula doesn’t link into /usr/local
, you will need to
run the following command or add it to your shell’s startup file
(e.g. .bashrc
for bash):