]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
doc: describe QEMU VGA emulation
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 1 Jan 2026 14:17:43 +0000 (15:17 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 28 Jan 2026 20:08:41 +0000 (21:08 +0100)
Describe how the QEMU defconfigs can be used with an emulated GPU.

Reviewed-by: Simon Glass <simon.glass@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/board/emulation/index.rst
doc/board/emulation/video.rst [new file with mode: 0644]

index 896f44c80874eb24a9ae3ae60ab96620b2cfc884..b0139490e2157b3a35b01d156b269edbc203c688 100644 (file)
@@ -9,6 +9,7 @@ Emulation
    acpi
    blkdev
    network
+   video
    qemu-arm
    qemu-mips
    qemu-ppce500
diff --git a/doc/board/emulation/video.rst b/doc/board/emulation/video.rst
new file mode 100644 (file)
index 0000000..c144d72
--- /dev/null
@@ -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
+with VESA 2.0 VBE extensions.
+
+The following parameters can be specified:
+
+edid
+    controls whether 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 the display height.
+
+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 chosen as
+
+    .. 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``, as shown in
+the following example:
+
+.. code-block:: bash
+
+    qemu-system-riscv64 \
+      -M virt \
+      -nographic \
+      -kernel u-boot