summaryrefslogtreecommitdiff
path: root/util/qemu
diff options
context:
space:
mode:
authorMaximilian Brune <maximilian.brune@9elements.com>2024-02-24 04:34:55 +0100
committerron minnich <rminnich@gmail.com>2024-03-05 18:57:29 +0000
commitee1cb8f46362576880f4c326ee6c5a51aa9c5af3 (patch)
treea1526890264366147d8c7b9ab83421eca2138bb5 /util/qemu
parent3304c1cbad6b9b6cd8523e513cb953a8396bda46 (diff)
mb/emulation/qemu-riscv: Change to -bios option
This changes the virt target so that it can be run with the -bios option and a pflash backend for the flash. QEMU can now be run as follows: qemu -M virt -m 1G -nographic -bios build/coreboot.rom \ -drive if=pflash,file=./build/coreboot.rom,format=raw coreboot will start in DRAM, but still have a flash to put CBFS onto and to load subsequent stages and payload from. Tested bootflow: coreboot -> OpenSBI -> Linux -> u-root Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I009d97fa3e13068b91c604e987e50a65e525407d Reviewed-on: https://review.coreboot.org/c/coreboot/+/80746 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: ron minnich <rminnich@gmail.com> Reviewed-by: Philipp Hug <philipp@hug.cx>
Diffstat (limited to 'util/qemu')
-rw-r--r--util/qemu/Makefile.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/qemu/Makefile.mk b/util/qemu/Makefile.mk
index 42441df937..7b9b636baf 100644
--- a/util/qemu/Makefile.mk
+++ b/util/qemu/Makefile.mk
@@ -29,9 +29,11 @@
QEMU-$(CONFIG_BOARD_EMULATION_QEMU_AARCH64) ?= qemu-system-aarch64 \
-M virt,secure=on,virtualization=on -cpu cortex-a53 -m 1G
-QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64) ?= qemu-system-riscv64 -M virt
+QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64) ?= qemu-system-riscv64 -M virt -m 1G -drive \
+ if=pflash,file=build/coreboot.rom,format=raw
-QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV32) ?= qemu-system-riscv32 -M virt
+QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV32) ?= qemu-system-riscv32 -M virt -m 1G -drive \
+ if=pflash,file=build/coreboot.rom,format=raw
QEMU-$(CONFIG_BOARD_EMULATION_QEMU_X86_I440FX) ?= qemu-system-x86_64 -M pc