@@ -372,6 +372,7 @@ F: package/gpsd/
F: package/gptfdisk/
F: package/hddtemp/
F: package/hdparm/
+F: package/igt-gpu-tools/
F: package/intel-gmmlib/
F: package/intel-mediadriver/
F: package/intel-mediasdk/
@@ -323,6 +323,7 @@ comment "Graphic applications"
source "package/glmark2/Config.in"
source "package/glslsandbox-player/Config.in"
source "package/gnuplot/Config.in"
+ source "package/igt-gpu-tools/Config.in"
source "package/ivi-homescreen/Config.in"
source "package/jhead/Config.in"
source "package/kmscube/Config.in"
new file mode 100644
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_IGT_GPU_TOOLS
+ bool "igt-gpu-tools"
+ depends on BR2_USE_MMU # fork()
+ depends on BR2_ENABLE_LOCALE
+ depends on !BR2_STATIC_LIBS
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_PACKAGE_HAS_UDEV
+ depends on BR2_USE_WCHAR # elfutils
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 # linux/dma-buf.h
+ select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps-ng
+ select BR2_PACKAGE_CAIRO
+ select BR2_PACKAGE_CAIRO_PNG
+ select BR2_PACKAGE_ELFUTILS
+ select BR2_PACKAGE_KMOD
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBPCIACCESS
+ select BR2_PACKAGE_PIXMAN
+ select BR2_PACKAGE_PROCPS_NG
+ select BR2_PACKAGE_ZLIB
+ help
+ IGT GPU Tools is a collection of tools for development and
+ testing of the DRM drivers.
+
+ https://gitlab.freedesktop.org/drm/igt-gpu-tools
+
+comment "igt-gpu-tools needs udev /dev management and toolchain w/ threads, wchar, dynamic library, locale, headers >= 4.11"
+ depends on BR2_USE_MMU
+ depends on !BR2_PACKAGE_HAS_UDEV || BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
+ !BR2_ENABLE_LOCALE || \
+ !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
new file mode 100644
@@ -0,0 +1,5 @@
+# Locally calculated from download
+sha256 de6e9443d569e76333ec6c8ffc53937b6831224161fe69bf2f07efad3bd0e04a igt-gpu-tools-0ee4074685c1e184f2d3612ea6eb4d126f9a2e23.tar.bz2
+
+# Hash for license file:
+sha256 1b7e266857b05808660f42369a4a797459d7b7bec7245e378aa28a8db2f213da COPYING
new file mode 100644
@@ -0,0 +1,52 @@
+################################################################################
+#
+# igt-gpu-tools
+#
+################################################################################
+
+IGT_GPU_TOOLS_VERSION = 0ee4074685c1e184f2d3612ea6eb4d126f9a2e23
+IGT_GPU_TOOLS_SOURCE = igt-gpu-tools-$(IGT_GPU_TOOLS_VERSION).tar.bz2
+IGT_GPU_TOOLS_SITE = https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/archive/$(IGT_GPU_TOOLS_VERSION)
+IGT_GPU_TOOLS_LICENSE = MIT
+IGT_GPU_TOOLS_LICENSE_FILES = COPYING
+IGT_GPU_TOOLS_INSTALL_STAGING = YES
+IGT_GPU_TOOLS_DEPENDENCIES = \
+ host-pkgconf \
+ cairo \
+ elfutils \
+ kmod \
+ libdrm \
+ libglib2 \
+ libpciaccess \
+ pixman \
+ procps-ng \
+ udev \
+ zlib
+
+# On x86 systems, libigt resolves igt_half_to_float and igt_float_to_half as
+# indirect functions at runtime by checking CPU features with igt_x86_features.
+# The igt_x86_features function is implemented is a different object and the
+# call uses the PLT itself. If lazy binding is disabled, this causes a segfault
+# while resolving the symbols for libigt on x64 systems. Disable BINDNOW on X86
+# systems to prevent the segfaults.
+# https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/102
+# https://bugs.gentoo.org/788625#c13
+ifeq ($(BR2_i386)$(BR2_x86_64)x$(BR2_RELRO_NONE),yx)
+IGT_GPU_TOOLS_LDFLAGS = $(TARGET_LDFLAGS) -Wl,-z,lazy
+endif
+
+ifeq ($(BR2_PACKAGE_JSON_C),y)
+IGT_GPU_TOOLS_CONF_OPTS += -Drunner=enabled
+IGT_GPU_TOOLS_DEPENDENCIES += json-c
+else
+IGT_GPU_TOOLS_CONF_OPTS += -Drunner=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
+IGT_GPU_TOOLS_CONF_OPTS += -Dlibunwind=enabled
+IGT_GPU_TOOLS_DEPENDENCIES += libunwind
+else
+IGT_GPU_TOOLS_CONF_OPTS += -Dlibunwind=disabled
+endif
+
+$(eval $(meson-package))