2020-10-31 11:31:47 +11:00
|
|
|
# See /doc/hw/8086/pcat.txt
|
2020-06-14 05:35:16 +10:00
|
|
|
TARGET = disk.bin
|
2020-10-31 11:31:47 +11:00
|
|
|
BASE = ../../..
|
2020-09-21 10:48:52 +10:00
|
|
|
CDIR = $(BASE)/cvm
|
|
|
|
BLKPACK = $(BASE)/tools/blkpack
|
2020-06-27 11:23:13 +10:00
|
|
|
STAGE = $(CDIR)/stage
|
2020-10-26 01:27:52 +11:00
|
|
|
EMUL = $(BASE)/emul/8086/pcat
|
2020-06-13 04:01:24 +10:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGET)
|
2020-09-21 10:48:52 +10:00
|
|
|
os.bin: xcomp.fs $(STAGE) blkfs
|
|
|
|
$(STAGE) blkfs < xcomp.fs > $@
|
2020-06-14 05:35:16 +10:00
|
|
|
|
2020-09-21 10:48:52 +10:00
|
|
|
$(BLKPACK):
|
2020-10-26 01:27:52 +11:00
|
|
|
$(MAKE) -C $(BASE)/tools
|
2020-06-13 04:01:24 +10:00
|
|
|
|
2020-09-21 10:48:52 +10:00
|
|
|
blkfs: $(BLKPACK)
|
2020-11-15 10:00:31 +11:00
|
|
|
cat $(BASE)/blk.fs blk.fs | $(BLKPACK) > $@
|
2020-06-14 05:35:16 +10:00
|
|
|
|
2020-06-13 04:01:24 +10:00
|
|
|
$(STAGE):
|
2020-06-27 11:23:13 +10:00
|
|
|
$(MAKE) -C $(CDIR) stage
|
2020-06-13 04:01:24 +10:00
|
|
|
|
2020-09-22 09:23:33 +10:00
|
|
|
mbr.bin: mbr.fs $(STAGE) blkfs
|
|
|
|
cat mbr.fs | $(STAGE) blkfs > $@
|
2020-09-21 10:48:52 +10:00
|
|
|
|
|
|
|
$(TARGET): mbr.bin os.bin
|
|
|
|
cat mbr.bin os.bin > $@
|
|
|
|
dd if=blkfs of=$@ bs=512 seek=16
|
|
|
|
|
2020-10-26 01:27:52 +11:00
|
|
|
$(EMUL):
|
|
|
|
$(MAKE) -C $(BASE)/emul/8086
|
|
|
|
|
2020-06-13 04:01:24 +10:00
|
|
|
.PHONY: emul
|
2020-10-26 01:27:52 +11:00
|
|
|
emul: $(TARGET) $(EMUL)
|
|
|
|
$(EMUL) $(TARGET)
|
2020-06-14 05:35:16 +10:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm *.bin
|