[PATCH 1/1] doc: describe QEMU VGA emulation
Simon Glass
sjg at chromium.org
Wed Dec 31 20:30:40 CET 2025
Hi Heinrich,
On Wed, 31 Dec 2025 at 06:44, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Describe how the QEMU defconfigs can be used with an emulated GPU.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> doc/board/emulation/index.rst | 1 +
> doc/board/emulation/video.rst | 63 +++++++++++++++++++++++++++++++++++
> 2 files changed, 64 insertions(+)
> create mode 100644 doc/board/emulation/video.rst
Reviewed-by: Simon Glass <simon.glass at canonical.com>
>
> diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst
> index f8908166276..bda2240725f 100644
> --- a/doc/board/emulation/index.rst
> +++ b/doc/board/emulation/index.rst
> @@ -15,6 +15,7 @@ Emulation
> qemu-sbsa
> qemu-x86
> qemu-xtensa
> + video
>
> Also see
>
> diff --git a/doc/board/emulation/video.rst b/doc/board/emulation/video.rst
> new file mode 100644
> index 00000000000..4943dcabeab
> --- /dev/null
> +++ b/doc/board/emulation/video.rst
> @@ -0,0 +1,63 @@
> +.. SPDX-License-Identifier: GPL-2.0-or-later
> +
> +Emulation of a graphics adapter
> +===============================
> +
> +Currently QEMU's ``bochs-display`` is the only emulated GPU that U-Boot's
> +generic QEMU defconfigs support. It emulates a PCIe connected graphics card
PCIe-connected
> +with VESA 2.0 VBE extensions.
> +
> +The following parameters can be specified.
> +
> +edid
> + controls if EDID information is available. Allowable values are ``off`` and
> + ``on``. The default is on.
> +
> +vgamem
> + specifies the display memory size. The default value is 16 MiB.
> + For UHD resolution 32 MiB is required.
> +
> +The following configuration parameters are relevant:
> +
> +CONFIG_VIDEO_BOCHS
> + enable support for the Bochs GPU.
> +
> +CONFIG_VIDEO_BOCHS_SIZE_X
> + defines the display width.
> +
> +CONFIG_VIDEO_BOCHS_SIZE_Y
> + defines isplay height.
display
> +
> +CONFIG_VIDEO_PCI_DEFAULT_FB_SIZE
> + sets the framebuffer size that QEMU can use for a device driver that is
> + enabled after relocation. This should be chosed as
chosen
> +
> + .. code-block::
> +
> + CONFIG_VIDEO_PCI_DEFAULT_FB_SIZE >=
> + 4 * CONFIG_VIDEO_BOCHS_SIZE_X * CONFIG_VIDEO_BOCHS_SIZE_Y
> +
> +Here is an example QEMU invocation for qemu-riscv64_smode_defconfig:
> +
> +.. code-block:: bash
> +
> + qemu-system-riscv64 \
> + -M virt \
> + -device bochs-display,vgamem=33554432 \
> + -serial mon:stdio \
> + -device qemu-xhci \
> + -device usb-kbd \
> + -kernel u-boot
> +
> +``mon:stdio`` provides a serial console. ``qemu-xhci`` a USB root hub.
> +``usb-kbd`` a USB keyboard.
> +
> +To start QEMU without GPU emulation use parameter ``-nographic`` like in the
> +following example.
> +
> +.. code-block:: bash
> +
> + qemu-system-riscv64 \
> + -M virt \
> + -nographic \
> + -kernel u-boot
> --
> 2.51.0
>
The Concept tree has build-qemu which handles these details. I wonder
if those scripts could be put into the extra repo Tom created?
Regards,
Simon
More information about the U-Boot
mailing list