sudo apt-get install git wget qemu aqemu
sudo apt-get install libc6-dev:i386 gcc
sudo apt-get install gdb
git clone https://github.com/subhrendu1987/xv6-public/
cd xv6-public && make qemu
- If you have 64 bit OS there is a chance Makefile will not be able to find qemu.
Check using the command
make qemu-nox
and see the output. In that case you should edit the Makefile at line 54 and add the following code:QEMU = qemu-system-x86_64
make qemu-gdb
- Open new terminal
cd xv6-public && gdb ./kernel
-
To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run "make".
-
On non-x86 or non-ELF machines (like OS X, even on x86), you may need to install a cross-compiler gcc suite capable of producing x86 ELF binaries (see https://pdos.csail.mit.edu/6.828/).
-
Then run "make TOOLPREFIX=i386-jos-elf-". Now install the QEMU PC simulator and run "make qemu".