From ee1cb8f46362576880f4c326ee6c5a51aa9c5af3 Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Sat, 24 Feb 2024 04:34:55 +0100 Subject: 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 Change-Id: I009d97fa3e13068b91c604e987e50a65e525407d Reviewed-on: https://review.coreboot.org/c/coreboot/+/80746 Tested-by: build bot (Jenkins) Reviewed-by: ron minnich Reviewed-by: Philipp Hug --- Documentation/mainboard/emulation/qemu-riscv.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/mainboard/emulation/qemu-riscv.md b/Documentation/mainboard/emulation/qemu-riscv.md index ed2c6d5892..9ccc1b7265 100644 --- a/Documentation/mainboard/emulation/qemu-riscv.md +++ b/Documentation/mainboard/emulation/qemu-riscv.md @@ -3,6 +3,9 @@ ## Building coreboot and running it in QEMU - Configure coreboot and run `make` as usual -- Run `util/riscv/make-spike-elf.sh build/coreboot.rom build/coreboot.elf` to - convert coreboot to an ELF that QEMU can load -- Run `qemu-system-riscv64 -M virt -m 1024M -nographic -kernel build/coreboot.elf` + +Run QEMU +``` +qemu-system-riscv64 -M virt -m 1G -nographic -bios build/coreboot.rom \ + -drive if=pflash,file=./build/coreboot.rom,format=raw +``` -- cgit v1.2.3