Reduce amount of scripts in root directory

This commit is contained in:
Nero 2019-04-21 10:14:06 +00:00
parent d8fe1b211c
commit acef5262eb
4 changed files with 23 additions and 9 deletions

View File

@ -2,10 +2,25 @@ FD_CYLINDERS = 40
FD_HEADS = 2
FD_SECTORS = 9
QEMU_ARCH = $(shell uname -m)
QEMU = qemu-system-$(QEMU_ARCH)
QEMU_ARGS =
ifdef KVM
QEMU_ARGS += --enable-kvm
endif
ifdef DEBUG
QEMU_ARGS += -chardev file,path=debugcon.log,id=seabios
QEMI_ARGS += -device isa-debugcon,iobase=0x402,chardev=seabios
endif
.PHONY: default clean qemu-rom qemu-floppy
default: kernel.rom
kernel.rom: kernel/*.asm
nasm -s -o $@ -I kernel kernel/main.asm && ./fix-rom.sh $@
nasm -s -o $@ -I kernel kernel/main.asm && scripts/fix-rom.sh $@
boot/%.bin: boot/%.asm
nasm -s -o $@ -I lib $<
@ -16,4 +31,10 @@ fdimage.img: boot/floppy.bin kernel.rom
mcopy -i $@ kernel.rom ::kernel.rom
clean:
rm -f *.com *.bin *.rom *.img boot/*.bin
rm -f *.com *.bin *.rom *.img *.log boot/*.bin
qemu-rom: kernel.rom
$(QEMU) $(QEMU_ARGS) -option-rom kernel.rom
qemu-floppy: fdimage.img
$(QEMU) $(QEMU_ARGS) -boot c -hda fdimage.img

View File

@ -1,2 +0,0 @@
#!/bin/sh
exec qemu-system-x86_64 -hda fdimage.img

View File

@ -1,5 +0,0 @@
#!/bin/sh
exec qemu-system-x86_64 -boot n \
-option-rom /usr/share/qemu/pxe-rtl8139.rom \
-device e1000,netdev=mynet0,mac=52:54:00:12:34:56 \
-netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9,tftp=$PWD,bootfile=kernel.com