From c59af27cdbd20b836219a9298d780a463bc14633 Mon Sep 17 00:00:00 2001 From: subhobhai943 Date: Mon, 17 Aug 2026 13:20:51 +0530 Subject: [PATCH] feat(qemu): add port forwarding for SSH (port 2222) and HTTP (port 8080) to Makefile --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 719225d..21f6548 100644 --- a/Makefile +++ b/Makefile @@ -114,10 +114,19 @@ $(BUILD_DIR)/boot: mkdir -p $(BUILD_DIR)/boot run: $(IMAGE) - qemu-system-x86_64 -drive format=raw,file=$(IMAGE) -nic model=e1000 -serial stdio + 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 + +run-server: $(IMAGE) + 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 -display none debug: $(IMAGE) - qemu-system-x86_64 -drive format=raw,file=$(IMAGE) -nic model=e1000 -serial stdio -s -S + 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 -s -S info: @echo "C Sources: $(words $(ALL_C_SRCS)) files"