################################################################################
################################################################################
NVIDIA_DRIVER_VERSION = 346.35
NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64)
NVIDIA_DRIVER_SITE = ftp://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION)
NVIDIA_DRIVER_SOURCE = NVIDIA-Linux-x86$(NVIDIA_DRIVER_SUFFIX)-$(NVIDIA_DRIVER_VERSION).run
NVIDIA_DRIVER_LICENSE = NVIDIA Software License
NVIDIA_DRIVER_LICENSE_FILES = LICENSE
NVIDIA_DRIVER_REDISTRIBUTE = NO
NVIDIA_DRIVER_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_XORG),y)
# Since nvidia-driver are binary blobs, the below dependencies are not
# strictly speaking build dependencies of nvidia-driver. However, they
# are build dependencies of packages that depend on nvidia-driver, so
# they should be built prior to those packages, and the only simple
# way to do so is to make nvidia-driver depend on them.
NVIDIA_DRIVER_DEPENDENCIES = mesa3d-headers xlib_libX11 xlib_libXext
NVIDIA_DRIVER_PROVIDES = libgl libegl libgles
# We have two variables that contains a list of libraries to install:
# contains the libraries whose filename end up in .so.$(VERSION); rather
# than duplicate the version string for all of them, we just store their
# basename, and append the version string below.
# NVIDIA_DRIVER_LIBS_NO_VERSION
# contains all libraries the do not use the NVidia version; since there
# is currently only one such library, we store its full name.
# Each line corresponds to a specific set of libraries
libEGL libGLESv1_CM libGLESv2 libGL \
libnvidia-glcore libnvidia-eglcore libnvidia-glsi \
libvdpau libvdpau_nvidia \
define NVIDIA_DRIVER_INSTALL_GL_DEV
$(INSTALL) -D -m 0644 $(@D)/libGL.la $(STAGING_DIR)/usr/lib/libGL.la
$(SED) 's:__GENERATED_BY__:Buildroot:' $(STAGING_DIR)/usr/lib/libGL.la
$(SED) 's:__LIBGL_PATH__:/usr/lib:' $(STAGING_DIR)/usr/lib/libGL.la
$(SED) 's:-L[^[:space:]]\+::' $(STAGING_DIR)/usr/lib/libGL.la
$(INSTALL) -D -m 0644 package/nvidia-driver/gl.pc $(STAGING_DIR)/usr/lib/pkgconfig/gl.pc
# Those libraries are 'private' libraries requiring an agreement with
# NVidia to develop code for those libs. There seems to be no restriction
# on using those libraries (e.g. if the user has such an agreement, or
# wants to run a third-party program developped under such an agreement).
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS),y)
NVIDIA_DRIVER_LIBS += libnvidia-ifr libnvidia-fbc
# We refer to the destination path; the origin file has no directory component
NVIDIA_DRIVER_X_MODS = drivers/nvidia_drv.so \
extensions/libglx.so.$(NVIDIA_DRIVER_VERSION) \
libnvidia-wfb.so.$(NVIDIA_DRIVER_VERSION)