From patchwork Fri May 4 11:46:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 908680 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40cqwf4Kj9z9s3D for ; Fri, 4 May 2018 21:46:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6C41C22731; Fri, 4 May 2018 11:46:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id enyUVfBVTEY2; Fri, 4 May 2018 11:46:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5C6D722758; Fri, 4 May 2018 11:46:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B688F1C0C64 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B3EA5846D6 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L3kJBl94kiXJ for ; Fri, 4 May 2018 11:46:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from idris.smile.fr (idris.smile.fr [91.216.209.19]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 14C35843F6 for ; Fri, 4 May 2018 11:46:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id D932C1EE2E7A; Fri, 4 May 2018 13:46:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smile.fr Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CzO5bTZcpyCd; Fri, 4 May 2018 13:46:10 +0200 (CEST) Received: from sisellBox.daviel.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com [176.157.204.145]) by idris.smile.fr (Postfix) with ESMTPSA id A3B871EE2A39; Fri, 4 May 2018 13:46:10 +0200 (CEST) From: Valentin Korenblit To: buildroot@buildroot.org Date: Fri, 4 May 2018 13:46:01 +0200 Message-Id: <20180504114603.10135-2-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180504114603.10135-1-valentin.korenblit@smile.fr> References: <20180504114603.10135-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v7 1/3] package/libclc: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Korenblit , romain.naour@gmail.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch provides libclc, an open source implementation of the library requirements of the OpenCL C programming language, as specified by the OpenCL 1.1 Specification. It is intended to be used with Mesa Clover. It needs to be compiled with host-clang, as it generates LLVM IR bitcode files containing device builtin functions for each target. Currently, libclc supports AMDGCN, R600 and NVPTX targets. As OpenCL kernels can be built dynamically on the target using libclang and libLLVM, it is necessary to have clc headers on the target. Buildroot removes /usr/include in its target-finalize step, so clc headers are installed to /usr/share/clc. Given that clc headers are being installed to a non-standard location, it is necessary to specify this path in Mesa's configure.ac. Otherwise, pkg-config will output the absolute path to these headers located in STAGING_DIR, which will cause a runtime error when calling clBuildProgram. Signed-off-by: Valentin Korenblit --- DEVELOPERS | 1 + package/Config.in | 1 + package/libclc/Config.in | 10 ++++++ package/libclc/libclc.hash | 3 ++ package/libclc/libclc.mk | 42 +++++++++++++++++++++++++ package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch | 26 +++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 package/libclc/Config.in create mode 100644 package/libclc/libclc.hash create mode 100644 package/libclc/libclc.mk create mode 100644 package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch diff --git a/DEVELOPERS b/DEVELOPERS index 24d134cb70..3f5775ff48 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1930,6 +1930,7 @@ F: package/tstools/ N: Valentin Korenblit F: package/clang/ +F: package/libclc/ F: package/llvm/ N: Vanya Sergeev diff --git a/package/Config.in b/package/Config.in index fe36d31867..dc0ee8a965 100644 --- a/package/Config.in +++ b/package/Config.in @@ -285,6 +285,7 @@ comment "Graphic libraries" source "package/fbv/Config.in" source "package/freerdp/Config.in" source "package/imagemagick/Config.in" + source "package/libclc/Config.in" source "package/linux-fusion/Config.in" source "package/lite/Config.in" source "package/mesa3d/Config.in" diff --git a/package/libclc/Config.in b/package/libclc/Config.in new file mode 100644 index 0000000000..4bba6a9175 --- /dev/null +++ b/package/libclc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBCLC + bool "libclc" + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS + depends on BR2_HOST_GCC_AT_LEAST_4_8 + help + libclc is an open source, BSD licensed implementation of + the library requirements of the OpenCL C programming language, + as specified by the OpenCL 1.1 Specification. + + http://libclc.llvm.org/ diff --git a/package/libclc/libclc.hash b/package/libclc/libclc.hash new file mode 100644 index 0000000000..c5bf5a668c --- /dev/null +++ b/package/libclc/libclc.hash @@ -0,0 +1,3 @@ +# locally calculated +sha256 e2f1f294f93695f2d1f87ccb9760231b435702dd0c27abeb38baa97186674d9e libclc-00236279a293b3737dee08c14f25923a889d2795.tar.gz +sha256 c66aa55d8478b45f1018500af9f433dd271444ad304d683dd49ff2a42f30dad1 LICENSE.TXT diff --git a/package/libclc/libclc.mk b/package/libclc/libclc.mk new file mode 100644 index 0000000000..b87f191eb5 --- /dev/null +++ b/package/libclc/libclc.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# libclc +# +################################################################################ + +# There are only two releases: release_35 and release_38, but the last +# commit is from 2 years ago. Master has some recent activity. +LIBCLC_VERSION = 00236279a293b3737dee08c14f25923a889d2795 +LIBCLC_SITE = https://git.llvm.org/git/libclc +LIBCLC_SITE_METHOD = git +LIBCLC_LICENSE = NCSA +LIBCLC_LICENSE_FILES = LICENSE.TXT + +LIBCLC_DEPENDENCIES = host-clang host-llvm +LIBCLC_INSTALL_STAGING = YES + +# C++ compiler is used to build a small tool (prepare-builtins) for the host. +# It must be built with the C++ compiler from the host +LIBCLC_CONF_OPTS = --with-llvm-config=$(HOST_DIR)/usr/bin/llvm-config \ + --prefix="/usr" \ + --includedir="/usr/share" \ + --pkgconfigdir="/usr/lib/pkgconfig" \ + --with-cxx-compiler=$(HOSTCXX) + +define LIBCLC_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) +endef + +define LIBCLC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define LIBCLC_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +define LIBCLC_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch b/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch new file mode 100644 index 0000000000..b3f9940c85 --- /dev/null +++ b/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch @@ -0,0 +1,26 @@ +From b1fdc84dff0f4c232eb58dded1dd6e3408ea5630 Mon Sep 17 00:00:00 2001 +From: Valentin Korenblit +Date: Fri, 4 May 2018 10:24:58 +0200 +Subject: [PATCH] set LIBCLC_INCLUDEDIR + +Signed-off-by: Valentin Korenblit +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a6a521794e..9e1dfef06f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2327,7 +2327,7 @@ if test "x$enable_opencl" = xyes; then + PKG_CONFIG_PATH environment variable. + By default libclc.pc is installed to /usr/local/share/pkgconfig/]) + else +- LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc` ++ LIBCLC_INCLUDEDIR="/usr/share" + LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc` + AC_SUBST([LIBCLC_INCLUDEDIR]) + AC_SUBST([LIBCLC_LIBEXECDIR]) +-- +2.14.3 + From patchwork Fri May 4 11:46:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 908677 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40cqwY6Wvqz9s3G for ; Fri, 4 May 2018 21:46:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EDD342277A; Fri, 4 May 2018 11:46:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tClAs+uPiG2E; Fri, 4 May 2018 11:46:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id AE16622249; Fri, 4 May 2018 11:46:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8FB6E1C0C64 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8D312895A4 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LC1EfejEJwkr for ; Fri, 4 May 2018 11:46:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from idris.smile.fr (idris.smile.fr [91.216.209.19]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3146D88BEA for ; Fri, 4 May 2018 11:46:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 7E2631EE2E87; Fri, 4 May 2018 13:46:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smile.fr Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6P6FwqPyKAur; Fri, 4 May 2018 13:46:11 +0200 (CEST) Received: from sisellBox.daviel.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com [176.157.204.145]) by idris.smile.fr (Postfix) with ESMTPSA id 5819C1EE2A39; Fri, 4 May 2018 13:46:11 +0200 (CEST) From: Valentin Korenblit To: buildroot@buildroot.org Date: Fri, 4 May 2018 13:46:02 +0200 Message-Id: <20180504114603.10135-3-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180504114603.10135-1-valentin.korenblit@smile.fr> References: <20180504114603.10135-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v7 2/3] package/mesa3d: enable OpenCL support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Korenblit , romain.naour@gmail.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch provides Clover, the OpenCL 1.1 API implementation by Mesa for AMD GPUs. It generates libOpenCL.so. Add --disable-opencl-icd because in Mesa 18 it defaults to on. When disabled, the shared library is named libOpenCL instead of libMesaOpenCL and CL headers are installed. Signed-off-by: Valentin Korenblit --- package/mesa3d/Config.in | 9 +++++++++ package/mesa3d/mesa3d.mk | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index 8c1877fbc1..ba6eaa55d2 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -51,6 +51,15 @@ comment "llvm support needs a toolchain not affected by GCC bug 64735" depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 +#clang and libclc dependencies are satisfied by BR2_PACKAGE_MESA3D_LLVM +config BR2_PACKAGE_MESA3D_OPENCL + bool "OpenCL support" + depends on BR2_PACKAGE_MESA3D_LLVM + depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \ + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI + select BR2_PACKAGE_CLANG + select BR2_PACKAGE_LIBCLC + # inform the .mk file of gallium, dri or vulkan driver selection config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER bool diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index fb9189741f..95ea0581df 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -237,4 +237,13 @@ else MESA3D_CONF_OPTS += --disable-lmsensors endif +ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y) +MESA3D_DEPENDENCIES += clang libclc +MESA3D_CONF_OPTS += --enable-opencl \ + --disable-opencl-icd \ + --with-clang-libdir=$(STAGING_DIR)/usr/lib +else +MESA3D_CONF_OPTS += --disable-opencl +endif + $(eval $(autotools-package)) From patchwork Fri May 4 11:46:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Korenblit X-Patchwork-Id: 908679 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40cqwb0H6zz9s3q for ; Fri, 4 May 2018 21:46:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 941BA8754F; Fri, 4 May 2018 11:46:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FaV0SVxeIBAG; Fri, 4 May 2018 11:46:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C3CB87518; Fri, 4 May 2018 11:46:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 429A91C0C64 for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3FFFA8440A for ; Fri, 4 May 2018 11:46:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x-ddz8VRf9Ca for ; Fri, 4 May 2018 11:46:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from idris.smile.fr (idris.smile.fr [91.216.209.19]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4F05C841C9 for ; Fri, 4 May 2018 11:46:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 1F5091EE191A; Fri, 4 May 2018 13:46:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smile.fr Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G2+jiQuGBGch; Fri, 4 May 2018 13:46:11 +0200 (CEST) Received: from sisellBox.daviel.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com [176.157.204.145]) by idris.smile.fr (Postfix) with ESMTPSA id E8CD91EE2A39; Fri, 4 May 2018 13:46:11 +0200 (CEST) From: Valentin Korenblit To: buildroot@buildroot.org Date: Fri, 4 May 2018 13:46:03 +0200 Message-Id: <20180504114603.10135-4-valentin.korenblit@smile.fr> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180504114603.10135-1-valentin.korenblit@smile.fr> References: <20180504114603.10135-1-valentin.korenblit@smile.fr> Subject: [Buildroot] [PATCH v7 3/3] package/clinfo: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Korenblit , romain.naour@gmail.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This tool allows to verify if the OpenCL environment is set up correctly and output information related to the supported OpenCL platforms. Signed-off-by: Valentin Korenblit --- DEVELOPERS | 1 + package/Config.in | 1 + package/clinfo/Config.in | 9 +++++++++ package/clinfo/clinfo.hash | 2 ++ package/clinfo/clinfo.mk | 23 +++++++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 package/clinfo/Config.in create mode 100644 package/clinfo/clinfo.hash create mode 100644 package/clinfo/clinfo.mk diff --git a/DEVELOPERS b/DEVELOPERS index 3f5775ff48..ccc8a847d6 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1930,6 +1930,7 @@ F: package/tstools/ N: Valentin Korenblit F: package/clang/ +F: package/clinfo/ F: package/libclc/ F: package/llvm/ diff --git a/package/Config.in b/package/Config.in index dc0ee8a965..ece74ab9e4 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1494,6 +1494,7 @@ menu "Other" source "package/clang/Config.in" source "package/clapack/Config.in" source "package/classpath/Config.in" + source "package/clinfo/Config.in" source "package/cppcms/Config.in" source "package/cracklib/Config.in" source "package/dawgdic/Config.in" diff --git a/package/clinfo/Config.in b/package/clinfo/Config.in new file mode 100644 index 0000000000..279b5acbfb --- /dev/null +++ b/package/clinfo/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CLINFO + bool "clinfo" + depends on BR2_PACKAGE_MESA3D_OPENCL + help + clinfo is a simple command-line application that enumerates + all possible (known) properties of the OpenCL platform and + devices available on the system. + + https://github.com/Oblomov/clinfo diff --git a/package/clinfo/clinfo.hash b/package/clinfo/clinfo.hash new file mode 100644 index 0000000000..e1c10afc9e --- /dev/null +++ b/package/clinfo/clinfo.hash @@ -0,0 +1,2 @@ +# locally calculated +sha256 64b02e68ccff3b95437bd0bd70dcb88438c58adec16a7145a5d4e5c26a898ccf clinfo-2.2.18.03.26.tar.gz diff --git a/package/clinfo/clinfo.mk b/package/clinfo/clinfo.mk new file mode 100644 index 0000000000..1477b76946 --- /dev/null +++ b/package/clinfo/clinfo.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# clinfo +# +################################################################################ + +CLINFO_VERSION = 2.2.18.03.26 +CLINFO_SITE = $(call github,Oblomov,clinfo,$(CLINFO_VERSION)) +CLINFO_LICENSE = CC0-1.0 +CLINFO_LICENSE_FILES = legalcode.txt + +# libOpenCL is needed +CLINFO_DEPENDENCIES = mesa3d + +define CLINFO_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define CLINFO_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/clinfo $(TARGET_DIR)/usr/bin/clinfo +endef + +$(eval $(generic-package))