Mimoja has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34599 )
Change subject: drivers/emulation/qemu: Show splashscreen on bochs VGA ......................................................................
drivers/emulation/qemu: Show splashscreen on bochs VGA
Show the coreboot bootsplash in qemu when running with bochs vga.
By default the framebuffer will be initialized in 800x600@32. This can be overwriten by configuration.
The same code does not work on the cirrus vga, as it only shows a white screen - more investigation will be required.
This was tested in 1280x1024 by setting CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_{X,Y}RES
Change-Id: I4bec06d22423627e8f429c4b47e0dc9920f1464e Signed-off-by: Johanna Schander coreboot@mimoja.de --- M src/device/Kconfig M src/drivers/emulation/qemu/bochs.c 2 files changed, 18 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/34599/1
diff --git a/src/device/Kconfig b/src/device/Kconfig index e605bc2..75b25a1 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -392,18 +392,6 @@ default 0x11A if FRAMEBUFFER_VESA_MODE_11A default 0x11B if FRAMEBUFFER_VESA_MODE_11B default 0x118 if FRAMEBUFFER_VESA_MODE_USER - -config BOOTSPLASH - prompt "Show graphical bootsplash" - bool - help - This option shows a graphical bootsplash screen. The graphics are - loaded from the CBFS file bootsplash.jpg. - - You can either specify the location and file name of the - image in the 'General' section or add it manually to CBFS, using, - for example, cbfstool. - endif # FRAMEBUFFER_SET_VESA_MODE
choice @@ -447,6 +435,21 @@ def_bool y depends on VBE_LINEAR_FRAMEBUFFER || GENERIC_LINEAR_FRAMEBUFFER
+config BOOTSPLASH + prompt "Show graphical bootsplash" + bool + depends on LINEAR_FRAMEBUFFER + help + This option shows a graphical bootsplash screen. The graphics are + loaded from the CBFS file bootsplash.jpg. + + You can either specify the location and file name of the + image in the 'General' section or add it manually to CBFS, using, + for example, cbfstool. + + It might not be implemented for every framebuffer initialization platform. + + config LINEAR_FRAMEBUFFER_MAX_WIDTH int "Maximum width in pixels" depends on LINEAR_FRAMEBUFFER && MAINBOARD_USE_LIBGFXINIT diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index 22095ef..c15255e 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -15,6 +15,7 @@ #include <edid.h> #include <stdlib.h> #include <arch/io.h> +#include <bootsplash.h> #include <boot/coreboot_tables.h> #include <console/console.h> #include <device/device.h> @@ -122,6 +123,8 @@ edid.panel_bits_per_pixel = 24; edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); set_vbe_mode_info_valid(&edid, addr); + if (CONFIG(BOOTSPLASH)) + set_bootsplash((unsigned char *)addr, width, height, 32); }
static void bochs_init_text_mode(struct device *dev)