Implement boot based on reserved sectors

This commit is contained in:
Nero 2019-10-28 10:38:18 +00:00
parent 74fce7191f
commit 47630b2c03
3 changed files with 23 additions and 135 deletions

View file

@ -2,8 +2,11 @@ FLOPPY = 360
RAM = 0x10000
BDOSIMG = bdos.bin
BIOSIMG = bios8086.bin
PROGRAMS = $(patsubst %.asm,%.com,$(wildcard com/*.asm))
DISTFILES = bdos.bin $(PROGRAMS)
DISTFILES = $(PROGRAMS)
ROMS =
QEMU_ARCH = $(shell uname -m)
@ -52,8 +55,10 @@ com/%.com: com/%.asm
bios%.bin: bios/%.asm
$(NASM) $(NASM_ARGS) -o $@ $<
fdimage.img: boot/fat.bs $(DISTFILES)
mformat -C -i $@ -f $(FLOPPY) -B boot/fat.bs ::
fdimage.img: boot/fat.bs $(BDOSIMG) $(BIOSIMG) $(DISTFILES)
mformat -R 9 -C -i $@ -f $(FLOPPY) -B boot/fat.bs ::
dd if=$(BDOSIMG) bs=512 seek=1 count=4 conv=notrunc of=$@
dd if=$(BIOSIMG) bs=512 seek=5 count=4 conv=notrunc of=$@
mcopy -i $@ $(DISTFILES) ::
hdimage.img: boot/mbr.bs fdimage.img