Makefile 598 B

123456789101112131415161718
  1. .PHONY: run
  2. run: build
  3. qemu-system-i386 -drive file=build/boot.img,format=raw -display curses -no-reboot -no-shutdown -S -s -enable-kvm
  4. .PHONY: srun
  5. srun: build
  6. qemu-system-i386 -drive file=build/boot.img,format=raw -display none -no-reboot -no-shutdown -S -s -enable-kvm -serial mon:stdio
  7. .PHONY: build
  8. build:
  9. cmake --build build --target boot.img
  10. .PHONY: debug
  11. debug:
  12. gdb --symbols=build/kernel.out --init-eval-command 'target remote:1234' --eval-command 'hbr kernel_main' --eval-command 'c'
  13. build/boot.vdi: build/boot.img
  14. -rm build/boot.vdi
  15. VBoxManage convertfromraw $< $@ --format VDI