From ba68c723bf209b5891b84b6564390f8b85c7c7f6 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Wed, 22 Apr 2020 23:02:46 -0400 Subject: [PATCH] qemu-coreboot: Now useful to debug something through make BOARD=qemu-coreboot. TODO: map a virtual TPM instance and USB passthrough. Thanks to @orangecms for the tip --- boards/qemu-coreboot/qemu-coreboot.config | 5 ++++- config/coreboot-qemu.config | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/boards/qemu-coreboot/qemu-coreboot.config b/boards/qemu-coreboot/qemu-coreboot.config index aeb57c787..a36b70326 100644 --- a/boards/qemu-coreboot/qemu-coreboot.config +++ b/boards/qemu-coreboot/qemu-coreboot.config @@ -50,10 +50,13 @@ export CONFIG_TPM=n export CONFIG_BOOT_DEV="/dev/sda1" -#run: coreboot.intermediate +#borrowed from https://github.com/orangecms/webboot/blob/boot-via-qemu/run-webboot.sh run: qemu-system-x86_64 \ --machine q35 \ --serial /dev/tty \ --bios $(build)/$(BOARD)/coreboot.rom \ + -object rng-random,filename=/dev/urandom,id=rng0 \ + -device virtio-rng-pci,rng=rng0 \ + -netdev user,id=u1 -device e1000,netdev=u1 \ ; stty sane diff --git a/config/coreboot-qemu.config b/config/coreboot-qemu.config index 73856e412..87d0f64a2 100644 --- a/config/coreboot-qemu.config +++ b/config/coreboot-qemu.config @@ -14,5 +14,6 @@ CONFIG_CPU_MICROCODE_CBFS_GENERATE=y # CONFIG_CONSOLE_SERIAL is not set CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6=y CONFIG_PAYLOAD_LINUX=y +CONFIG_LINUX_COMMAND_LINE="debug console=ttyS0 vga=786" CONFIG_PAYLOAD_FILE="../../build/qemu-coreboot/bzImage" CONFIG_LINUX_INITRD="../../build/qemu-coreboot/initrd.cpio.xz"