aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-21 00:14:36 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-12-03 23:07:55 +0100
commit5a4d6e444c6ca95efaf2fb08087ae23ea50a7575 (patch)
tree04b5cafeb8390e180d86a4811dde37a88b5b55e2
parent45004ac59a7051df0961f036ec05cc4963636436 (diff)
downloadbuildroot-5a4d6e444c6ca95efaf2fb08087ae23ea50a7575.tar.gz
buildroot-5a4d6e444c6ca95efaf2fb08087ae23ea50a7575.tar.bz2
package/nvidia-driver: become an OpenCL provider
We need to install the mesa3d-headers, because the CL headers are not provided by nvidia-driver (just like it didn't provide the OpenGL headers). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/nvidia-driver/Config.in5
-rw-r--r--package/nvidia-driver/nvidia-driver.mk2
2 files changed, 7 insertions, 0 deletions
diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in
index 732d9255c7..9631b3e70c 100644
--- a/package/nvidia-driver/Config.in
+++ b/package/nvidia-driver/Config.in
@@ -60,6 +60,11 @@ if BR2_PACKAGE_NVIDIA_DRIVER_CUDA
config BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
bool "OpenCL support"
+ select BR2_PACKAGE_MESA3D_HEADERS
+ select BR2_PACKAGE_HAS_LIBOPENCL
+
+config BR2_PACKAGE_PROVIDES_LIBOPENCL
+ default "nvidia-driver" if BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
config BR2_PACKAGE_NVIDIA_DRIVER_CUDA_PROGS
bool "CUDA MPS server and control"
diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk
index 0d051fcaa4..baf2ba2be5 100644
--- a/package/nvidia-driver/nvidia-driver.mk
+++ b/package/nvidia-driver/nvidia-driver.mk
@@ -116,6 +116,8 @@ ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_OPENCL),y)
NVIDIA_DRIVER_LIBS += \
libOpenCL.so.1.0.0 \
libnvidia-opencl.so.$(NVIDIA_DRIVER_VERSION)
+NVIDIA_DRIVER_DEPENDENCIES += mesa3d-headers
+NVIDIA_DRIVER_PROVIDES += libopencl
endif
# Build and install the kernel modules if needed