From: Joseph Kogut <joseph.kogut@gmail.com>
To: buildroot@buildroot.org
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>,
Romain Naour <romain.naour@gmail.com>,
Joseph Kogut <joseph.kogut@gmail.com>,
Adam Ford <aford173@gmail.com>,
Steve deRosier <derosier@cal-sierra.com>
Subject: [Buildroot] [PATCH v3 2/2] package/qemu: add virglrenderer support
Date: Thu, 19 Feb 2026 17:23:54 -0800 [thread overview]
Message-ID: <20260219-virglrenderer-v3-2-e2ff1a23be3f@gmail.com> (raw)
In-Reply-To: <20260219-virglrenderer-v3-0-e2ff1a23be3f@gmail.com>
Add optional virglrenderer support, along with enabling OpenGL when
necessary.
https://qemu.readthedocs.io/en/v10.0.3/system/devices/virtio-gpu.html#virtio-gpu-virglrenderer
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
package/qemu/Config.in | 28 ++++++++++++++++++++++++++++
package/qemu/qemu.mk | 15 ++++++++++++++-
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index e16eafe446..25921368e9 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -116,6 +116,34 @@ config BR2_PACKAGE_QEMU_SDL
Say 'y' to enable the SDL frontend, that is, a graphical
window presenting the VM's display.
+comment "OpenGL and virglrenderer need an OpenGL and/or OpenGL EGL backend"
+ depends on !(BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+
+config BR2_PACKAGE_QEMU_OPENGL
+ bool "Enable OpenGL"
+ depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+ select BR2_PACKAGE_LIBEPOXY
+ help
+ Say 'y' to enable OpenGL accelerated display frontend support.
+ This is necessary to efficiently display frames rendered in a
+ guest on the host.
+
+ Run qemu with `-display sdl,gl=on`
+
+config BR2_PACKAGE_QEMU_VIRGLRENDERER
+ bool "Enable virglrenderer"
+ depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # virglrenderer
+ select BR2_PACKAGE_QEMU_OPENGL
+ select BR2_PACKAGE_VIRGLRENDERER
+ help
+ Say 'y' to enable virglrenderer, enabling GL and Vulkan
+ passthrough from the host to the guest through virtio-gpu.
+ This enables the guest to have accelerated GL and/or Vulkan.
+
+ Run qemu with `-device virtio-gpu-gl`
+
+ https://qemu.readthedocs.io/en/v10.0.3/system/devices/virtio-gpu.html#virtio-gpu-virglrenderer
+
config BR2_PACKAGE_QEMU_FDT
bool "Enable FDT"
select BR2_PACKAGE_DTC
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 97f8e22091..e250128dfa 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -274,6 +274,20 @@ else
QEMU_OPTS += --disable-usb-redir
endif
+ifeq ($(BR2_PACKAGE_QEMU_OPENGL),y)
+QEMU_OPTS += --enable-opengl
+QEMU_DEPENDENCIES += libepoxy
+else
+QEMU_OPTS += --disable-opengl
+endif
+
+ifeq ($(BR2_PACKAGE_QEMU_VIRGLRENDERER),y)
+QEMU_OPTS += --enable-virglrenderer
+QEMU_DEPENDENCIES += virglrenderer
+else
+QEMU_OPTS += --disable-virglrenderer
+endif
+
ifeq ($(BR2_STATIC_LIBS),y)
QEMU_OPTS += --static
endif
@@ -330,7 +344,6 @@ define QEMU_CONFIGURE_CMDS
--disable-membarrier \
--disable-mpath \
--disable-netmap \
- --disable-opengl \
--disable-oss \
--disable-pa \
--disable-plugins \
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-02-20 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 1:23 [Buildroot] [PATCH v3 0/2] Add virglrenderer support Joseph Kogut
2026-02-20 1:23 ` [Buildroot] [PATCH v3 1/2] package/virglrenderer: new package Joseph Kogut
2026-02-20 1:23 ` Joseph Kogut [this message]
2026-03-04 22:29 ` [Buildroot] [PATCH v3 2/2] package/qemu: add virglrenderer support Romain Naour via buildroot
2026-03-11 19:30 ` Joseph Kogut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260219-virglrenderer-v3-2-e2ff1a23be3f@gmail.com \
--to=joseph.kogut@gmail.com \
--cc=aford173@gmail.com \
--cc=buildroot@buildroot.org \
--cc=derosier@cal-sierra.com \
--cc=eric.le.bihan.dev@free.fr \
--cc=romain.naour@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox