* [Buildroot] [PATCH v7 1/8] package/weston: add EGL dependency for XWayland
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 2/8] package/wpewebkit: fix stale libepoxy dependency comments Joseph Kogut
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
BR2_PACKAGE_WESTON_XWAYLAND currently depends on BR2_PACKAGE_LIBEPOXY,
which implicitly requires either libGL or libEGL. However, the XWayland
glamor support uses libepoxy with EGL, so express that dependency
directly.
This avoids relying on libepoxy's package-level dependencies to provide
the EGL backend.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
package/weston/Config.in | 6 ++++--
package/x11r7/xwayland/xwayland.mk | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/package/weston/Config.in b/package/weston/Config.in
index 774b75d5fb..6f61c3c561 100644
--- a/package/weston/Config.in
+++ b/package/weston/Config.in
@@ -123,6 +123,7 @@ comment "X11 (nested) compositor needs X.org enabled"
config BR2_PACKAGE_WESTON_XWAYLAND
bool "XWayland support"
+ depends on BR2_PACKAGE_HAS_LIBEGL
depends on BR2_PACKAGE_LIBEPOXY
depends on BR2_PACKAGE_XORG7 # xwayland
depends on BR2_USE_MMU # xwayland
@@ -136,8 +137,9 @@ config BR2_PACKAGE_WESTON_XWAYLAND
select BR2_PACKAGE_XLIB_LIBXCURSOR
select BR2_PACKAGE_XWAYLAND
-comment "XWayland support needs libepoxy and X.org enabled"
- depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_LIBEPOXY
+comment "XWayland support needs libepoxy w/ EGL and X.org enabled"
+ depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_XORG7 || \
+ !BR2_PACKAGE_LIBEPOXY
comment "XWayland support needs a toolchain w/ threads, dynamic library"
depends on BR2_USE_MMU
diff --git a/package/x11r7/xwayland/xwayland.mk b/package/x11r7/xwayland/xwayland.mk
index 8fa5260f47..5902f85d4f 100644
--- a/package/x11r7/xwayland/xwayland.mk
+++ b/package/x11r7/xwayland/xwayland.mk
@@ -30,7 +30,7 @@ XWAYLAND_CONF_OPTS = \
-Ddtrace=false \
-Ddocs=false
-ifeq ($(BR2_PACKAGE_LIBEPOXY),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_LIBEPOXY),yy)
XWAYLAND_CONF_OPTS += -Dglamor=true
XWAYLAND_DEPENDENCIES += libepoxy
else
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 2/8] package/wpewebkit: fix stale libepoxy dependency comments
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 1/8] package/weston: add EGL dependency for XWayland Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 3/8] package/libepoxy: remove gl/egl dependency Joseph Kogut
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
wpewebkit depends directly on OpenGL ES and EGL support, but those
dependencies are not imposed by libepoxy itself. Update the inline
comments so they describe the actual dependency source before relaxing
libepoxy's package-level EGL/GL dependency.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
package/wpewebkit/Config.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index c8602f1de6..c4ee5a27f7 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -38,8 +38,8 @@ config BR2_PACKAGE_WPEWEBKIT
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11
depends on BR2_USE_WCHAR # icu, libsoup3
- depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
- depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ depends on BR2_PACKAGE_HAS_LIBEGL # wpebackend-fdo
depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
select BR2_HOST_CMAKE_AT_LEAST_3_20
select BR2_PACKAGE_CAIRO if BR2_ENDIAN = "BIG"
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 3/8] package/libepoxy: remove gl/egl dependency
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 1/8] package/weston: add EGL dependency for XWayland Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 2/8] package/wpewebkit: fix stale libepoxy dependency comments Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 4/8] package/virglrenderer: new package Joseph Kogut
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Libepoxy is a library for handling OpenGL function pointer management.
It has backends for egl/glx, which may at one point have been mandatory
to enable, but the library now builds with none of the above enabled
features, as seen below.
libepoxy 1.5.10
User defined options
Cross files : /home/joseph/br-test-pkg/arm-aarch64/build/libepoxy-1.5.10//buildroot-build/cross-compilation.conf
b_pie : false
b_staticpic : true
buildtype : release
build.cmake_prefix_path: /home/joseph/br-test-pkg/arm-aarch64/host/lib/cmake
default_library : shared
docs : false
egl : no
glx : no
libdir : lib
build.pkg_config_path : /home/joseph/br-test-pkg/arm-aarch64/host/lib/pkgconfig
prefix : /usr
strip : false
tests : false
x11 : false
Removing these dependencies allows for some applications that require it
as a build dependency, but otherwise can run headless or without GL, to
build and function, using other graphics APIs or display pipelines.
Weston, for example, can still use Vulkan and DRM when linked to
libepoxy without GL/EGL/X11 support.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
package/libepoxy/Config.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/libepoxy/Config.in b/package/libepoxy/Config.in
index 9da190b895..4b23497d46 100644
--- a/package/libepoxy/Config.in
+++ b/package/libepoxy/Config.in
@@ -1,12 +1,12 @@
config BR2_PACKAGE_LIBEPOXY
bool "libepoxy"
- depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL
select BR2_PACKAGE_XUTIL_UTIL_MACROS
help
Epoxy is a library for handling OpenGL function pointer
management for you.
- https://github.com/anholt/libepoxy
+ It can be built without EGL or GLX support for packages
+ that use libepoxy as a mandatory dependency but do not need
+ OpenGL entry points at runtime.
-comment "libepoxy needs an OpenGL and/or OpenGL EGL backend"
- depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
+ https://github.com/anholt/libepoxy
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 4/8] package/virglrenderer: new package
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
` (2 preceding siblings ...)
2026-05-16 2:03 ` [Buildroot] [PATCH v7 3/8] package/libepoxy: remove gl/egl dependency Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 5/8] package/virglrenderer: Fix build with glibc 2.43 Joseph Kogut
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Add virglrenderer, an optional dependency of QEMU, which facilitates
acceleration of rendering and optionally video decode through
virtio-gpu.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/virglrenderer/Config.in | 117 +++++++++++++++++++++++++++++++
package/virglrenderer/virglrenderer.hash | 5 ++
package/virglrenderer/virglrenderer.mk | 60 ++++++++++++++++
5 files changed, 184 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 25a047cb3e..774eb0b746 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1765,6 +1765,7 @@ F: package/python-xlib/
F: package/sentry-cli/
F: package/sentry-native/
F: package/unclutter-xfixes/
+F: package/virglrenderer/
N: Joshua Henderson <joshua.henderson@microchip.com>
F: package/qt5/qt5wayland/
diff --git a/package/Config.in b/package/Config.in
index 9cae377fb5..01263e4c44 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -365,6 +365,7 @@ comment "Graphic libraries"
source "package/sdl2_ttf/Config.in"
source "package/spirv-headers/Config.in"
source "package/tk/Config.in"
+ source "package/virglrenderer/Config.in"
source "package/vulkan-headers/Config.in"
source "package/vulkan-loader/Config.in"
source "package/vulkan-sdk/Config.in"
diff --git a/package/virglrenderer/Config.in b/package/virglrenderer/Config.in
new file mode 100644
index 0000000000..041bb63a1c
--- /dev/null
+++ b/package/virglrenderer/Config.in
@@ -0,0 +1,117 @@
+config BR2_PACKAGE_VIRGLRENDERER
+ bool "virglrenderer"
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_USE_MMU # fork()
+ select BR2_PACKAGE_LIBEPOXY
+ help
+ A library for accelerated graphics and compute in
+ virtualized guests.
+
+ virglrenderer can be built without virgl, venus, or DRM
+ backends, although such a build will not provide guest
+ graphics or compute acceleration by itself.
+
+ https://qemu.readthedocs.io/en/v10.0.3/system/devices/virtio-gpu.html#virtio-gpu-virglrenderer
+
+if BR2_PACKAGE_VIRGLRENDERER
+comment "virglrenderer needs virgl, venus, or a DRM backend for guest acceleration"
+ depends on !BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+
+config BR2_PACKAGE_VIRGLRENDERER_VIRGL
+ bool "virgl"
+ default y
+ depends on (BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGBM) \
+ || BR2_PACKAGE_HAS_LIBGL
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ help
+ Enable API-level OpenGL acceleration over virtio-gpu.
+
+ Say 'y' if you want to run applications with OpenGL
+ acceleration in virtualized guests. Requires host
+ support for OpenGL.
+
+ https://docs.mesa3d.org/drivers/virgl.html
+
+comment "virgl needs OpenGL or OpenGL EGL and libgbm"
+ depends on !((BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGBM) \
+ || BR2_PACKAGE_HAS_LIBGL)
+
+config BR2_PACKAGE_VIRGLRENDERER_VENUS
+ bool "venus"
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER
+ depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader
+ depends on !BR2_STATIC_LIBS # vulkan-loader
+ depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ select BR2_PACKAGE_VULKAN_HEADERS
+ select BR2_PACKAGE_VULKAN_LOADER
+ help
+ Enable API-level Vulkan acceleration over virtio-gpu.
+
+ Say 'y' if you want to run applications with Vulkan
+ acceleration in virtualized guests. Requires host
+ support for Vulkan.
+
+ https://docs.mesa3d.org/drivers/venus.html
+
+config BR2_PACKAGE_VIRGLRENDERER_VAAPI
+ bool "vaapi support"
+ depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBVA
+ help
+ Enable hardware accelerated video encode/decode through
+ libva over virtio-gpu.
+
+comment "DRM backends"
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_AMDGPU
+ bool "amdgpu"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_AMD
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBDRM_AMDGPU
+ help
+ Enable DRM backend for amdgpu, used by Gallium radeonsi
+ and RADV vulkan drivers.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_INTEL
+ bool "intel"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for i915, used by Gallium i915/Iris
+ and Intel vulkan drivers.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_MSM
+ bool "msm"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
+ depends on !BR2_arm
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for msm, used by Gallium freedreno
+ driver.
+
+config BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_PANFROST
+ bool "panfrost"
+ default y if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST
+ default y if BR2_PACKAGE_MESA3D_VULKAN_DRIVER_PANFROST
+ select BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ select BR2_PACKAGE_LIBDRM
+ help
+ Enable DRM backend for Panfrost, used by the panfrost
+ Gallium/vulkan drivers.
+
+endif
+
+comment "virglrenderer needs a toolchain w/ gcc >= 4.9"
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+config BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+ bool
diff --git a/package/virglrenderer/virglrenderer.hash b/package/virglrenderer/virglrenderer.hash
new file mode 100644
index 0000000000..03da595091
--- /dev/null
+++ b/package/virglrenderer/virglrenderer.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256 065bc56e89e6f631f96101cd62eba0748e48eb888b434edc86e89d05395e76f3 virglrenderer-1.3.0.tar.gz
+
+# License
+sha256 3b32caf16e2402c2aff2b716858713f3e1feded85c25e71bf829816ee5009402 COPYING
diff --git a/package/virglrenderer/virglrenderer.mk b/package/virglrenderer/virglrenderer.mk
new file mode 100644
index 0000000000..4e7bcbb849
--- /dev/null
+++ b/package/virglrenderer/virglrenderer.mk
@@ -0,0 +1,60 @@
+################################################################################
+#
+# virglrenderer
+#
+################################################################################
+
+VIRGLRENDERER_VERSION = 1.3.0
+VIRGLRENDERER_SITE = https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/$(VIRGLRENDERER_VERSION)
+VIRGLRENDERER_LICENSE = MIT
+VIRGLRENDERER_LICENSE_FILES = COPYING
+VIRGLRENDERER_INSTALL_STAGING = YES
+VIRGLRENDERER_DEPENDENCIES = \
+ libepoxy \
+ host-pkgconf \
+ host-python3 \
+ host-python-pyyaml
+VIRGLRENDERER_CPE_ID_VALID = YES
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VIRGL),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGBM),yy)
+VIRGLRENDERER_PLATFORMS += egl
+VIRGLRENDERER_DEPENDENCIES += libegl \
+ libgbm
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+VIRGLRENDERER_PLATFORMS += glx
+VIRGLRENDERER_DEPENDENCIES += libgl
+endif
+endif # BR2_PACKAGE_VIRGLRENDERER_VIRGL
+
+VIRGLRENDERER_CONF_OPTS += -Dplatforms=$(subst $(space),$(comma),$(VIRGLRENDERER_PLATFORMS))
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VENUS),y)
+VIRGLRENDERER_CONF_OPTS += -Dvenus=true
+VIRGLRENDERER_DEPENDENCIES += vulkan-headers \
+ vulkan-loader
+else
+VIRGLRENDERER_CONF_OPTS += -Dvenus=false
+endif
+
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_AMDGPU) += amdgpu-experimental
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_INTEL) += i915-experimental
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_MSM) += msm
+VIRGLRENDERER_DRM_BACKENDS-$(BR2_PACKAGE_VIRGLRENDERER_DRM_BACKEND_PANFROST) += panfrost-experimental
+
+VIRGLRENDERER_CONF_OPTS += -Ddrm-renderers=$(subst $(space),$(comma),$(VIRGLRENDERER_DRM_BACKENDS-y))
+
+ifneq ($(VIRGLRENDERER_DRM_BACKENDS-y),)
+VIRGLRENDERER_DEPENDENCIES += libdrm
+endif
+
+ifeq ($(BR2_PACKAGE_VIRGLRENDERER_VAAPI),y)
+VIRGLRENDERER_CONF_OPTS += -Dvideo=true
+VIRGLRENDERER_DEPENDENCIES += libva libdrm
+else
+VIRGLRENDERER_CONF_OPTS += -Dvideo=false
+endif
+
+$(eval $(meson-package))
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 5/8] package/virglrenderer: Fix build with glibc 2.43
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
` (3 preceding siblings ...)
2026-05-16 2:03 ` [Buildroot] [PATCH v7 4/8] package/virglrenderer: new package Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 6/8] package/qemu: add OpenGL config Joseph Kogut
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Add an upstream patch to fix the build with glibc 2.43, not present in a
stable release yet.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
.../0001-fix-build-with-glibc-2.43.patch | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/package/virglrenderer/0001-fix-build-with-glibc-2.43.patch b/package/virglrenderer/0001-fix-build-with-glibc-2.43.patch
new file mode 100644
index 0000000000..fda1d9b218
--- /dev/null
+++ b/package/virglrenderer/0001-fix-build-with-glibc-2.43.patch
@@ -0,0 +1,39 @@
+From 986b5fc57b07c06b5e0b3a3694d06898ebc80163 Mon Sep 17 00:00:00 2001
+From: Maximilian Hofmann <maxi@maxiicodes.dev>
+Date: Thu, 26 Feb 2026 23:28:58 +0100
+Subject: [PATCH] fix: build with glibc 2.43
+
+Several glibc functions now return a const pointer if the input is a
+const pointer and a non-const pointer if the input is non-const, causing
+a build failure.
+
+Fix this by declaring the output pointers as const if they are never
+modified, and for the lone failure where the output is modified, instead
+make the input non-const.
+
+Signed-off-by: Maximilian Hofmann <maxi@maxiicodes.dev>
+Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1599>
+
+Upstream: https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/986b5fc57b07c06b5e0b3a3694d06898ebc80163
+
+Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
+---
+ src/gallium/auxiliary/tgsi/tgsi_text.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
+index db7d7b95..7e37bf79 100644
+--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
++++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
+@@ -84,7 +84,7 @@ streq_nocase_uprcase(const char *str1,
+ static inline bool skip_n_chars(const char **pcur,
+ int n)
+ {
+- char* str = memchr(*pcur, '\0', n);
++ const char* str = memchr(*pcur, '\0', n);
+ if (unlikely(str)) {
+ *pcur = str;
+ return false;
+--
+2.53.0
+
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 6/8] package/qemu: add OpenGL config
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
` (4 preceding siblings ...)
2026-05-16 2:03 ` [Buildroot] [PATCH v7 5/8] package/virglrenderer: Fix build with glibc 2.43 Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 7/8] package/qemu: add virglrenderer integration Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 8/8] support/testing: add virglrenderer test Joseph Kogut
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
package/qemu/Config.in | 14 ++++++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 2a6aa288d3..d4e4e37a3e 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -112,6 +112,20 @@ config BR2_PACKAGE_QEMU_SDL
Say 'y' to enable the SDL frontend, that is, a graphical
window presenting the VM's display.
+config BR2_PACKAGE_QEMU_OPENGL
+ bool "Enable OpenGL"
+ depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # needs libepoxy w/ EGL or GL
+ 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`
+
+comment "OpenGL support needs an OpenGL and/or OpenGL EGL backend"
+ depends on !(BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+
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 2199db38cf..aff1762fb9 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -272,6 +272,13 @@ 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_STATIC_LIBS),y)
QEMU_OPTS += --static
endif
@@ -329,7 +336,6 @@ define QEMU_CONFIGURE_CMDS
--disable-membarrier \
--disable-mpath \
--disable-netmap \
- --disable-opengl \
--disable-oss \
--disable-pa \
--disable-plugins \
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 7/8] package/qemu: add virglrenderer integration
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
` (5 preceding siblings ...)
2026-05-16 2:03 ` [Buildroot] [PATCH v7 6/8] package/qemu: add OpenGL config Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
2026-05-16 2:03 ` [Buildroot] [PATCH v7 8/8] support/testing: add virglrenderer test Joseph Kogut
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Add optional virglrenderer integration, 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 | 21 +++++++++++++++++++++
package/qemu/qemu.mk | 7 +++++++
2 files changed, 28 insertions(+)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index d4e4e37a3e..dbae7c4de4 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -126,6 +126,27 @@ config BR2_PACKAGE_QEMU_OPENGL
comment "OpenGL support needs an OpenGL and/or OpenGL EGL backend"
depends on !(BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+config BR2_PACKAGE_QEMU_VIRGLRENDERER
+ bool "Enable virglrenderer"
+ depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL
+ select BR2_PACKAGE_QEMU_OPENGL
+ select BR2_PACKAGE_VIRGLRENDERER
+ help
+ Say 'y' to enable qemu support for virglrenderer.
+ virglrenderer backends such as virgl, venus, or DRM native
+ context are configured under the virglrenderer package.
+
+ Run qemu with `-device virtio-gpu-gl`
+
+ https://qemu.readthedocs.io/en/v10.0.3/system/devices/virtio-gpu.html#virtio-gpu-virglrenderer
+
+comment "virglrenderer needs OpenGL accelerated display frontend support"
+ depends on !(BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+
+comment "virglrenderer needs virgl, venus, or a DRM backend for guest acceleration"
+ depends on BR2_PACKAGE_QEMU_VIRGLRENDERER
+ depends on !BR2_PACKAGE_VIRGLRENDERER_HAS_BACKEND
+
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 aff1762fb9..4f4786532c 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -279,6 +279,13 @@ 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
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread* [Buildroot] [PATCH v7 8/8] support/testing: add virglrenderer test
2026-05-16 2:03 [Buildroot] [PATCH v7 0/8] Add virglrenderer support Joseph Kogut
` (6 preceding siblings ...)
2026-05-16 2:03 ` [Buildroot] [PATCH v7 7/8] package/qemu: add virglrenderer integration Joseph Kogut
@ 2026-05-16 2:03 ` Joseph Kogut
7 siblings, 0 replies; 9+ messages in thread
From: Joseph Kogut @ 2026-05-16 2:03 UTC (permalink / raw)
To: buildroot
Cc: Adrian Perez de Castro, Eric Le Bihan, Romain Naour, Joseph Kogut,
Raphael Pavlidis, Thomas Petazzoni
Add basic smoke test for glmark2 running in a nested qemu guest with
virtio-gpu-gl-pci.
The outer machine uses the Mesa softpipe driver for GLES support with
minimal dependencies. Just test virgl for now, as lavapipe
(software Vulkan driver) requires LLVM, and this validates
virglrenderer.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
DEVELOPERS | 1 +
.../testing/tests/package/test_virglrenderer.py | 117 +++++++++++++++++++++
.../test_virglrenderer/linux-virgl.fragment | 6 ++
.../test_virglrenderer/remove-qemu-blobs.sh | 12 +++
.../rootfs-overlay/etc/profile.d/stty-raw.sh | 3 +
5 files changed, 139 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 774eb0b746..0c0779e8b3 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1766,6 +1766,7 @@ F: package/sentry-cli/
F: package/sentry-native/
F: package/unclutter-xfixes/
F: package/virglrenderer/
+F: support/testing/tests/package/test_virglrenderer.py
N: Joshua Henderson <joshua.henderson@microchip.com>
F: package/qt5/qt5wayland/
diff --git a/support/testing/tests/package/test_virglrenderer.py b/support/testing/tests/package/test_virglrenderer.py
new file mode 100644
index 0000000000..521a4b67cd
--- /dev/null
+++ b/support/testing/tests/package/test_virglrenderer.py
@@ -0,0 +1,117 @@
+import os
+
+import infra
+import infra.basetest
+
+
+class TestVirglrendererNestedQemu(infra.basetest.BRTest):
+ # We reuse the same initramfs-enabled kernel for the outer target and
+ # nested guest. This fragment adds initramfs and 9p support so the outer
+ # target can mount the runner's images directory and launch the same kernel
+ # under target-side QEMU. We also enable DRM_VGEM to create the necessary
+ # DRI device node, a requirement of qemu when using virgl.
+ kern_frag = \
+ infra.filepath("tests/package/test_virglrenderer/linux-virgl.fragment")
+ post_build = \
+ infra.filepath("tests/package/test_virglrenderer/remove-qemu-blobs.sh")
+ rootfs_overlay = \
+ infra.filepath("tests/package/test_virglrenderer/rootfs-overlay")
+
+ # Softpipe has no hardware dependencies and does not pull LLVM into the
+ # build, unlike llvmpipe/lavapipe.
+ config = \
+ f"""
+ BR2_x86_64=y
+ BR2_x86_nehalem=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_STABLE=y
+ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+ BR2_ROOTFS_OVERLAY="{rootfs_overlay}"
+ BR2_ROOTFS_POST_BUILD_SCRIPT="{post_build}"
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.21"
+ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config"
+ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kern_frag}"
+ BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
+ # BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
+ BR2_PACKAGE_GLMARK2=y
+ BR2_PACKAGE_LIBGLVND=y
+ BR2_PACKAGE_MESA3D=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
+ BR2_PACKAGE_MESA3D_OPENGL_EGL=y
+ BR2_PACKAGE_MESA3D_OPENGL_ES=y
+ BR2_PACKAGE_QEMU=y
+ BR2_PACKAGE_QEMU_SYSTEM=y
+ # BR2_PACKAGE_QEMU_SYSTEM_KVM is not set
+ BR2_PACKAGE_QEMU_SYSTEM_TCG=y
+ BR2_PACKAGE_QEMU_CHOOSE_TARGETS=y
+ BR2_PACKAGE_QEMU_TARGET_X86_64=y
+ BR2_PACKAGE_QEMU_VIRGLRENDERER=y
+ BR2_TARGET_ROOTFS_INITRAMFS=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def boot_outer(self):
+ kern = os.path.join(self.builddir, "images", "bzImage")
+ img_dir = os.path.join(self.builddir, "images")
+ virtfs_tag = "br-imgs"
+ virtfs_opts = [
+ f"local,path={img_dir}",
+ f"mount_tag={virtfs_tag}",
+ "security_model=mapped-xattr",
+ "readonly=on"
+ ]
+ self.emulator.boot(arch="x86_64",
+ kernel=kern,
+ kernel_cmdline=["console=ttyS0"],
+ options=["-cpu", "Nehalem",
+ "-m", "1536M",
+ "-smp", "4",
+ "-vga", "none",
+ "-virtfs", ",".join(virtfs_opts)])
+ self.emulator.login()
+ self.assertRunOk(f"mount -t 9p {virtfs_tag} /mnt/")
+
+ def boot_nested(self):
+ qemu_cmd = "env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe"
+ qemu_cmd += " qemu-system-x86_64"
+ qemu_cmd += " -M q35,accel=tcg"
+ qemu_cmd += " -cpu Nehalem"
+ qemu_cmd += " -m 512M"
+ qemu_cmd += " -smp 4"
+ qemu_cmd += " -nodefaults"
+ qemu_cmd += " -display egl-headless,gl=on"
+ qemu_cmd += " -device virtio-gpu-gl-pci"
+ qemu_cmd += " -serial stdio"
+ qemu_cmd += " -kernel /mnt/bzImage"
+ qemu_cmd += " -append 'console=ttyS0 br-nested-virgl'"
+
+ # qemu runs in the foreground on the current serial console. Once it
+ # starts, the next login prompt belongs to the nested guest.
+ self.emulator.qemu.sendline(qemu_cmd)
+ self.emulator.login(timeout=180)
+
+ def test_run(self):
+ self.boot_outer()
+ self.assertRunOk("while [ ! -e /dev/dri/renderD128 ]; do sleep 1; done",
+ timeout=30)
+
+ self.boot_nested()
+
+ out, ret = self.emulator.run("cat /proc/cmdline")
+ self.assertEqual(ret, 0)
+ self.assertIn("br-nested-virgl", out[0])
+
+ cmd = "env MESA_LOADER_DRIVER_OVERRIDE=virtio_gpu"
+ cmd += " glmark2-es2-drm --validate --off-screen"
+ cmd += " --benchmark build:use-vbo=false"
+ out, ret = self.emulator.run(cmd, timeout=60)
+ self.assertEqual(ret, 0)
+
+ renderer = "\n".join([line for line in out if "GL_RENDERER:" in line])
+ self.assertRegex(renderer, r"(?i)virgl")
+ self.assertRegex(renderer, r"(?i)softpipe")
diff --git a/support/testing/tests/package/test_virglrenderer/linux-virgl.fragment b/support/testing/tests/package/test_virglrenderer/linux-virgl.fragment
new file mode 100644
index 0000000000..1023aedc6f
--- /dev/null
+++ b/support/testing/tests/package/test_virglrenderer/linux-virgl.fragment
@@ -0,0 +1,6 @@
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_DRM_VGEM=y
+CONFIG_NET_9P=y
+CONFIG_NET_9P_VIRTIO=y
+CONFIG_9P_FS=y
+CONFIG_9P_FS_POSIX_ACL=y
diff --git a/support/testing/tests/package/test_virglrenderer/remove-qemu-blobs.sh b/support/testing/tests/package/test_virglrenderer/remove-qemu-blobs.sh
new file mode 100755
index 0000000000..ff040aa96b
--- /dev/null
+++ b/support/testing/tests/package/test_virglrenderer/remove-qemu-blobs.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -eu
+
+qemu_dir="${TARGET_DIR}/usr/share/qemu"
+
+find "${qemu_dir}" -type f \
+ ! -name 'bios-256k.bin' \
+ ! -name 'kvmvapic.bin' \
+ ! -name 'linuxboot.bin' \
+ ! -name 'linuxboot_dma.bin' \
+ -delete
diff --git a/support/testing/tests/package/test_virglrenderer/rootfs-overlay/etc/profile.d/stty-raw.sh b/support/testing/tests/package/test_virglrenderer/rootfs-overlay/etc/profile.d/stty-raw.sh
new file mode 100644
index 0000000000..bc1857a910
--- /dev/null
+++ b/support/testing/tests/package/test_virglrenderer/rootfs-overlay/etc/profile.d/stty-raw.sh
@@ -0,0 +1,3 @@
+# Avoid double-cooking the nested serial console, otherwise the test
+# infrastructure cannot reliably retrieve return codes.
+grep -Fq br-nested-virgl /proc/cmdline && stty raw
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread