[feat] Serial output

This commit is contained in:
2026-05-10 20:06:17 +08:00
Unverified
parent 4433d2ef85
commit e6ccc7cbcf
6 changed files with 111 additions and 7 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ _bd:
all: _bd $(OBJ)
@echo "* Linking EFI..."
@ld $(LDFLAGS) gnu-efi/x86_64/gnuefi/crt0-efi-x86_64.o build/boot.o build/graphics/draw.o build/graphics/context.o build/kernel/main.o build/fonts/pixel_font.o -o build/boot.so $(LDLIBS)
@ld $(LDFLAGS) gnu-efi/x86_64/gnuefi/crt0-efi-x86_64.o build/boot.o build/graphics/draw.o build/graphics/context.o build/kernel/main.o build/kernel/serial.o build/fonts/pixel_font.o -o build/boot.so $(LDLIBS)
@objcopy -j .text -j .sdata -j .data -j .rodata -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc --output-target efi-app-x86_64 --subsystem=10 build/boot.so build/BOOTX64.EFI
build/%.o: %.c
@@ -29,7 +29,7 @@ vdir: all
run: vdir
@echo "Launching QEMU"
@qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -net none -drive file=fat:rw:vdir,index=0,format=vvfat -serial file:serial.log -monitor stdio -s -S
@qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -net none -drive file=fat:rw:vdir,index=0,format=vvfat -serial file:serial.log -serial stdio -s -S
clean:
@echo "Cleaning old files"