Make better use of mformat features

This commit is contained in:
Nero 2019-09-16 10:26:48 +00:00
parent fe42e9145a
commit cff186a1bb

View File

@ -1,6 +1,4 @@
FD_CYLINDERS = 40
FD_HEADS = 2
FD_SECTORS = 9
FLOPPY = 360
PROGRAMS = $(patsubst %.asm,%.com,$(wildcard programs/*.asm))
DISTFILES = kernel.com $(PROGRAMS)
@ -38,8 +36,7 @@ programs/%.com: programs/%.asm
nasm -s -I lib -o $@ $<
fdimage.img: floppy.bs $(DISTFILES)
dd if=/dev/zero bs=512 count=$$(( $(FD_CYLINDERS) * $(FD_HEADS) * $(FD_SECTORS) )) of=$@
mformat -i $@ -t $(FD_CYLINDERS) -h $(FD_HEADS) -n $(FD_SECTORS) -B floppy.bs ::
mformat -C -i $@ -f $(FLOPPY) -B floppy.bs ::
mcopy -i $@ $(DISTFILES) ::
clean: