From 1ebfde4d30acd27d1b3817f33bf9cf76655e3183 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 14 May 2017 17:06:11 +0200 Subject: added a simple serial console output to qemu run mode reading and writing the VGA cursor correctly on hardware --- src/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index e0dfedb..fed5c71 100644 --- a/src/Makefile +++ b/src/Makefile @@ -18,9 +18,9 @@ image.bin: boot.bin kernel.bin magic.bin boot.bin: boot.asm gdt.asm stage1_functions.asm stage2_functions.asm switch_mode.asm nasm boot.asm -f bin -o boot.bin -kernel.bin: kernel.o vga.o port.o port_asm.o string.o stdlib.o +kernel.bin: kernel.o vga.o serial.o port.o port_asm.o string.o stdlib.o $(LD) -o kernel.bin -N -n -Ttext 0x8400 --oformat binary \ - kernel.o vga.o port.o port_asm.o string.o stdlib.o + kernel.o vga.o serial.o port.o port_asm.o string.o stdlib.o magic.bin: magic.asm nasm magic.asm -f bin -o magic.bin @@ -28,26 +28,30 @@ magic.bin: magic.asm kernel.o: kernel.c $(CC) $(CFLAGS) -c -o kernel.o kernel.c -port.o: port.c +port.o: port.c port.h $(CC) $(CFLAGS) -c -o port.o port.c -vga.o: vga.c +vga.o: vga.c vga.h $(CC) $(CFLAGS) -c -o vga.o vga.c +serial.o: serial.c serial.h + $(CC) $(CFLAGS) -c -o serial.o serial.c + port_asm.o: port.asm nasm port.asm -f elf32 -o port_asm.o -string.o: string.c +string.o: string.c string.h $(CC) $(CFLAGS) -c -o string.o string.c -stdlib.o: stdlib.c +stdlib.o: stdlib.c stdlib.h $(CC) $(CFLAGS) -c -o stdlib.o stdlib.c clean: -rm -f boot.bin kernel.bin image.bin magic.bin *.o kernel.map image.tmp run-qemu: image.bin - qemu-system-i386 -m 32 -drive "file=image.bin,if=ide,format=raw" + qemu-system-i386 -m 32 -drive "file=image.bin,if=ide,format=raw" \ + -serial file:serial.log run-bochs: bochs -q -f bochs.config 'boot:floppy' 'floppya: 1_44=image.bin, status=inserted' -- cgit v1.2.3-54-g00ecf