summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-05-14 17:06:11 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-05-14 17:06:11 +0200
commit1ebfde4d30acd27d1b3817f33bf9cf76655e3183 (patch)
treeed9c18eaf4fef8ebf62fe979e0950acee742f814 /src/Makefile
parent2c79240cc66dd2a116056662def9bdc165b2b3e7 (diff)
downloadabaos-1ebfde4d30acd27d1b3817f33bf9cf76655e3183.tar.gz
abaos-1ebfde4d30acd27d1b3817f33bf9cf76655e3183.tar.bz2
added a simple serial console output to qemu run mode
reading and writing the VGA cursor correctly on hardware
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile18
1 files changed, 11 insertions, 7 deletions
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'