From ef3cd5c65f88af4efa8539c8a7769c9bdf46bbbc Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Wed, 17 Aug 2022 10:28:19 -0400 Subject: [PATCH] qemu-coreboot-fbwhiptail-tpm1-hotp: Virtio video/storage, serial Enable virtio video and storage. Enable serial console and tweak kernel command line to show logs. Signed-off-by: Jonathon Hall --- .../qemu-coreboot-fbwhiptail-tpm1-hotp.config | 16 ++++++++++++---- config/coreboot-qemu-fbwhiptail-tpm1-hotp.config | 7 ++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config b/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config index 2b6863ad..f7130e0c 100644 --- a/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config +++ b/boards/qemu-coreboot-fbwhiptail-tpm1-hotp/qemu-coreboot-fbwhiptail-tpm1-hotp.config @@ -6,7 +6,7 @@ # the VM. export CONFIG_COREBOOT=y export CONFIG_COREBOOT_VERSION=4.13 -export CONFIG_LINUX_VERSION=4.14.62 +export CONFIG_LINUX_VERSION=5.10.5 CONFIG_COREBOOT_CONFIG=config/coreboot-qemu-fbwhiptail-tpm1-hotp.config CONFIG_LINUX_CONFIG=config/linux-qemu.config @@ -51,10 +51,14 @@ export CONFIG_BOOTSCRIPT=/bin/gui-init # #text-based original init: #export CONFIG_BOOTSCRIPT=/bin/generic-init +export CONFIG_BOOT_REQ_HASH=n +export CONFIG_BOOT_REQ_ROLLBACK=n +export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0" +export CONFIG_BOOT_KERNEL_REMOVE="quiet rhgb splash" export CONFIG_TPM=y -export CONFIG_BOOT_DEV="/dev/sda1" +export CONFIG_BOOT_DEV="/dev/vda1" export CONFIG_BOARD_NAME="qemu-coreboot-fbwhiptail-tpm1-hotp" # Use the GPG-injected ROM if a key was given, since we can't reflash a GPG @@ -123,10 +127,14 @@ run: $(TPMDIR)/.manufacture $(ROOT_DISK_IMG) $(MEMORY_SIZE_FILE) $(USB_FD_IMG) --ctrl type=unixio,path="$(TPMDIR)/sock" & sleep 0.5 - -qemu-system-x86_64 "$(ROOT_DISK_IMG)" \ + -qemu-system-x86_64 -drive file="$(ROOT_DISK_IMG)",if=virtio \ --machine q35,accel=kvm:tcg \ + -rtc base=utc \ + -smp "$$(nproc)" \ + -vga virtio \ + -full-screen \ -m "$$(cat "$(MEMORY_SIZE_FILE)")" \ - --serial /dev/tty \ + -serial stdio \ --bios "$(QEMU_BOOT_ROM)" \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ diff --git a/config/coreboot-qemu-fbwhiptail-tpm1-hotp.config b/config/coreboot-qemu-fbwhiptail-tpm1-hotp.config index 6bf546f6..6e16a6d8 100644 --- a/config/coreboot-qemu-fbwhiptail-tpm1-hotp.config +++ b/config/coreboot-qemu-fbwhiptail-tpm1-hotp.config @@ -1,11 +1,12 @@ # CONFIG_INCLUDE_CONFIG_FILE is not set -CONFIG_CBFS_SIZE=0x780000 +CONFIG_ONBOARD_VGA_IS_PRIMARY=y +CONFIG_CBFS_SIZE=0x980000 # CONFIG_POST_IO is not set # CONFIG_POST_DEVICE is not set CONFIG_BOARD_EMULATION_QEMU_X86_Q35=y # CONFIG_CONSOLE_SERIAL is not set -CONFIG_LINUX_COMMAND_LINE="debug" -CONFIG_COREBOOT_ROMSIZE_KB_8192=y +CONFIG_LINUX_COMMAND_LINE="debug console=ttyS0,115200 console=tty" +CONFIG_COREBOOT_ROMSIZE_KB_10240=y CONFIG_PCIEXP_ASPM=y CONFIG_PCIEXP_COMMON_CLOCK=y CONFIG_UART_PCI_ADDR=0