Use COM-based format, get bootloader working
This commit is contained in:
parent
11b4d07dc1
commit
d853b87ec7
4 changed files with 201 additions and 207 deletions
12
Makefile
12
Makefile
|
@ -25,8 +25,8 @@ endif
|
|||
|
||||
default: kernel.rom
|
||||
|
||||
kernel.rom: kernel/*.asm lib/*.inc
|
||||
nasm -s -o $@ -I lib -I kernel kernel/main.asm && scripts/fix-rom.sh $@
|
||||
kernel.com: kernel/*.asm lib/*.inc
|
||||
nasm -s -o $@ -I lib -I kernel kernel/main.asm
|
||||
|
||||
debug.rom: debug/*.asm lib/*.inc
|
||||
nasm -s -o $@ -I lib -I debug debug/main.asm && scripts/fix-rom.sh $@
|
||||
|
@ -34,11 +34,11 @@ debug.rom: debug/*.asm lib/*.inc
|
|||
boot/%.bin: boot/%.asm lib/*.inc
|
||||
nasm -s -o $@ -I boot -I lib $<
|
||||
|
||||
fdimage.img: boot/floppy.bin kernel.rom
|
||||
fdimage.img: boot/floppy.bin kernel.com
|
||||
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 boot/floppy.bin ::
|
||||
mcopy -i $@ kernel.rom ::kernel.rom
|
||||
mattrib -i $@ +s ::kernel.rom
|
||||
mcopy -i $@ kernel.com ::kernel.com
|
||||
mattrib -i $@ +s ::kernel.com
|
||||
|
||||
clean:
|
||||
rm -f *.com *.bin *.rom *.img *.log boot/*.bin
|
||||
|
@ -47,7 +47,7 @@ qemu-rom: kernel.rom $(DEBUGROM)
|
|||
$(QEMU) $(QEMU_ARGS) -option-rom kernel.rom
|
||||
|
||||
qemu-floppy: fdimage.img $(DEBUGROM)
|
||||
$(QEMU) $(QEMU_ARGS) -boot c -hda fdimage.img
|
||||
$(QEMU) $(QEMU_ARGS) -boot c -fda fdimage.img
|
||||
|
||||
qemu-serial: boot/serial.bin $(DEBUGROM)
|
||||
$(QEMU) $(QEMU_ARGS) -hda boot/serial.bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue