Makefile 658 B

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