Get MBR ready, add hdimage target
This commit is contained in:
parent
7c4a618385
commit
c70f388548
3 changed files with 79 additions and 7 deletions
15
Makefile
15
Makefile
|
@ -29,18 +29,27 @@ kernel.com: kernel/*.asm lib/*.inc
|
|||
debug.rom: debug/*.asm lib/*.inc
|
||||
nasm -s -o $@ -I lib -I debug debug/main.asm && scripts/fix-rom.sh $@
|
||||
|
||||
floppy.bs: boot/fatvbr.asm
|
||||
boot/floppy.bs: boot/fatvbr.asm
|
||||
nasm -s -DCMDLINE='"KERNEL.COM"' -o $@ $<
|
||||
|
||||
boot/mbr.bs: boot/mbr.asm
|
||||
nasm -s -DFLOPPY=$(FLOPPY) -o $@ $<
|
||||
|
||||
programs/%.com: programs/%.asm
|
||||
nasm -s -I lib -o $@ $<
|
||||
|
||||
fdimage.img: floppy.bs $(DISTFILES)
|
||||
mformat -C -i $@ -f $(FLOPPY) -B floppy.bs ::
|
||||
fdimage.img: boot/floppy.bs $(DISTFILES)
|
||||
mformat -C -i $@ -f $(FLOPPY) -B boot/floppy.bs ::
|
||||
mcopy -i $@ $(DISTFILES) ::
|
||||
|
||||
hdimage.img: boot/mbr.bs fdimage.img
|
||||
cat boot/mbr.bs fdimage.img >$@
|
||||
|
||||
clean:
|
||||
rm -f *.com *.bin *.rom *.img *.log *.bs *.lst programs/*.com
|
||||
|
||||
qemu-floppy: fdimage.img $(DEBUGROM)
|
||||
$(QEMU) $(QEMU_ARGS) -boot c -fda fdimage.img
|
||||
|
||||
qemu-hdd: hdimage.img $(DEBUGROM)
|
||||
$(QEMU) $(QEMU_ARGS) -boot c -hda hdimage.img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue