05 Jan 2012, 23:59

compile and run xv6 on Mac Os X 6.828


The MIT has created xv6: an operating system for learning purpose

This works better and takes less time to create a working environnement for xv6 on Mac Os X, than the recommandations proposed on Tools used in 6.828 simply run this

port install i386-elf-gcc
port install qemu

And change the Makefile like this:

-#TOOLPREFIX = i386-jos-elf-
+TOOLPREFIX = i386-elf-

-#QEMU = 
+QEMU = /opt/local/bin/qemu-system-i386

+CC = $(TOOLPREFIX)gcc-4.3.2

Here is a working gdb binary simply bunzip2 it then invoke it from the xv6 directory souce tree, (tested on osx Lion).

make qemu will compile and run xv6 in qemu

make qemu-dbg will run xv6 in debug mode, run gdb-target-i386-elf and c for continue

Enjoy, thanks MIT.