Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 line
595B

  1. TARGET = disk.bin
  2. BASE = ../..
  3. CDIR = $(BASE)/cvm
  4. BLKPACK = $(BASE)/tools/blkpack
  5. STAGE = $(CDIR)/stage
  6. .PHONY: all
  7. all: $(TARGET)
  8. os.bin: xcomp.fs $(STAGE) blkfs
  9. $(STAGE) blkfs < xcomp.fs > $@
  10. $(BLKPACK):
  11. $(MAKE) -C ../tools
  12. blkfs: $(BLKPACK)
  13. $(BLKPACK) $(BASE)/blk blk > $@
  14. $(STAGE):
  15. $(MAKE) -C $(CDIR) stage
  16. mbr.bin: mbr.fs $(STAGE) blkfs
  17. cat mbr.fs | $(STAGE) blkfs > $@
  18. $(TARGET): mbr.bin os.bin
  19. cat mbr.bin os.bin > $@
  20. dd if=blkfs of=$@ bs=512 seek=16
  21. .PHONY: emul
  22. emul: $(TARGET)
  23. qemu-system-i386 -drive file=$(TARGET),if=floppy,format=raw
  24. .PHONY: clean
  25. clean:
  26. rm *.bin