2015-02-10 21:01:12 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# nvidia-driver
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-06-10 12:29:46 +02:00
|
|
|
NVIDIA_DRIVER_VERSION = 390.67
|
2015-02-10 21:01:12 +01:00
|
|
|
NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64)
|
2017-05-04 23:13:12 +02:00
|
|
|
NVIDIA_DRIVER_SITE = http://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION)
|
2015-02-10 21:01:12 +01:00
|
|
|
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
|
|
|
|
|
2015-03-31 19:45:34 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_XORG),y)
|
|
|
|
|
2015-02-10 21:01:12 +01:00
|
|
|
# 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.
|
2018-10-21 00:14:35 +02:00
|
|
|
NVIDIA_DRIVER_DEPENDENCIES += mesa3d-headers xlib_libX11 xlib_libXext
|
|
|
|
NVIDIA_DRIVER_PROVIDES += libgl libegl libgles
|
2015-02-10 21:01:12 +01:00
|
|
|
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
# libGL.so.$(NVIDIA_DRIVER_VERSION) is the legacy libGL.so library; it
|
|
|
|
# has been replaced with libGL.so.1.0.0. Installing both is technically
|
|
|
|
# possible, but great care must be taken to ensure they do not conflict,
|
|
|
|
# so that EGL still works. The legacy library exposes an NVidia-specific
|
|
|
|
# API, so it should not be needed, except for legacy, binary-only
|
|
|
|
# applications (in other words: we don't care).
|
|
|
|
#
|
|
|
|
# libGL.so.1.0.0 is the new vendor-neutral library, aimed at replacing
|
|
|
|
# the old libGL.so.$(NVIDIA_DRIVER_VERSION) library. The latter contains
|
|
|
|
# NVidia extensions (which is deemed bad now), while the former follows
|
|
|
|
# the newly-introduced vendor-neutral "dispatching" API/ABI:
|
|
|
|
# https://github.com/aritger/linux-opengl-abi-proposal/blob/master/linux-opengl-abi-proposal.txt
|
|
|
|
# However, this is not very usefull to us, as we don't support multiple
|
|
|
|
# GL providers at the same time on the system, which this proposal is
|
|
|
|
# aimed at supporting.
|
|
|
|
#
|
|
|
|
# So we only install the legacy library for now.
|
|
|
|
NVIDIA_DRIVER_LIBS_GL = \
|
|
|
|
libGLX.so.0 \
|
|
|
|
libGL.so.$(NVIDIA_DRIVER_VERSION) \
|
2017-04-05 00:50:14 +02:00
|
|
|
libGLX_nvidia.so.$(NVIDIA_DRIVER_VERSION)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
|
|
|
|
NVIDIA_DRIVER_LIBS_EGL = \
|
2018-06-10 12:29:46 +02:00
|
|
|
libEGL.so.1.1.0 \
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
libGLdispatch.so.0 \
|
2017-04-05 00:50:14 +02:00
|
|
|
libEGL_nvidia.so.$(NVIDIA_DRIVER_VERSION)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
|
|
|
|
NVIDIA_DRIVER_LIBS_GLES = \
|
2018-06-10 12:29:46 +02:00
|
|
|
libGLESv1_CM.so.1.2.0 \
|
|
|
|
libGLESv2.so.2.1.0 \
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
libGLESv1_CM_nvidia.so.$(NVIDIA_DRIVER_VERSION) \
|
2017-04-05 00:50:14 +02:00
|
|
|
libGLESv2_nvidia.so.$(NVIDIA_DRIVER_VERSION)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
|
|
|
|
NVIDIA_DRIVER_LIBS_MISC = \
|
|
|
|
libnvidia-eglcore.so.$(NVIDIA_DRIVER_VERSION) \
|
2018-06-10 12:29:46 +02:00
|
|
|
libnvidia-egl-wayland.so.1.0.2 \
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
libnvidia-glcore.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-glsi.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
tls/libnvidia-tls.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libvdpau_nvidia.so.$(NVIDIA_DRIVER_VERSION) \
|
2017-04-05 00:50:14 +02:00
|
|
|
libnvidia-ml.so.$(NVIDIA_DRIVER_VERSION)
|
2015-02-10 21:01:12 +01:00
|
|
|
|
2018-10-21 00:14:35 +02:00
|
|
|
NVIDIA_DRIVER_LIBS += \
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
$(NVIDIA_DRIVER_LIBS_GL) \
|
|
|
|
$(NVIDIA_DRIVER_LIBS_EGL) \
|
|
|
|
$(NVIDIA_DRIVER_LIBS_GLES) \
|
2017-04-05 00:50:14 +02:00
|
|
|
$(NVIDIA_DRIVER_LIBS_MISC)
|
2015-02-10 21:01:12 +01:00
|
|
|
|
2015-04-24 23:39:57 +02:00
|
|
|
# Install the gl.pc file
|
|
|
|
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
|
2017-08-29 22:49:59 +02:00
|
|
|
$(INSTALL) -D -m 0644 package/nvidia-driver/egl.pc $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc
|
2015-04-24 23:39:57 +02:00
|
|
|
endef
|
|
|
|
|
2015-02-10 21:01:12 +01:00
|
|
|
# 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)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
NVIDIA_DRIVER_LIBS += \
|
|
|
|
libnvidia-ifr.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-fbc.so.$(NVIDIA_DRIVER_VERSION)
|
2015-02-10 21:01:12 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# We refer to the destination path; the origin file has no directory component
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
NVIDIA_DRIVER_X_MODS = \
|
|
|
|
drivers/nvidia_drv.so \
|
2015-02-10 21:01:12 +01:00
|
|
|
extensions/libglx.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-wfb.so.$(NVIDIA_DRIVER_VERSION)
|
|
|
|
|
2015-03-31 19:45:34 +02:00
|
|
|
endif # X drivers
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),y)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
NVIDIA_DRIVER_LIBS += \
|
|
|
|
libcuda.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-compiler.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvcuvid.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-fatbinaryloader.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-ptxjitcompiler.so.$(NVIDIA_DRIVER_VERSION) \
|
|
|
|
libnvidia-encode.so.$(NVIDIA_DRIVER_VERSION)
|
2015-03-31 19:45:35 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA_PROGS),y)
|
|
|
|
NVIDIA_DRIVER_PROGS = nvidia-cuda-mps-control nvidia-cuda-mps-server
|
|
|
|
endif
|
2015-03-31 19:45:34 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_OPENCL),y)
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
NVIDIA_DRIVER_LIBS += \
|
|
|
|
libOpenCL.so.1.0.0 \
|
|
|
|
libnvidia-opencl.so.$(NVIDIA_DRIVER_VERSION)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Build and install the kernel modules if needed
|
|
|
|
ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_MODULE),y)
|
|
|
|
|
|
|
|
NVIDIA_DRIVER_MODULES = nvidia nvidia-modeset nvidia-drm
|
|
|
|
ifeq ($(BR2_x86_64),y)
|
|
|
|
NVIDIA_DRIVER_MODULES += nvidia-uvm
|
2015-03-31 19:45:34 +02:00
|
|
|
endif
|
|
|
|
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
# They can't do everything like everyone. They need those variables,
|
|
|
|
# because they don't recognise the usual variables set by the kernel
|
|
|
|
# build system. We also need to tell them what modules to build.
|
|
|
|
NVIDIA_DRIVER_MODULE_MAKE_OPTS = \
|
|
|
|
NV_KERNEL_SOURCES="$(LINUX_DIR)" \
|
|
|
|
NV_KERNEL_OUTPUT="$(LINUX_DIR)" \
|
|
|
|
NV_KERNEL_MODULES="$(NVIDIA_DRIVER_MODULES)"
|
|
|
|
|
|
|
|
NVIDIA_DRIVER_MODULE_SUBDIRS = kernel
|
|
|
|
|
|
|
|
$(eval $(kernel-module))
|
|
|
|
|
|
|
|
endif # BR2_PACKAGE_NVIDIA_DRIVER_MODULE == y
|
|
|
|
|
2015-02-10 21:01:12 +01:00
|
|
|
# The downloaded archive is in fact an auto-extract script. So, it can run
|
|
|
|
# virtually everywhere, and it is fine enough to provide useful options.
|
|
|
|
# Except it can't extract into an existing (even empty) directory.
|
|
|
|
define NVIDIA_DRIVER_EXTRACT_CMDS
|
2018-04-02 15:09:24 +02:00
|
|
|
$(SHELL) $(NVIDIA_DRIVER_DL_DIR)/$(NVIDIA_DRIVER_SOURCE) --extract-only --target \
|
2015-02-10 21:01:12 +01:00
|
|
|
$(@D)/tmp-extract
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
chmod u+w -R $(@D)
|
2015-02-10 21:01:12 +01:00
|
|
|
mv $(@D)/tmp-extract/* $(@D)/tmp-extract/.manifest $(@D)
|
|
|
|
rm -rf $(@D)/tmp-extract
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Helper to install libraries
|
|
|
|
# $1: destination directory (target or staging)
|
|
|
|
#
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
# For all libraries, we install them and create a symlink using
|
|
|
|
# their SONAME, so we can link to them at runtime; we also create
|
|
|
|
# the no-version symlink, so we can link to them at build time.
|
2015-02-10 21:01:12 +01:00
|
|
|
define NVIDIA_DRIVER_INSTALL_LIBS
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
$(foreach lib,$(NVIDIA_DRIVER_LIBS),\
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/$(lib) $(1)/usr/lib/$(notdir $(lib))
|
|
|
|
libsoname="$$( $(TARGET_READELF) -d "$(@D)/$(lib)" \
|
2016-10-26 11:19:07 +02:00
|
|
|
|sed -r -e '/.*\(SONAME\).*\[(.*)\]$$/!d; s//\1/;' )"; \
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
if [ -n "$${libsoname}" -a "$${libsoname}" != "$(notdir $(lib))" ]; then \
|
|
|
|
ln -sf $(notdir $(lib)) \
|
|
|
|
$(1)/usr/lib/$${libsoname}; \
|
|
|
|
fi
|
|
|
|
baseso=$(firstword $(subst .,$(space),$(notdir $(lib)))).so; \
|
|
|
|
if [ -n "$${baseso}" -a "$${baseso}" != "$(notdir $(lib))" ]; then \
|
|
|
|
ln -sf $(notdir $(lib)) $(1)/usr/lib/$${baseso}; \
|
|
|
|
fi
|
|
|
|
)
|
2015-02-10 21:01:12 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
# For staging, install libraries and development files
|
|
|
|
define NVIDIA_DRIVER_INSTALL_STAGING_CMDS
|
|
|
|
$(call NVIDIA_DRIVER_INSTALL_LIBS,$(STAGING_DIR))
|
2015-04-24 23:39:57 +02:00
|
|
|
$(NVIDIA_DRIVER_INSTALL_GL_DEV)
|
2015-02-10 21:01:12 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
# For target, install libraries and X.org modules
|
|
|
|
define NVIDIA_DRIVER_INSTALL_TARGET_CMDS
|
|
|
|
$(call NVIDIA_DRIVER_INSTALL_LIBS,$(TARGET_DIR))
|
package/nvidia-driver: update version
This new version brings in support for egl-wayland, the EGL extensions
aimed at making it possible to implement Wayland servers and clients. As
such, nvidia-driver becomes the second EGL implementation in Buildroot
that can act as a libegl provider with egl-wayland extensions.
In this version, it becomes possible to use our kernel-module infra,
with just a little few minor tricks: we need just specify the Linux
source and build trees (they are the same for us) and the list of
modules to build. We still need a little patch against the Kbuild files.
We also get rid of the LIBS_NO_VERSION trick and always use complete
filenames, as more libs are now packaged with different version in their
filenames, and even some with no version at all.
When installing libs, we switch from a shell loop to a make foreach
loop, which is easier to handle. It has the side-effect (and advantage)
of displaying the install commands for each library, rather than a
single biggish one, so it is easier to see what goes wrong. This also
means that an error in each phase of the install (the copy of the files
then each symlink) can be caught more easily (it was not previously):
each sequence is now its own make command; we need not use "|| exit 1"
after each command, even in a if block, because the if blocks returns
with the exit code of the last command in it; e.g. if an ln fails, the
if-block in which it is enclosed will return the exit code of ln, and
make will catch it.
Similarly for the X driver modules and each of the programs installed:
we now can catch any failure in the isntall of those.
All of this somewhat simplifies the .mk. It is a little bit longer, but
the structure is saner and more explicit.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-23 18:26:35 +02:00
|
|
|
$(foreach m,$(NVIDIA_DRIVER_X_MODS), \
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/$(notdir $(m)) \
|
|
|
|
$(TARGET_DIR)/usr/lib/xorg/modules/$(m)
|
|
|
|
)
|
|
|
|
$(foreach p,$(NVIDIA_DRIVER_PROGS), \
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$(p) \
|
|
|
|
$(TARGET_DIR)/usr/bin/$(p)
|
|
|
|
)
|
2015-02-10 21:01:14 +01:00
|
|
|
$(NVIDIA_DRIVER_INSTALL_KERNEL_MODULE)
|
2015-02-10 21:01:12 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|