build: add bochs rule

This commit is contained in:
d0p1 🏳️‍⚧️ 2024-12-30 20:14:35 +01:00
parent 3093e6bc82
commit 7c8176688a
2 changed files with 19 additions and 4 deletions

12
.bochsrc Normal file
View file

@ -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

View file

@ -1,4 +1,5 @@
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
.DEFAULT_GOAL:=all
MAKEFLAGS += --no-print-directory MAKEFLAGS += --no-print-directory
@ -47,13 +48,11 @@ endif
.PHONY: all .PHONY: all
all: $(TARGET) all: $(TARGET)
GOAL:=install
clean: GOAL:=clean
.PHONY: $(SUBDIRS) .PHONY: $(SUBDIRS)
$(SUBDIRS): $(SUBDIRS):
@echo "📁 $@" @echo "📁 $@"
@DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(GOAL) @DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(MAKECMDGOALS)
.PHONY: stupid.iso .PHONY: stupid.iso
stupid.iso: $(SUBDIRS) stupid.iso: $(SUBDIRS)
@ -86,7 +85,6 @@ floppy2880.img: $(SUBDIRS)
mcopy -i $@ boot/loader/stpdldr.sys ::/STPDLDR.SYS mcopy -i $@ boot/loader/stpdldr.sys ::/STPDLDR.SYS
mcopy -i $@ kernel/vmstupid.sys ::/VMSTUPID.SYS mcopy -i $@ kernel/vmstupid.sys ::/VMSTUPID.SYS
OVMF32.fd: OVMF32.fd:
wget 'https://retrage.github.io/edk2-nightly/bin/DEBUGIa32_OVMF.fd' -O $@ 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 \ -drive file=fat:rw:./sysroot,if=none,id=hdd \
-device ide-hd,drive=hdd -device ide-hd,drive=hdd
.PHONY: bochs
bochs:
bochs -f .bochsrc
.PHONY: docs .PHONY: docs
docs: docs:
@mkdir -p docs/html @mkdir -p docs/html