XV6 on Linux OS


Setting

  1. sudo apt-get install git wget qemu
  2. git clone https://github.com/mit-pdos/xv6-public.git
  3. sudo apt-get install gdb ( if you don't have it.. )
  4. cd xv6-public && make qemu (or qemu-nox)
  5. make qemu-gdb
  6. Open new terminal
  7. cd xv6-public && gdb ./kernel

XV6 on Mac OS


Package download

Setting

  1. Check your mac version (e.g high sierra)
  2. Download package manager
  3. Setting environment variable your mac to use package manager ( export PATH=/opt/local/bin:/opt/local/sbin:$PATH )<- just copy
  4. sudo port install git wget ( if you don't have it.. )
  5. git clone https://github.com/mit-pdos/xv6-public.git
  6. sudo port install qemu
  7. sudo port install i386-elf-gcc
  8. cd xv6-public && vi Makefile
  9. Search line number 32 or TOOLPREFIX = i386-jos-elf
  10. Modify TOOLPREFIX = i386-jos-elf to TOOLPREFIX = i386-elf-
  11. make qemu (or qemu-nox)
  12. cd ..
  13. wget https://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.gz
  14. tar -xvf gdb-6.8a.tar.gz
  15. cd gdb-6.8
  16. ./configure --prefix=/usr/local --target=i386-elf --disable-werror
  17. sudo make all -j4
  18. sudo make install
  19. i386-elf-gdb --version ( Check your gdb version 6.8 , target = i386-elf )
  20. cd ../xv6-public
  21. make qemu-gdb
  22. Open new terminal
  23. cd xv6-public && i386-elf-gdb ./kernel