Introduce NVidia's binary driver
Hello All!
This series adds support for NVidia's binary blob, the driver to its family of GPUs.
It also introduces the OpenGL Registry, to provide GL headers for those OpenGL/EGL/GLES implementations that do not provide their own headers (like NVidia's binary blob.)
As a dependency to OpenGL Registry, it also introduces python-lxml, a binding to libxml2 and libxslt, used to generate the FL headers.
The series was build-tested using XBMC as a test-bed (I managed a single runtime test, as my HTPC is a bit reluctant at booting from a USB key when the internal HDD is present, so I can't easily retest.)
Changes v2 -> v3: (Thpmas P.)
- opengl-registry is a prompt-less package
- explain the tricky variables and code about installing the NVidia libraries
- drop support for ARM, not testable here
- some cleanups
- bump opengl-registry
Changes v1 -> v2:
- bump opengl-registry
- drop i915, applied (Peter)
Regards,
Yann E. MORIN.
The following changes since commit 7349af1bc4ed941d59c0c9971007479881379d3f:
openvmtools: remove unnecessary C flag (2014-10-06 21:16:09 +0200)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/gfx
for you to fetch changes up to e9c3f11f3f7e77e0b871bb9349cdc731db8341f8:
package/nvidia-driver: build the kernel module (2014-10-06 22:57:19 +0200)
----------------------------------------------------------------
Yann E. MORIN (4):
package/python-lxml: new package package/opengl-registry: new package package/nvidia-driver: add NVidia's OpenGL binary blob package/nvidia-driver: build the kernel module
package/Config.in | 2 + package/nvidia-driver/Config.in | 66 + package/nvidia-driver/nvidia-driver.mk | 157 ++ package/opengl-registry/Config.in | 23 + package/opengl-registry/gl.h | 2115 ++++++++++++++++++++ .../opengl-registry-000-run-from-current-dir.patch | 17 + package/opengl-registry/opengl-registry.mk | 79 + package/python-lxml/python-lxml.mk | 25 + 8 files changed, 2484 insertions(+) create mode 100644 package/nvidia-driver/Config.in create mode 100644 package/nvidia-driver/nvidia-driver.mk create mode 100644 package/opengl-registry/Config.in create mode 100644 package/opengl-registry/gl.h create mode 100644 package/opengl-registry/opengl-registry-000-run-from-current-dir.patch create mode 100644 package/opengl-registry/opengl-registry.mk create mode 100644 package/python-lxml/python-lxml.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/4 package/python-lxml: new package
The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 and libxslt.
---
This is a host-only package for now, because I only needed it to build opengl-registry.
--- package/python-lxml/python-lxml.mk | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/python-lxml/python-lxml.mk
package/python-lxml/python-lxml.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# python-lxml +# +################################################################################ + +PYTHON_LXML_VERSION = 3.4.0 +PYTHON_LXML_SITE = http://lxml.de/files +PYTHON_LXML_SOURCE = lxml-$(PYTHON_LXML_VERSION).tgz + +# Not including the GPL, because it is used only for the test scripts. +PYTHON_LXML_LICENSE = BSD-3c, Others +PYTHON_LXML_LICENSE_FILES = \ + LICENSES.txt \ + doc/licenses/BSD.txt \ + doc/licenses/elementtree.txt \ + src/lxml/isoschematron/resources/rng/iso-schematron.rng + +# python-lxml can use either setuptools, or distutils as a fallback. +# So, we use setuptools. +PYTHON_LXML_SETUP_TYPE = setuptools + +PYTHON_LXML_DEPENDENCIES = libxml2 libxslt + +$(eval $(host-python-package))
Signature · 1 line
1.9.1
PATCH v3 2/4 package/opengl-registry: new package
In reply to Yann E. MORINOpenGL Registry provides all GL headers, save for gl.h itself. We vampirise the one from mesa3d (at the version we currently package), which is as good as any other.
Those headers are needed when an OpenGL/EGL/GLES implementation does not provide its own headers, like the NVidia binary blob (to come in follow-up patches.)
--
Tested by building XBMC against the NVidia proprietary blob.
Note: their svn repository holds many other things, even non-public stuff, so the svn revision we use is the one at which the api directory was *changed*, which might be lagging behind the revision the repository is currently at
--- package/Config.in | 1 + package/opengl-registry/Config.in | 23 + package/opengl-registry/gl.h | 2115 ++++++++++++++++++++ .../opengl-registry-000-run-from-current-dir.patch | 17 + package/opengl-registry/opengl-registry.mk | 79 + 5 files changed, 2235 insertions(+) create mode 100644 package/opengl-registry/Config.in create mode 100644 package/opengl-registry/gl.h create mode 100644 package/opengl-registry/opengl-registry-000-run-from-current-dir.patch create mode 100644 package/opengl-registry/opengl-registry.mk
package/Config.in +1 -0
@@ -651,6 +651,7 @@ menu "Graphics" source "package/libva-intel-driver/Config.in" source "package/opencv/Config.in" source "package/opengl/Config.in" + source "package/opengl-registry/Config.in" source "package/pango/Config.in" source "package/pixman/Config.in" source "package/poppler/Config.in"
package/opengl-registry/Config.in new file +23 -0
@@ -0,0 +1,23 @@ +# Note: this package has no prompt, because it is to be selected by +# packages that need it, and does not make sense on its own. +# Further more, we want to avoid it being enabled alongside any other +# package that provide their own OpenGL headers, like mesa3d or +# rpi-userland... + +config BR2_PACKAGE_OPENGL_REGISTRY + bool + help + The OpenGL Registry contains specifications, header files, and + related documentation for OpenGL and related APIs including GLU, + GLX, and WGL. In addition to the core API specifications, many + extensions to these APIs have been defined by vendors, groups of + vendors, and the ARB. The Registry also contains specifications + and header files for all registered extensions, written as + modifications to the appropriate core API specifications. + + This package installs the openGL header files. You do not need them + if the OpenGL/EGL/GLES implementation provides its own headers. + Currently, the only known implementation requiring OpenGL Resgistry + is the NVidia proprietary driver. + + https://www.opengl.org/registry/
package/opengl-registry/gl.h new file +2115 -0
2,115 lines not on this page · raw message
package/opengl-registry/opengl-registry-000-run-from-current-dir.patch new file +17 -0
@@ -0,0 +1,17 @@ +Makefile: allow running without the current dir in PATH + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +Index: a/Makefile +=================================================================== +--- a/Makefile (revision 27863) ++++ a/Makefile (working copy) +@@ -24,7 +24,7 @@ + + PYFILES = genheaders.py reg.py + GENOPTS = +-GENHEADERS = genheaders.py $(GENOPTS) ++GENHEADERS = ./genheaders.py $(GENOPTS) + + # Generate all headers for GL / GLES / WGL / GLX / EGL + # Different headers depend on different XML registry files
package/opengl-registry/opengl-registry.mk new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 3/4 package/nvidia-driver: add NVidia's OpenGL binary blob
In reply to Yann E. MORINThis patch only adds the userland part. Unless other such other packages (which we named like: rpi-userland), we do not replicate this naming scheme with this package, as a future patch will also enable building the kernel part of the driver. So, it is better to just name that package with -driver, rather than with -userland and renaming it afterwards.
--- package/Config.in | 1 + package/nvidia-driver/Config.in | 53 ++++++++++++++++ package/nvidia-driver/nvidia-driver.mk | 108 +++++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 package/nvidia-driver/Config.in create mode 100644 package/nvidia-driver/nvidia-driver.mk
package/Config.in +1 -0
@@ -204,6 +204,7 @@ endif source "package/linux-fusion/Config.in" source "package/lite/Config.in" source "package/mesa3d/Config.in" + source "package/nvidia-driver/Config.in" source "package/ocrad/Config.in" source "package/psplash/Config.in" source "package/sawman/Config.in"
package/nvidia-driver/Config.in new file +53 -0
53 lines not on this page · raw message
package/nvidia-driver/nvidia-driver.mk new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 4/4 package/nvidia-driver: build the kernel module
In reply to Yann E. MORINAdd option to build the nvidia.ko module. If CUDA is enabled, also build the nvidia-uvm.ko kernel module (for Unified Memory access), which is required by the CUDA user-land library.
Substancially inspired by the corresponding Gentoo ebuild:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-340.32.ebuild?revision=1.2&view=markup
--- package/nvidia-driver/Config.in | 13 +++++++++ package/nvidia-driver/nvidia-driver.mk | 49 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)
package/nvidia-driver/Config.in +13 -0
@@ -50,4 +50,17 @@ config BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS Say 'y' here if you plan on running a program that uses those private libraries. +comment "nvidia kernel module needs a kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_NVIDIA_DRIVER_MODULE + bool "nvidia kernel module" + depends on BR2_LINUX_KERNEL + help + Build the nvidia.ko kernel module. + + If CUDA support (above) is set, then this will also build + the nvidia-uvm.ko kernel module, which provides Unified + Memory access to the GPU and CPU memories for CUDA programs. + endif # BR2_PACKAGE_NVIDIA_DRIVER
package/nvidia-driver/nvidia-driver.mk +49 -0
61 lines not on this page · raw message
Signature · 1 line
1.9.1