2020-06-14 05:35:16 +10:00
|
|
|
TARGET = disk.bin
|
2020-09-21 10:48:52 +10:00
|
|
|
BASE = ../..
|
|
|
|
CDIR = $(BASE)/cvm
|
|
|
|
BLKPACK = $(BASE)/tools/blkpack
|
2020-06-27 11:23:13 +10:00
|
|
|
STAGE = $(CDIR)/stage
|
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):
|
|
|
|
$(MAKE) -C ../tools
|
2020-06-13 04:01:24 +10:00
|
|
|
|
2020-09-21 10:48:52 +10:00
|
|
|
blkfs: $(BLKPACK)
|
|
|
|
$(BLKPACK) $(BASE)/blk blk > $@
|
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-21 10:48:52 +10:00
|
|
|
mbr.bin: mbr.fs $(STAGE)
|
|
|
|
cat mbr.fs | $(STAGE) > $@
|
|
|
|
|
|
|
|
$(TARGET): mbr.bin os.bin
|
|
|
|
cat mbr.bin os.bin > $@
|
|
|
|
dd if=blkfs of=$@ bs=512 seek=16
|
|
|
|
|
2020-06-13 04:01:24 +10:00
|
|
|
.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
|