1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 17:08:05 +11:00
collapseos/recipes/pcat/Makefile
2020-09-20 20:48:52 -04:00

35 lines
583 B
Makefile

TARGET = disk.bin
BASE = ../..
CDIR = $(BASE)/cvm
BLKPACK = $(BASE)/tools/blkpack
STAGE = $(CDIR)/stage
.PHONY: all
all: $(TARGET)
os.bin: xcomp.fs $(STAGE) blkfs
$(STAGE) blkfs < xcomp.fs > $@
$(BLKPACK):
$(MAKE) -C ../tools
blkfs: $(BLKPACK)
$(BLKPACK) $(BASE)/blk blk > $@
$(STAGE):
$(MAKE) -C $(CDIR) stage
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
.PHONY: emul
emul: $(TARGET)
qemu-system-i386 -drive file=$(TARGET),if=floppy,format=raw
.PHONY: clean
clean:
rm *.bin