From 7c8176688a2fd76cd9f56a402e2f536b5e752ed4 Mon Sep 17 00:00:00 2001 From: d0p1 Date: Mon, 30 Dec 2024 20:14:35 +0100 Subject: [PATCH] build: add bochs rule --- .bochsrc | 12 ++++++++++++ Makefile | 11 +++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .bochsrc diff --git a/.bochsrc b/.bochsrc new file mode 100644 index 0000000..579cf50 --- /dev/null +++ b/.bochsrc @@ -0,0 +1,12 @@ +cpu: count=1, reset_on_triple_fault=0 + +display_library: x, options="gui_debug" + +megs: 512 + +clock: sync=realtime, time0=local + +boot: floppy +floppya: type=1_44, 1_44="floppy1440.img", status=inserted, write_protected=0 + +magic_break: enabled=1 diff --git a/Makefile b/Makefile index 63890b4..cf97da4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ .EXPORT_ALL_VARIABLES: +.DEFAULT_GOAL:=all MAKEFLAGS += --no-print-directory @@ -47,13 +48,11 @@ endif .PHONY: all all: $(TARGET) -GOAL:=install -clean: GOAL:=clean .PHONY: $(SUBDIRS) $(SUBDIRS): @echo "📁 $@" - @DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(GOAL) + @DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(MAKECMDGOALS) .PHONY: stupid.iso stupid.iso: $(SUBDIRS) @@ -86,7 +85,6 @@ floppy2880.img: $(SUBDIRS) mcopy -i $@ boot/loader/stpdldr.sys ::/STPDLDR.SYS mcopy -i $@ kernel/vmstupid.sys ::/VMSTUPID.SYS - OVMF32.fd: wget 'https://retrage.github.io/edk2-nightly/bin/DEBUGIa32_OVMF.fd' -O $@ @@ -112,6 +110,11 @@ run-efi: all OVMF32.fd -drive file=fat:rw:./sysroot,if=none,id=hdd \ -device ide-hd,drive=hdd +.PHONY: bochs +bochs: + bochs -f .bochsrc + + .PHONY: docs docs: @mkdir -p docs/html