From 81a17aae376770362381829c7de92e2aec1566a1 Mon Sep 17 00:00:00 2001 From: subhobhai943 Date: Fri, 21 Aug 2026 02:56:53 +0530 Subject: [PATCH] fix(makefile): Enhance run-gui with explicit std VGA and add run-vnc target for headless/remote display --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c058ac7..cc0bda1 100644 --- a/Makefile +++ b/Makefile @@ -405,11 +405,22 @@ run-gui: $(TARGET) ifeq ($(ARCH), x86_64) qemu-system-x86_64 -drive format=raw,file=$(IMAGE) \ -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 \ - -device e1000,netdev=net0 -serial stdio + -device e1000,netdev=net0 -vga std -serial stdio else ifneq ($(filter $(ARCH), aarch64 arm64),) - qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -kernel $(BUILD_DIR)/kernel.elf -serial stdio + qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -kernel $(BUILD_DIR)/kernel.elf -device virtio-gpu-pci -serial stdio else - qemu-system-arm -M virt -cpu cortex-a15 -m 128M -kernel $(BUILD_DIR)/kernel.elf -serial stdio + qemu-system-arm -M virt -cpu cortex-a15 -m 128M -kernel $(BUILD_DIR)/kernel.elf -device virtio-gpu-pci -serial stdio +endif + +run-vnc: $(TARGET) +ifeq ($(ARCH), x86_64) + @echo "=== [QEMU VNC Server running at localhost:5900 (VNC Display :0)] ===" + qemu-system-x86_64 -drive format=raw,file=$(IMAGE) \ + -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 \ + -device e1000,netdev=net0 -vga std -vnc :0 -serial stdio +else + @echo "=== [QEMU VNC Server running at localhost:5900 (VNC Display :0)] ===" + qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128M -kernel $(BUILD_DIR)/kernel.elf -device virtio-gpu-pci -vnc :0 -serial stdio endif run-server: $(IMAGE)