Skip to content

Commit

Permalink
PoC : qemu-coreboot-fbwhiptail-tpm1 & qemu-coreboot-whiptail-tpm1 wit…
Browse files Browse the repository at this point in the history
…h native vga init + bootsplash

- Changes qemu call from -vga virtio to -vga std (to use bochs coreboot fb init)
- coreboot configs:
  - add CONFIG_FW_CONFIG=y to expose coreboot tables so fbsimple can fire up the console
  - add CONFIG_BOOTSPLASH_FILE="@BLOB_DIR@/bootsplash-1024x768.jpg" (hard to generate jpg, another story)
  - fixate CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES=1024 and CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES=768
- linux configs:
  - CONFIG_X86_SYSFB=y to have linux expect FB inititalized by firmware (EFI/BIOS: all the same requirement)
  - Removed DRM+GPU specific options # CONFIG_DRM is not set
  - add CONFIG_FB_SIMPLE=y so that linux uses coreboot's exposed FB
  - add CONFIG_FIRMWARE_EDID=y so that firmware is probed for config
  - add CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y so that fbwhiptail can deal with the framebuffer
  - add CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y to ease usage if whatever
- kexec patch : add "simple" fb support for VLFB, so that address of Heads fb is passed on kexec call

Limitations:
- BUGS:
 - qemu on debian-11 (not KVM) is not refreshing screen unless zooming in/out or chaning input (bug in qemu?)
 - FBWHIPTAIL requires VSYNC ioctl. Should not fail if not present to stay under fbwhiptail, not corrupting output.
  • Loading branch information
tlaurion committed May 11, 2023
1 parent f88a49b commit 537cc83
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ run: $(TPMDIR)/.manufacture $(ROOT_DISK_IMG) $(MEMORY_SIZE_FILE) $(USB_FD_IMG)
--machine q35,accel=kvm:tcg \
-rtc base=utc \
-smp "$$(nproc)" \
-vga virtio \
-full-screen \
-vga std \
-m "$$(cat "$(MEMORY_SIZE_FILE)")" \
-serial stdio \
--bios "$(QEMU_BOOT_ROM)" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ run: $(TPMDIR)/.manufacture $(ROOT_DISK_IMG) $(MEMORY_SIZE_FILE) $(USB_FD_IMG)
--machine q35,accel=kvm:tcg \
-rtc base=utc \
-smp "$$(nproc)" \
-vga virtio \
-full-screen \
-vga std \
-m "$$(cat "$(MEMORY_SIZE_FILE)")" \
-serial stdio \
--bios "$(QEMU_BOOT_ROM)" \
Expand Down
9 changes: 5 additions & 4 deletions config/coreboot-qemu-tpm1.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ CONFIG_NO_STAGE_CACHE=y
# CONFIG_CBMEM_STAGE_CACHE is not set
# CONFIG_UPDATE_IMAGE is not set
CONFIG_BOOTSPLASH_IMAGE=y
CONFIG_BOOTSPLASH_FILE="@BLOB_DIR@/bootsplash.jpg"
# CONFIG_FW_CONFIG is not set
CONFIG_BOOTSPLASH_FILE="@BLOB_DIR@/bootsplash-1024x768.jpg"
CONFIG_FW_CONFIG=y
# CONFIG_FW_CONFIG_SOURCE_CBFS is not set

#
# Software Bill Of Materials (SBOM)
Expand Down Expand Up @@ -355,8 +356,8 @@ CONFIG_HAVE_USBDEBUG_OPTIONS=y
# CONFIG_USBDEBUG is not set
# CONFIG_VPD is not set
CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y
CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES=800
CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES=600
CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES=1024
CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES=768
# CONFIG_DRIVERS_GENERIC_CBFS_SERIAL is not set
# CONFIG_DRIVERS_GENERIC_CBFS_UUID is not set
# CONFIG_DRIVERS_GENESYSLOGIC_GL9750 is not set
Expand Down
2 changes: 1 addition & 1 deletion config/coreboot-x230-maximized.config
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ CONFIG_HAVE_DEBUG_SMBUS=y
# CONFIG_DEBUG_SMI is not set
# CONFIG_DEBUG_MALLOC is not set
# CONFIG_DEBUG_CONSOLE_INIT is not set
# CONFIG_DEBUG_SPI_FLASH is not set
CONFIG_DEBUG_SPI_FLASH=y
# CONFIG_DEBUG_BOOT_STATE is not set
# CONFIG_DEBUG_ADA_CODE is not set
CONFIG_HAVE_EM100_SUPPORT=y
Expand Down
Loading

0 comments on commit 537cc83

Please sign in to comment.