mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-27 07:14:18 +08:00
Merge branch 'qemu_defaults' into 'master'
Some improvements to qemu.mk See merge request redox-os/redox!1962
This commit is contained in:
commit
6acf29f632
24
mk/qemu.mk
24
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
|
||||
@ -8,6 +8,7 @@ VGA_SUPPORTED=no
|
||||
|
||||
ifeq ($(ARCH),i586)
|
||||
audio?=ac97
|
||||
disk?=ata
|
||||
gpu?=vga
|
||||
uefi=no
|
||||
VGA_SUPPORTED=yes
|
||||
@ -43,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
|
||||
@ -59,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
|
||||
@ -104,7 +106,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 +266,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
|
||||
@ -371,18 +372,3 @@ $(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 \
|
||||
-kernel $(FIRMWARE) \
|
||||
-serial stdio -display none
|
||||
|
||||
Loading…
Reference in New Issue
Block a user