2020-06-14 05:35:16 +10:00
|
|
|
TARGET = disk.bin
|
2020-06-13 04:01:24 +10:00
|
|
|
BASEDIR = ../..
|
|
|
|
EDIR = $(BASEDIR)/emul
|
|
|
|
STAGE = $(EDIR)/stage
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGET)
|
2020-06-14 05:35:16 +10:00
|
|
|
mbr.bin: mbr.fs $(STAGE)
|
|
|
|
cat mbr.fs | $(STAGE) > $@
|
|
|
|
|
|
|
|
os.bin: xcomp.fs $(STAGE)
|
2020-06-13 04:01:24 +10:00
|
|
|
cat xcomp.fs | $(STAGE) > $@
|
|
|
|
|
2020-06-14 05:35:16 +10:00
|
|
|
disk.bin: mbr.bin os.bin
|
|
|
|
cat mbr.bin os.bin > $@
|
2020-06-22 12:07:12 +10:00
|
|
|
dd if=$(EDIR)/blkfs of=$@ bs=512 seek=16
|
2020-06-14 05:35:16 +10:00
|
|
|
|
2020-06-13 04:01:24 +10:00
|
|
|
$(STAGE):
|
|
|
|
$(MAKE) -C $(EDIR) stage
|
|
|
|
|
|
|
|
.PHONY: emul
|
|
|
|
emul: $(TARGET)
|
2020-06-22 12:07:12 +10:00
|
|
|
qemu-system-i386 -drive file=$(TARGET),if=floppy,format=raw
|
2020-06-14 05:35:16 +10:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm *.bin
|