From 94c995e38d77c39e64237e086ab47dc80313fd77 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:43:01 +0100 Subject: [PATCH 1/5] Use nvme by default outside of 32bit x86 and raspi Most modern systems use nvme as disk. 32bit x86 is a legacy system where ata is likely still used. Raspberry PI uses the sdcard. --- mk/qemu.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 6e1f0742f..6be8cdfe4 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -8,6 +8,7 @@ VGA_SUPPORTED=no ifeq ($(ARCH),i586) audio?=ac97 + disk?=ata gpu?=vga uefi=no VGA_SUPPORTED=yes @@ -104,7 +105,6 @@ else ifeq ($(ARCH),riscv64gc) QEMU_SMP?=4 QEMU_MEM?=2048 QEMU_CPU=max - disk?=nvme PFLASH0=$(firstword \ $(wildcard /usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd) \ $(wildcard /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd) \ @@ -265,7 +265,7 @@ else ifeq ($(gpu),virtio-gl) endif EXTRA_DISK=$(BUILD)/extra.img -disk?=ata +disk?=nvme ifeq ($(disk),ata) # For i386, ata will use ided # For aarch64 and x86_64, ata will use ahcid From 25ed25340b6dab0d0539c8a86f795637811e7b0e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:49:07 +0100 Subject: [PATCH 2/5] Remove obsolete env var usage From what I can find on the internet, SDL nowadays doesn't enable this option by default anymore anyway. --- mk/qemu.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 6be8cdfe4..3f28a3059 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -1,6 +1,6 @@ # Configuration file for QEMU -QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(QEMU_ARCH) +QEMU=qemu-system-$(QEMU_ARCH) QEMUFLAGS=-d guest_errors -name "Redox OS $(ARCH)" netboot?=no redoxer?=no From 0a09e5af4790a5fdbe99009959753c61def8f85e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:56:05 +0100 Subject: [PATCH 3/5] Remove qemu_extra and qemu_extra_nvme make targets The extra disk is unconditionally attached by the regular disk logic. --- mk/qemu.mk | 9 --------- 1 file changed, 9 deletions(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 3f28a3059..1697f49fa 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -372,15 +372,6 @@ $(BUILD)/qemu_uboot.rom: qemu: qemu-deps $(QEMU) $(QEMUFLAGS) -# You probably want to use disk=no when using the *_extra targets -qemu_extra: qemu-deps - $(QEMU) $(QEMUFLAGS) \ - -drive file=$(EXTRA_DISK),format=raw - -qemu_nvme_extra: qemu-deps - $(QEMU) $(QEMUFLAGS) \ - -drive file=$(EXTRA_DISK),format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA - #additional steps for $(DISK) are required!!! qemu_raspi: qemu-deps $(QEMU) -M raspi3b -smp 4,cores=1 \ From 18c22db8ce57f4fc0b21908c5b2ea040f9cf529e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:58:58 +0100 Subject: [PATCH 4/5] Remove dedicated qemu_raspi target Regular qemu already handles everything necessary if BOARD=raspi3bp is set. --- mk/qemu.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 1697f49fa..bf7aa31ed 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -60,6 +60,7 @@ else ifeq ($(ARCH),aarch64) ifeq ($(BOARD),raspi3bp) QEMU_KERNEL=$(BUILD)/raspi3bp_uboot.rom disk?=sdcard + gpu=none QEMU_MACHINE:=raspi3b QEMU_SMP:=4 QEMU_MEM:=1024 @@ -371,9 +372,3 @@ $(BUILD)/qemu_uboot.rom: qemu: qemu-deps $(QEMU) $(QEMUFLAGS) - -#additional steps for $(DISK) are required!!! -qemu_raspi: qemu-deps - $(QEMU) -M raspi3b -smp 4,cores=1 \ - -kernel $(FIRMWARE) \ - -serial stdio -display none From 3641dc7698c597d0744307d87dca9be376772c95 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 1 Mar 2026 17:04:39 +0100 Subject: [PATCH 5/5] Use qemu-xhci for usb on x86_64 to match arm64 and riscv64 --- mk/qemu.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index bf7aa31ed..e9dc2376d 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -44,7 +44,7 @@ else ifeq ($(ARCH),x86_64) endif endif ifneq ($(usb),no) - QEMUFLAGS+=-device nec-usb-xhci,id=xhci + QEMUFLAGS+=-device qemu-xhci endif else ifeq ($(ARCH),aarch64) # Default to UEFI as U-Boot doesn't set up a framebuffer for us and we don't yet support