From patchwork Thu Mar 21 23:07:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1914643 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V11Md30Bpz1yXy for ; Fri, 22 Mar 2024 10:07:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3C8AB415D3; Thu, 21 Mar 2024 23:07:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CB1d7UhxL0K9; Thu, 21 Mar 2024 23:07:48 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6950041552 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 6950041552; Thu, 21 Mar 2024 23:07:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 535C51BF36D for ; Thu, 21 Mar 2024 23:07:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3FF9941552 for ; Thu, 21 Mar 2024 23:07:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fHpFYZwK_y5M for ; Thu, 21 Mar 2024 23:07:45 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=85.13.140.57; helo=dd20012.kasserver.com; envelope-from=bernd@kuhls.net; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 3769041526 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3769041526 Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3769041526 for ; Thu, 21 Mar 2024 23:07:44 +0000 (UTC) Received: from fli4l.lan.fli4l (p54a1b269.dip0.t-ipconnect.de [84.161.178.105]) by dd20012.kasserver.com (Postfix) with ESMTPSA id 444BFA4C3103; Fri, 22 Mar 2024 00:07:41 +0100 (CET) Received: from bruckner.lan.fli4l ([192.168.1.1]:33670) by fli4l.lan.fli4l with esmtp (Exim 4.97.1) (envelope-from ) id 1rnRVb-000000000C4-3PT8; Thu, 21 Mar 2024 23:07:40 +0000 From: Bernd Kuhls To: buildroot@buildroot.org Date: Fri, 22 Mar 2024 00:07:38 +0100 Message-Id: <20240321230738.2919656-1-bernd@kuhls.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spamd-Bar: - X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kuhls.net; s=kas202312101026; t=1711062461; bh=J1dt2wcpxjqxsUDbbJijY545ITipHMbYUkQlgy0/R88=; h=From:To:Cc:Subject:Date:From; b=VWJPUte74Z1JldK+P6321F8XE67sT7c3jjgFOMcgQhVq4Al/WvOUQVePiXNy/1nuc Bf94WEFA8FCT5rT4vopVQuQfGmGlOpIQGbS01AgTC4iJSVCQigqc4HeOPkKXekiNUc TQ50AuGoH06bE7Is/BcGM63b7ugRi64HepIKxZkbjq3Iv/6zPYumrZzVz7JTiCwIpa HIGfdkxLzQvRpUWEZreTkNumRGvMyLkVFE0YyFZ4jnRXKfTBMZQ+/KlslLI3T33lN0 znblvbsDthArVbdpsdza/7dDI+Utma103lvp1YrblluVyu1WwgjJ7qFXh0tvjOhlkJ a14f5WG6fdpKQ== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=kuhls.net X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kuhls.net header.i=@kuhls.net header.a=rsa-sha256 header.s=kas202312101026 header.b=VWJPUte7 Subject: [Buildroot] [PATCH v8 1/1] package/igt-gpu-tools: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Le Bihan , Francois Dugast , =?utf-8?q?Ga=C3=ABl_PORTAY?= , Andy Yan Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Gaël PORTAY IGT GPU Tools is a collection of tools for development and testing of the DRM drivers Signed-off-by: Gaël PORTAY Signed-off-by: Andy Yan Signed-off-by: Bernd Kuhls [Bernd: v4 - add myself to DEVELOPERS - add dependencies to locales, mmu, wchar and headers >= 4.11 - rework libunwind dependency - remove duplicate libglib2 dependency v5 - added optional dependency to json_c - remove broken igt_stats binary v6 - updated patch series after upstream review v8 - bumped to current git HEAD to fix musl build errors - removed all patches which are included in upstream repo - added fix for segfaults with hardened toolchains on x86/x86_64] Signed-off-by: Bernd Kuhls Signed-off-by: Francois Dugast [Francois: v7 - depend on !BR2_RELRO_FULL - remove specific workaround for igt_stats binary] Signed-off-by: Bernd Kuhls --- Run-time tested on a x86_64 system built with BR2_RELRO_FULL=y intel-gpu-top: Intel Rocketlake (Gen12) @ /dev/dri/card0 Build-tested using this defconfig BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_PACKAGE_IGT_GPU_TOOLS=y arm-aarch64 [ 1/42]: OK bootlin-aarch64-glibc [ 2/42]: OK bootlin-arcle-hs38-uclibc [ 3/42]: OK bootlin-armv5-uclibc [ 4/42]: OK bootlin-armv7-glibc [ 5/42]: OK bootlin-armv7m-uclibc [ 6/42]: SKIPPED bootlin-armv7-musl [ 7/42]: OK bootlin-m68k-5208-uclibc [ 8/42]: SKIPPED bootlin-m68k-68040-uclibc [ 9/42]: OK bootlin-microblazeel-uclibc [10/42]: OK bootlin-mipsel32r6-glibc [11/42]: OK bootlin-mipsel-uclibc [12/42]: OK bootlin-nios2-glibc [13/42]: OK bootlin-openrisc-uclibc [14/42]: OK bootlin-powerpc64le-power8-glibc [15/42]: OK bootlin-powerpc-e500mc-uclibc [16/42]: OK bootlin-riscv32-glibc [17/42]: OK bootlin-riscv64-glibc [18/42]: OK bootlin-riscv64-musl [19/42]: OK bootlin-s390x-z13-glibc [20/42]: OK bootlin-sh4-uclibc [21/42]: OK bootlin-sparc64-glibc [22/42]: OK bootlin-sparc-uclibc [23/42]: SKIPPED bootlin-x86-64-glibc [24/42]: OK bootlin-x86-64-musl [25/42]: OK bootlin-x86-64-uclibc [26/42]: OK bootlin-xtensa-uclibc [27/42]: OK br-arm-basic [28/42]: SKIPPED br-arm-full-nothread [29/42]: SKIPPED br-arm-full-static [30/42]: SKIPPED br-i386-pentium4-full [31/42]: SKIPPED br-i386-pentium-mmx-musl [32/42]: SKIPPED br-mips64-n64-full [33/42]: FAILED br-mips64r6-el-hf-glibc [34/42]: OK br-powerpc-603e-basic-cpp [35/42]: SKIPPED br-powerpc64-power7-glibc [36/42]: OK linaro-aarch64-be [37/42]: SKIPPED linaro-aarch64 [38/42]: SKIPPED linaro-arm [39/42]: SKIPPED sourcery-mips64 [40/42]: SKIPPED sourcery-mips [41/42]: SKIPPED sourcery-nios2 [42/42]: OK 42 builds, 14 skipped, 1 build failed, 0 legal-info failed, 0 show-info failed The build error with br-mips64-n64-full is caused by this commit missing in the uclibc headers of the 2020 toolchain: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/include/assert.h?id=03fbd941e943976bb92cb392882c2ff7ec218704 DEVELOPERS | 1 + package/Config.in | 1 + package/igt-gpu-tools/Config.in | 32 +++++++++++++++ package/igt-gpu-tools/igt-gpu-tools.hash | 5 +++ package/igt-gpu-tools/igt-gpu-tools.mk | 52 ++++++++++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 package/igt-gpu-tools/Config.in create mode 100644 package/igt-gpu-tools/igt-gpu-tools.hash create mode 100644 package/igt-gpu-tools/igt-gpu-tools.mk diff --git a/DEVELOPERS b/DEVELOPERS index 0f28151785..31ceeee450 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -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/ diff --git a/package/Config.in b/package/Config.in index e03e1d93aa..09006744af 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" diff --git a/package/igt-gpu-tools/Config.in b/package/igt-gpu-tools/Config.in new file mode 100644 index 0000000000..809c8e28ac --- /dev/null +++ b/package/igt-gpu-tools/Config.in @@ -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 diff --git a/package/igt-gpu-tools/igt-gpu-tools.hash b/package/igt-gpu-tools/igt-gpu-tools.hash new file mode 100644 index 0000000000..bf760b91d7 --- /dev/null +++ b/package/igt-gpu-tools/igt-gpu-tools.hash @@ -0,0 +1,5 @@ +# Locally calculated from download +sha256 de6e9443d569e76333ec6c8ffc53937b6831224161fe69bf2f07efad3bd0e04a igt-gpu-tools-0ee4074685c1e184f2d3612ea6eb4d126f9a2e23.tar.bz2 + +# Hash for license file: +sha256 1b7e266857b05808660f42369a4a797459d7b7bec7245e378aa28a8db2f213da COPYING diff --git a/package/igt-gpu-tools/igt-gpu-tools.mk b/package/igt-gpu-tools/igt-gpu-tools.mk new file mode 100644 index 0000000000..927a1225a5 --- /dev/null +++ b/package/igt-gpu-tools/igt-gpu-tools.mk @@ -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))