Skip to contentSkip to conversation

NVidia GPU binary blobs for x86 and ARM (branch yem/gfx2)

PATCH Superseded Yann E. MORIN 6 participants 41 messages Feb 10, 2015 – Apr 24, 2015 Tegra architecture support

v7 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v7 cover NVidia GPU binary blobs for x86 and ARM (branch yem/gfx2)

Hello All!

This series adds support for NVidia's binary blob, the driver to its family of GPUs, for x86 (by Yann) and Tegra2 and Tegra3 (by Nicolas).

It also introduces the mesa3d-headers, a mesa3d-based package that only installs the OpenXXX headers, for those OpenGL/EGL/GLES implementations that do not provide their own headers (like NVidia's binary blobs.)

mesq3d-headers installs the headers corresponding to the virtual packages that are enabled, i.e. GL headers when _HAS_LIBGL is enabled, ELG headers when _HAS_LIBEGL is enabled and so on... This means there is no support for packages that provide more than one OpenXXX implementation (say GL and EGL), provides headers for some (say GL) but require headers for others (say EGL). This should in principle not cause any issue, as headers instaleld by suh a package would overwrite the headers already installed by mesa3d-headers.

Also, all the usual ./configure && make && make install dance is not done for mnesa3d, even though it is an autotools package. Instead, we just manually copy those required headers, as they are not generated.

The x86 drivers were build- and runtile-tested using XBMC (not yet with Kodi); the tests were very shallow, though, and not everything was thouroughly tested (especially the video decoding part), but it is apparently working OK so far.

Changes v6 -> v7:
- drop all Khronos Registries packages in favour of mesa3d-headers
- adapt the NVidia driver packages to use mesa3d-headers

Changes v5 -> v6:
- make python-lxml a target package too (Yegor)
- rename the packages and move one directory up (J?r?me)
- use mesa3d to provide additional headers, don;t bundle them
- install extra GLES platform headers (Nicolas)
- x86 nvidia driver installs a gl.pc file (J?r?me)
- drop JPEG HW acceleration for Tegra2/3, since we do not have the headers (Nicolas)

Changes v4 -> v5:
- fix env vars when building opengl-registry

Changes v3 -> v4:
- integrate the Tegra2/3 driver from Nicolas
- lots of cleanups in the packages for Tegra2/3
- further fixes after Thomas comments
- introduce more of the Khronos registry (OpenMAX, OpenKode...)

Changes v2 -> v3:
- some rewrite after Thomas comments

Changes v1 -> v2:
- bump opengl-registry
- drop i915, applied (Peter)

Regards,
Yann E. MORIN.

The following changes since commit c41229af06d759081e56ce762b63436eac786cfa:

docs/website/news.html: add 2015.02-rc1 announcement link (2015-02-08 23:50:14 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/gfx2

for you to fetch changes up to c85883e41226c0c3458f34a39b31251f68dc4f2e:

package/nvidia-tegra23-codecs: new package (2015-02-10 19:19:45 +0100)

----------------------------------------------------------------
J?r?me Pouiller (1):
package/nvidia-driver: Add gl.pc

Nicolas Serafini (3):
package/nvidia-tegra23-binaries: new package package.nvidia-tegra23-binaries: add gstreamer plugins package/nvidia-tegra23-codecs: new package

Yann E. MORIN (5):
package/python-lxml: new host package package/mesa3d-headers: new package package/mesa3d-headers: also install dri header and .pc file package/nvidia-driver: add NVidia's OpenGL binary blob package/nvidia-driver: build the kernel module

Yegor Yefremov (1):
package/python-lxml: add target variant

 package/Config.in                                  |   4 +
 package/mesa3d-headers/Config.in                   |   8 +
 package/mesa3d-headers/mesa3d-headers.hash         |   1 +
 package/mesa3d-headers/mesa3d-headers.mk           |  91 ++++++++++++
 package/mesa3d/mesa3d.mk                           |   1 +
 package/nvidia-driver/Config.in                    |  65 +++++++++
 package/nvidia-driver/gl.pc                        |  11 ++
 package/nvidia-driver/nvidia-driver.hash           |   3 +
 package/nvidia-driver/nvidia-driver.mk             | 161 +++++++++++++++++++++
 package/nvidia-tegra23/Config.in                   |  37 +++++
 .../nvidia-tegra23-binaries/Config.in              | 107 ++++++++++++++
 .../nvidia-tegra23/nvidia-tegra23-binaries/egl.pc  |  10 ++
 .../nvidia-tegra23/nvidia-tegra23-binaries/gles.pc |  10 ++
 .../nvidia-tegra23-binaries/glesv2.pc              |  10 ++
 .../nvidia-tegra23-binaries.hash                   |   3 +
 .../nvidia-tegra23-binaries.mk                     | 128 ++++++++++++++++
 .../nvidia-tegra23/nvidia-tegra23-codecs/Config.in |   7 +
 .../nvidia-tegra23-codecs.hash                     |   3 +
 .../nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk |  41 ++++++
 package/nvidia-tegra23/nvidia-tegra23.mk           |  17 +++
 package/python-lxml/Config.in                      |  10 ++
 package/python-lxml/python-lxml.hash               |   2 +
 package/python-lxml/python-lxml.mk                 |  33 +++++
 23 files changed, 763 insertions(+)
 create mode 100644 package/mesa3d-headers/Config.in
 create mode 120000 package/mesa3d-headers/mesa3d-headers.hash
 create mode 100644 package/mesa3d-headers/mesa3d-headers.mk
 create mode 100644 package/nvidia-driver/Config.in
 create mode 100644 package/nvidia-driver/gl.pc
 create mode 100644 package/nvidia-driver/nvidia-driver.hash
 create mode 100644 package/nvidia-driver/nvidia-driver.mk
 create mode 100644 package/nvidia-tegra23/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23.mk
 create mode 100644 package/python-lxml/Config.in
 create mode 100644 package/python-lxml/python-lxml.hash
 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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v7 1/10 package/python-lxml: new host 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.hash |  2 ++
 package/python-lxml/python-lxml.mk   | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 package/python-lxml/python-lxml.hash
 create mode 100644 package/python-lxml/python-lxml.mk
package/python-lxml/python-lxml.hash new file +2 -0
new file mode 100644
index 0000000..470a245
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf  lxml-3.4.1.tgz
package/python-lxml/python-lxml.mk new file +25 -0
new file mode 100644
index 0000000..758ce87
@@ -0,0 +1,25 @@
+################################################################################
+#
+# python-lxml
+#
+################################################################################
+
+PYTHON_LXML_VERSION = 3.4.1
+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
#2 lore raw

PATCH v7 2/10 package/python-lxml: add target variant

In reply to Yann E. MORIN

From: Yegor Yefremov <[email protected]>

[yann.morin.1998 at free.fr: fix staging path; trim dependencies of
the host variant]

---
 package/Config.in                  |  1 +
 package/python-lxml/Config.in      | 10 ++++++++++
 package/python-lxml/python-lxml.mk | 10 +++++++++-
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 package/python-lxml/Config.in
package/Config.in +1 -0
index fe3d3d0..757237e 100644
@@ -534,6 +534,7 @@ menu "external python modules"
 	source "package/python-json-schema-validator/Config.in"
 	source "package/python-keyring/Config.in"
 	source "package/python-libconfig/Config.in"
+	source "package/python-lxml/Config.in"
 	source "package/python-mad/Config.in"
 	source "package/python-markdown/Config.in"
 	source "package/python-markupsafe/Config.in"
package/python-lxml/Config.in new file +10 -0
new file mode 100644
index 0000000..1ccaa5e
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_LXML
+	bool "python-lxml"
+	select BR2_PACKAGE_LIBXML2
+	select BR2_PACKAGE_LIBXSLT
+	select BR2_PACKAGE_ZLIB
+	help
+	  The lxml XML toolkit is a Pythonic binding for the C libraries
+	  libxml2 and libxslt.
+
+	  http://lxml.de/
package/python-lxml/python-lxml.mk +9 -1
index 758ce87..7a94b09 100644
@@ -20,6 +20,14 @@ PYTHON_LXML_LICENSE_FILES = \
 # So, we use setuptools.
 PYTHON_LXML_SETUP_TYPE = setuptools
 
-PYTHON_LXML_DEPENDENCIES = libxml2 libxslt
+PYTHON_LXML_DEPENDENCIES = libxml2 libxslt zlib
+HOST_PYTHON_LXML_DEPENDENCIES = host-libxml2 host-libxslt
 
+# python-lxml needs these scripts in order to properly detect libxml2 and
+# libxslt compiler and linker flags
+PYTHON_LXML_BUILD_OPTS = \
+	--with-xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
+	--with-xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
+
+$(eval $(python-package))
 $(eval $(host-python-package))
Signature · 1 line
1.9.1
#3 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

In reply to Yann E. MORIN

Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution".

In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all).

Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration.

The Khronos group provides such headers, and they are the reference headers, but we can not realy use them:

- most of them are not packaged: they are not versioned and not

    provided in a tarball, but as separately downloadable files;

- those headers are anyway incomplete: there are headers not provided by Khronos, like GL.h

Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need.

Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible.

So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers.

Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2.

---
Notes:

It should not be possible to select both mesa3d *and* mesa3d-headers at the same time, but it is difficult to foresee the multiple combinations we may have, due to poor understanding on how binary drivers may behave and what they may require, as well as my own poor understanding of the GL stack(s).

So I decided to just print a warning in that case, and just depend on mesa3d, which would ultimately provide the headers we are interested in anyway. This can be turned into an error if preferred.

---
 package/Config.in                          |  1 +
 package/mesa3d-headers/Config.in           |  8 ++++
 package/mesa3d-headers/mesa3d-headers.hash |  1 +
 package/mesa3d-headers/mesa3d-headers.mk   | 60 ++++++++++++++++++++++++++++++
 package/mesa3d/mesa3d.mk                   |  1 +
 5 files changed, 71 insertions(+)
 create mode 100644 package/mesa3d-headers/Config.in
 create mode 120000 package/mesa3d-headers/mesa3d-headers.hash
 create mode 100644 package/mesa3d-headers/mesa3d-headers.mk
package/Config.in +1 -0
index 757237e..f25886a 100644
@@ -211,6 +211,7 @@ endif
 	source "package/linux-fusion/Config.in"
 	source "package/lite/Config.in"
 	source "package/mesa3d/Config.in"
+	source "package/mesa3d-headers/Config.in"
 	source "package/ocrad/Config.in"
 	source "package/psplash/Config.in"
 	source "package/sawman/Config.in"
package/mesa3d-headers/Config.in new file +8 -0
new file mode 100644
index 0000000..a64fc0c
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_MESA3D_HEADERS
+	bool
+	help
+	  Mesa 3D, an open-source implementation of the OpenGL specification.
+
+	  This package only installs headers needed by other packages.
+
+	  http://mesa3d.org
package/mesa3d-headers/mesa3d-headers.hash new file +1 -0
new file mode 120000
index 0000000..137d0be
@@ -0,0 +1 @@
+../mesa3d/mesa3d.hash
\ No newline at end of file
package/mesa3d-headers/mesa3d-headers.mk new file +60 -0

60 lines not on this page · raw message

package/mesa3d/mesa3d.mk +1 -0
index eb38a9a..ca98524 100644
@@ -4,6 +4,7 @@
 #
 ################################################################################
 
+# When updating the version, please also update mesa3d-headers
 MESA3D_VERSION = 10.4.4
 MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
Signature · 1 line
1.9.1
#4 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

Yann, all,

I have done some build tests with the nvidia-tegra packages and opengl support.

I was able to build QT5 with opengl without problem but I get errors with QT4.

This is a known problem of QT4 with the inclusion of eglplatform.h inside which there is an inclusion of X11 headers.
The result is that we have some conflicting #define. For me this can be resolved by adding several #undef at the end of eglplatform.h.

Here is the end of my eglplatform.h header

typedef khronos_int32_t EGLint;

#undef None
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef CursorShape
#undef Bool
#undef Status
#undef Unsorted
#undef GrayScale
#undef Expose

#endif /* __eglplatform_h */

Best regards,

Nicolas

Quoted 174 lines · On Tue, 10 Feb 2015 21:01:10 +0100 "Yann E. MORIN" <[email protected]>…

Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution".

In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all).

Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration.

The Khronos group provides such headers, and they are the reference headers, but we can not realy use them:

- most of them are not packaged: they are not versioned and not

    provided in a tarball, but as separately downloadable files;

- those headers are anyway incomplete: there are headers not
provided by Khronos, like GL.h

Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need.

Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible.

So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers.

Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2.

---
Notes:

It should not be possible to select both mesa3d *and* mesa3d-headers at the same time, but it is difficult to foresee the multiple combinations we may have, due to poor understanding on how binary drivers may behave and what they may require, as well as my own poor understanding of the GL stack(s).

So I decided to just print a warning in that case, and just depend on mesa3d, which would ultimately provide the headers we are interested in anyway. This can be turned into an error if preferred.

---
 package/Config.in                          |  1 +
 package/mesa3d-headers/Config.in           |  8 ++++
 package/mesa3d-headers/mesa3d-headers.hash |  1 +
 package/mesa3d-headers/mesa3d-headers.mk   | 60
++++++++++++++++++++++++++++++
package/mesa3d/mesa3d.mk                   |  1 + 5 files changed, 71
insertions(+) create mode 100644 package/mesa3d-headers/Config.in
 create mode 120000 package/mesa3d-headers/mesa3d-headers.hash
 create mode 100644 package/mesa3d-headers/mesa3d-headers.mk
package/Config.in +1 -0
index 757237e..f25886a 100644
@@ -211,6 +211,7 @@ endif
 	source "package/linux-fusion/Config.in"
 	source "package/lite/Config.in"
 	source "package/mesa3d/Config.in"
+	source "package/mesa3d-headers/Config.in"
 	source "package/ocrad/Config.in"
 	source "package/psplash/Config.in"
 	source "package/sawman/Config.in"
(quoted diff) +0 -0

b/package/mesa3d-headers/Config.in new file mode 100644 index 0000000..a64fc0c

package/mesa3d-headers/Config.in new file +4 -0
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_MESA3D_HEADERS
+	bool
+	help
+	  Mesa 3D, an open-source implementation of the OpenGL

specification. +

package/mesa3d-headers/Config.in new file +1 -0
+	  This package only installs headers needed by other

packages. +

package/mesa3d-headers/Config.in new file +1 -0
+	  http://mesa3d.org
(quoted diff) +0 -0

b/package/mesa3d-headers/mesa3d-headers.hash new file mode 120000 index 0000000..137d0be

package/mesa3d-headers/mesa3d-headers.hash new file +1 -0
@@ -0,0 +1 @@
+../mesa3d/mesa3d.hash
\ No newline at end of file
(quoted diff) +0 -0

b/package/mesa3d-headers/mesa3d-headers.mk new file mode 100644 index 0000000..acfc9a3

package/mesa3d-headers/mesa3d-headers.mk new file +21 -0
@@ -0,0 +1,60 @@
+################################################################################
+#
+# mesa3d-headers
+#
+################################################################################
+
+# mesa3d-headers is inherently incompatible with mesa3d, so if mesa3d
+# is enabled, just rely on it.
+
+ifeq ($(BR2_PACKAGE_MESA3D),y)
+
+ifeq ($(BR2_PACKAGE_MESA3D_HEADERS),y)
+$(warning mesa3d-headers enabled, but mesa3d enabled too)
+endif
+
+MESA3D_HEADERS_SOURCE =
+MESA3D_HEADERS_DEPENDENCIES = mesa3d
+
+else # mesa3d
+
+# Not possible to directly refer to mesa3d variables, because of

first/second +# expansion trickery...

package/mesa3d-headers/mesa3d-headers.mk new file +3 -0
+MESA3D_HEADERS_VERSION = 10.4.4
+MESA3D_HEADERS_SOURCE = MesaLib-$(MESA3D_HEADERS_VERSION).tar.bz2
+MESA3D_HEADERS_SITE =

ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION)

package/mesa3d-headers/mesa3d-headers.mk new file +28 -0
+MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos
+MESA3D_HEADERS_LICENSE_FILES = docs/license.html +
+# Only installs header files
+MESA3D_HEADERS_INSTALL_STAGING = YES
+MESA3D_HEADERS_INSTALL_TARGET = NO
+
+MESA3D_HEADERS_DIRS = KHR
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+MESA3D_HEADERS_DIRS += GL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
+MESA3D_HEADERS_DIRS += EGL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+MESA3D_HEADERS_DIRS += GLES GLES2
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
+MESA3D_HEADERS_DIRS += VG
+endif
+
+define MESA3D_HEADERS_INSTALL_STAGING_CMDS
+	$(foreach d,$(MESA3D_HEADERS_DIRS),\
+		for h in $(@D)/include/$(d)/*.h; do \
+			$(INSTALL) -D -m 0644 $${h}

$(STAGING_DIR)/usr/include/$(d)/$$(basename $${h}) || exit 1; \

package/mesa3d-headers/mesa3d-headers.mk new file +6 -0
+		done$(sep))
+endef
+
+endif # !mesa3d
+
+$(eval $(generic-package))
package/mesa3d/mesa3d.mk +1 -0
index eb38a9a..ca98524 100644
@@ -4,6 +4,7 @@
 #
 ################################################################################
 
+# When updating the version, please also update mesa3d-headers
 MESA3D_VERSION = 10.4.4
 MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
Signature · 7 lines
Nicolas Serafini
R&D Embedded Software Engineer

www.sensefly.com
Route de Gen?ve 38
1033 Cheseaux-Lausanne
Switzerland
#5 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

Nicolas, All,

On 2015-02-11 15:06 +0100, Nicolas Serafini spake thusly:

Quoted 8 lines

I have done some build tests with the nvidia-tegra packages and opengl support.

I was able to build QT5 with opengl without problem but I get errors with QT4.

This is a known problem of QT4 with the inclusion of eglplatform.h inside which there is an inclusion of X11 headers.

I'm not sure I understand. Is that an known issue because of Buildroot, or is that a known issue that also happens outside Buildroot?

I mean: is that problem caused by Buildroot?

Quoted 20 lines

The result is that we have some conflicting #define. For me this can be resolved by adding several #undef at the end of eglplatform.h.

Here is the end of my eglplatform.h header

typedef khronos_int32_t EGLint;

#undef None
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef CursorShape
#undef Bool
#undef Status
#undef Unsorted
#undef GrayScale
#undef Expose

Quoted 1 line

#endif /* __eglplatform_h */

Well, I'm not too fond of patching those headers.

I do not completely grok all the inter-relations between X, egl and all the other stuff, so I'd prefer we do not have such hack, especially if the answer to my question aboce is that the issue is not caused by Buildroot.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

Yann, All,

Quoted 9 lines · On Wed, 11 Feb 2015 19:02:01 +0100 "Yann E. MORIN" <[email protected]>…

Nicolas, All,

On 2015-02-11 15:06 +0100, Nicolas Serafini spake thusly:

Quoted 6 lines

I have done some build tests with the nvidia-tegra packages and opengl support.

I was able to build QT5 with opengl without problem but I get errors with QT4.

Quoted 6 lines
Quoted 2 lines

This is a known problem of QT4 with the inclusion of eglplatform.h inside which there is an inclusion of X11 headers.

I'm not sure I understand. Is that an known issue because of Buildroot, or is that a known issue that also happens outside Buildroot?

I do not know if it's an issue only due to buildroot.
I have never built QT4 outside of Buildroot so I do not know if it's a QT4, khronos header or X11 issue.

Quoted 24 lines

I mean: is that problem caused by Buildroot?

Quoted 21 lines

The result is that we have some conflicting #define. For me this can be resolved by adding several #undef at the end of eglplatform.h.

Here is the end of my eglplatform.h header

typedef khronos_int32_t EGLint;

#undef None
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef CursorShape
#undef Bool
#undef Status
#undef Unsorted
#undef GrayScale
#undef Expose

Quoted 8 lines
Quoted 1 line

#endif /* __eglplatform_h */

Well, I'm not too fond of patching those headers.

I do not completely grok all the inter-relations between X, egl and all the other stuff, so I'd prefer we do not have such hack, especially if the answer to my question aboce is that the issue is not caused by Buildroot.

I'm ok to change nothing on the headers.
I have found this workaround on the web few years ago but I never take time to investigate where is really the bug. It could be useful if someone has the problem to find a workaround into the mailing list.

Quoted 4 lines

Regards,
Yann E. MORIN.

Regards,

Nicolas

Signature · 7 lines
Nicolas Serafini
R&D Embedded Software Engineer

www.sensefly.com
Route de Gen?ve 38
1033 Cheseaux-Lausanne
Switzerland
#7 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

In reply to Yann E. MORIN

Hello Yann, Nicolas,

Quoted 37 lines · On Wednesday 11 February 2015 19:02:01 Yann E. MORIN wrote:

Nicolas, All,

On 2015-02-11 15:06 +0100, Nicolas Serafini spake thusly:

Quoted 8 lines

I have done some build tests with the nvidia-tegra packages and opengl support.

I was able to build QT5 with opengl without problem but I get errors with QT4.

This is a known problem of QT4 with the inclusion of eglplatform.h inside which there is an inclusion of X11 headers.

I'm not sure I understand. Is that an known issue because of Buildroot, or is that a known issue that also happens outside Buildroot?

I mean: is that problem caused by Buildroot?

Quoted 20 lines

The result is that we have some conflicting #define. For me this can be resolved by adding several #undef at the end of eglplatform.h.

Here is the end of my eglplatform.h header

typedef khronos_int32_t EGLint;

#undef None
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef CursorShape
#undef Bool
#undef Status
#undef Unsorted
#undef GrayScale
#undef Expose

Quoted 8 lines
Quoted 1 line

#endif /* __eglplatform_h */

Well, I'm not too fond of patching those headers.

I do not completely grok all the inter-relations between X, egl and all the other stuff, so I'd prefer we do not have such hack, especially if the answer to my question aboce is that the issue is not caused by Buildroot.

I think you can compile Qt4 by passing -DMESA_EG_NO_X11_HEADERS to Qt cflags. However, I think the result will not work.

MESA_EG_NO_X11_HEADERS should be defined in egl.pc by your OpenGL provider. However, some OpenGL driver only provide support EGL under Xorg (as it is the case for Nvidia driver). So, in this case, you just cannot compile Qt4 w/ OpenGL ES with this driver.

I think it should also fail if you enable mesa3d + xorg + qt4/opengles, no?

BR,

Signature · 1 line
J?r?me Pouiller
#8 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution".

In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all).

Quoted 5 lines

Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration.

The Khronos group provides such headers, and they are the reference headers, but we can not realy use them:

really

Quoted 4 lines

- most of them are not packaged: they are not versioned and not

    provided in a tarball, but as separately downloadable files;
Quoted 8 lines

- those headers are anyway incomplete: there are headers not provided by Khronos, like GL.h

Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need.

Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The

whether

Quoted 22 lines

meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible.

So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers.

Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2.

---
Notes:

It should not be possible to select both mesa3d *and* mesa3d-headers at the same time, but it is difficult to foresee the multiple combinations we may have, due to poor understanding on how binary drivers may behave and what they may require, as well as my own poor understanding of the GL stack(s).

Quoted 3 lines

So I decided to just print a warning in that case, and just depend on mesa3d, which would ultimately provide the headers we are interested in anyway. This can be turned into an error if preferred.

Yes, I believe this should rather be an error. The expected users of mesa3d-headers are proprietary OpenGL implementations, which have normally no reason to co-exist with Mesa3D on a given system. So I'd prefer this to be considered an error, and to not have mesa3d-headers depend on mesa3d when both are enabled.

Quoted 16 lines
package/mesa3d-headers/mesa3d-headers.mk new file +16 -0
+# Only installs header files
+MESA3D_HEADERS_INSTALL_STAGING = YES
+MESA3D_HEADERS_INSTALL_TARGET = NO
+
+MESA3D_HEADERS_DIRS = KHR
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+MESA3D_HEADERS_DIRS += GL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
+MESA3D_HEADERS_DIRS += EGL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+MESA3D_HEADERS_DIRS += GLES GLES2

package/mesa3d-headers/mesa3d-headers.mk line 54

Quoted 10 lines
package/mesa3d-headers/mesa3d-headers.mk new file +10 -0
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
+MESA3D_HEADERS_DIRS += VG
+endif
+
+define MESA3D_HEADERS_INSTALL_STAGING_CMDS
+	$(foreach d,$(MESA3D_HEADERS_DIRS),\
+		for h in $(@D)/include/$(d)/*.h; do \
+			$(INSTALL) -D -m 0644 $${h} $(STAGING_DIR)/usr/include/$(d)/$$(basename $${h}) || exit 1; \

Instead of doing a for for each header, what about using a plain cp -dpfr like we do in many other packages?

Let me know if you agree with the proposed changes, I can quickly make them while applying if you don't want to respin the entire patch series.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

Thomas, All,

On 2015-02-14 10:09 +0100, Thomas Petazzoni spake thusly:

Quoted 1 line · Yann E. MORIN

[--SNIP--]

Quoted 4 lines
Quoted 2 lines

The Khronos group provides such headers, and they are the reference headers, but we can not realy use them:

really

OK.

[--SNIP--]

Quoted 4 lines
Quoted 2 lines

Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The

whether

OK.

[--SNIP--]

Quoted 10 lines
Quoted 9 lines

It should not be possible to select both mesa3d *and* mesa3d-headers at the same time, but it is difficult to foresee the multiple combinations we may have, due to poor understanding on how binary drivers may behave and what they may require, as well as my own poor understanding of the GL stack(s).

So I decided to just print a warning in that case, and just depend on mesa3d, which would ultimately provide the headers we are interested in anyway. This can be turned into an error if preferred.

Quoted 5 lines

Yes, I believe this should rather be an error. The expected users of mesa3d-headers are proprietary OpenGL implementations, which have normally no reason to co-exist with Mesa3D on a given system. So I'd prefer this to be considered an error, and to not have mesa3d-headers depend on mesa3d when both are enabled.

OK.

Quoted 21 lines
Quoted 21 lines
package/mesa3d-headers/mesa3d-headers.mk new file +21 -0
+# Only installs header files
+MESA3D_HEADERS_INSTALL_STAGING = YES
+MESA3D_HEADERS_INSTALL_TARGET = NO
+
+MESA3D_HEADERS_DIRS = KHR
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+MESA3D_HEADERS_DIRS += GL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
+MESA3D_HEADERS_DIRS += EGL
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+MESA3D_HEADERS_DIRS += GLES GLES2
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
+MESA3D_HEADERS_DIRS += VG
+endif
Quoted 8 lines

package/mesa3d-headers/mesa3d-headers.mk line 54

Quoted 5 lines
package/mesa3d-headers/mesa3d-headers.mk new file +5 -0
+
+define MESA3D_HEADERS_INSTALL_STAGING_CMDS
+	$(foreach d,$(MESA3D_HEADERS_DIRS),\
+		for h in $(@D)/include/$(d)/*.h; do \
+			$(INSTALL) -D -m 0644 $${h} $(STAGING_DIR)/usr/include/$(d)/$$(basename $${h}) || exit 1; \

Instead of doing a for for each header, what about using a plain cp -dpfr like we do in many other packages?

OK.

Quoted 2 lines

Let me know if you agree with the proposed changes, I can quickly make them while applying if you don't want to respin the entire patch series.

I'll do that while you apply other patches! ;-)

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH v7 3/10 package/mesa3d-headers: new package

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 32 lines · Yann E. MORIN

Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution".

In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all).

Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration.

The Khronos group provides such headers, and they are the reference headers, but we can not realy use them:

- most of them are not packaged: they are not versioned and not

    provided in a tarball, but as separately downloadable files;

- those headers are anyway incomplete: there are headers not provided by Khronos, like GL.h

Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need.

Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible.

So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers.

Quoted 5 lines

Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2.

Thanks, applied, after doing some minor changes:

[Thomas:
- Wrap Config.in help text to a reasonable length.
- Don't rely on mesa3d to provide mesa3d-headers: they should be mutually exclusive. Instead, error out if both packages are selected.
- Take into account the update of mesa3d to 10.4.5.
- Don't copy each header file individually, use a cp -dpfr call to copy entires header files directories.]

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#11 lore raw

PATCH v7 4/10 package/mesa3d-headers: also install dri header and .pc file

In reply to Yann E. MORIN

Building GL with Xorg requires the DRI interface.

Provide that header and pkg-config file for those binary blobs that do not provide them.

Cc J?r?me Pouiller <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d-headers/mesa3d-headers.mk | 33 +++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
package/mesa3d-headers/mesa3d-headers.mk +32 -1
index acfc9a3..0a2702f 100644
@@ -33,8 +33,34 @@ MESA3D_HEADERS_INSTALL_TARGET = NO
 MESA3D_HEADERS_DIRS = KHR
 
 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+
 MESA3D_HEADERS_DIRS += GL
-endif
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+
+# Not using $(SED) because we do not want to work in-place, and $(SED)
+# contains -i.
+define MESA3D_HEADERS_BUILD_DRI_PC
+	sed -e 's:@\(exec_\)\?prefix@:/usr:' \
+	    -e 's:@libdir@:${exec_prefix}/lib:' \
+	    -e 's:@includedir@:${prefix}/include:' \
+	    -e 's:@DRI_DRIVER_INSTALL_DIR@:${libdir}/dri:' \
+	    -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \
+	    -e 's:@DRI_PC_REQ_PRIV@::' \
+	    $(@D)/src/mesa/drivers/dri/dri.pc.in \
+	    >$(@D)/src/mesa/drivers/dri/dri.pc
+endef
+
+define MESA3D_HEADERS_INSTALL_DRI_PC
+	$(INSTALL) -D -m 0644 $(@D)/include/GL/internal/dri_interface.h \
+		$(STAGING_DIR)/usr/include/GL/internal/dri_interface.h
+	$(INSTALL) -D -m 0644 $(@D)/src/mesa/drivers/dri/dri.pc \
+		$(STAGING_DIR)/usr/lib/pkg-config/dri.pc
+endef
+
+endif # Xorg
+
+endif # OpenGL
 
 ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
 MESA3D_HEADERS_DIRS += EGL
@@ -48,11 +74,16 @@ ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
 MESA3D_HEADERS_DIRS += VG
 endif
 
+define MESA3D_HEADERS_BUILD_CMDS
+	$(MESA3D_HEADERS_BUILD_DRI_PC)
+endef
+
 define MESA3D_HEADERS_INSTALL_STAGING_CMDS
 	$(foreach d,$(MESA3D_HEADERS_DIRS),\
 		for h in $(@D)/include/$(d)/*.h; do \
 			$(INSTALL) -D -m 0644 $${h} $(STAGING_DIR)/usr/include/$(d)/$$(basename $${h}) || exit 1; \
 		done$(sep))
+	$(MESA3D_HEADERS_INSTALL_DRI_PC)
 endef
 
 endif # !mesa3d
Signature · 1 line
1.9.1
#12 lore raw

PATCH v7 4/10 package/mesa3d-headers: also install dri header and .pc file

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

Building GL with Xorg requires the DRI interface.

Provide that header and pkg-config file for those binary blobs that do not provide them.

Cc J?r?me Pouiller <[email protected]>
Cc Bernd Kuhls <[email protected]>

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

PATCH v7 5/10 package/nvidia-driver: add NVidia's OpenGL binary blob

In reply to Yann E. MORIN

This 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.

---
Changes v6 -> v7:
- use mesa3d-headers instead of Khronos Registry

Changes v4 -> v5:
- fix libGL.la for stupid libtool

---
 package/Config.in                        |   1 +
 package/nvidia-driver/Config.in          |  51 ++++++++++++++
 package/nvidia-driver/nvidia-driver.hash |   3 +
 package/nvidia-driver/nvidia-driver.mk   | 110 +++++++++++++++++++++++++++++++
 4 files changed, 165 insertions(+)
 create mode 100644 package/nvidia-driver/Config.in
 create mode 100644 package/nvidia-driver/nvidia-driver.hash
 create mode 100644 package/nvidia-driver/nvidia-driver.mk
package/Config.in +1 -0
index f25886a..a80cec6 100644
@@ -349,6 +349,7 @@ endif
 	source "package/minicom/Config.in"
 	source "package/nanocom/Config.in"
 	source "package/neard/Config.in"
+	source "package/nvidia-driver/Config.in"
 	source "package/ofono/Config.in"
 	source "package/ola/Config.in"
 	source "package/on2-8170-modules/Config.in"
package/nvidia-driver/Config.in new file +51 -0

51 lines not on this page · raw message

package/nvidia-driver/nvidia-driver.hash new file +3 -0
new file mode 100644
index 0000000..137590f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  bba63c30c730ad7b8500a77c81cae58562b9f9b57cd576b61f37a2d8bc45df25  NVIDIA-Linux-x86-346.35.run
+sha256  8625acbbc7a2abdda436a5cb9d06f2a7f5913b16e0a35ac4f9f106853a94d086  NVIDIA-Linux-x86_64-346.35.run
package/nvidia-driver/nvidia-driver.mk new file +110 -0

110 lines not on this page · raw message

Signature · 1 line
1.9.1
#14 lore raw

PATCH v7 6/10 package/nvidia-driver: Add gl.pc

In reply to Yann E. MORIN

From: J?r?me Pouiller <[email protected]>

In order to compile xserver, libgl provider have to provide gl.pc file.

---
 package/nvidia-driver/gl.pc            | 11 +++++++++++
 package/nvidia-driver/nvidia-driver.mk |  1 +
 2 files changed, 12 insertions(+)
 create mode 100644 package/nvidia-driver/gl.pc
package/nvidia-driver/gl.pc new file +11 -0
new file mode 100644
index 0000000..d822763
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: gl
+Description: Nvidia OpenGL library
+Version: 10.4.2
+Libs: -L${libdir} -lGL -lm -lXext -lX11 -ldl
+Cflags: -I${includedir}  -DMESA_EGL_NO_X11_HEADERS
+glx_tls: no
package/nvidia-driver/nvidia-driver.mk +1 -0
index 30b2ab6..807dd65 100644
@@ -96,6 +96,7 @@ define NVIDIA_DRIVER_INSTALL_STAGING_CMDS
 	$(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
 endef
 
 # For target, install libraries and X.org modules
Signature · 1 line
1.9.1
#15 lore raw

PATCH v7 6/10 package/nvidia-driver: Add gl.pc

[posted and mailed]

"Yann E. MORIN" <[email protected]> wrote in news:09718509727afa315acf9e7b999f71243f2a67c3.1423597914.git.yann.morin.1998 @free.fr:

Quoted 1 line

+ $(INSTALL) -D -m 0644 package/nvidia-driver/gl.pc

$(STAGING_DIR)/usr/lib/pkgconfig/gl.pc

Hi,

the nvidia package should not install gl.pc when BR2_PACKAGE_NVIDIA_DRIVER_XORG is not set because in this case nvidia-driver is not a provider for libgl.

The reason for this autobuild error
http://autobuild.buildroot.net/results/724/724fce8ce51c2c0578192b1369a1cfcea3
d72638/
in the vlc package is that vlc detects gl.pc from the nvidia package and tries to enable opengl support. Compiling this defconfig with "make vlc" alone works, if you compile nvidia-driver before vlc than the build breaks.

.config looks like this.

$ grep -i nvidia .config
BR2_PACKAGE_NVIDIA_DRIVER=y
# nvidia-driver X.org drivers needs a modular Xorg server
# BR2_PACKAGE_NVIDIA_DRIVER_CUDA is not set
# nvidia kernel module needs a kernel to be built

Regards, Bernd

#16 lore raw

PATCH v7 6/10 package/nvidia-driver: Add gl.pc

Bernd, All,

On 2015-04-24 22:16 +0200, Bernd Kuhls spake thusly:
[--SNIP--]

Quoted 6 lines
Quoted 1 line

+ $(INSTALL) -D -m 0644 package/nvidia-driver/gl.pc

$(STAGING_DIR)/usr/lib/pkgconfig/gl.pc

the nvidia package should not install gl.pc when BR2_PACKAGE_NVIDIA_DRIVER_XORG is not set because in this case nvidia-driver is not a provider for libgl.

Indeed. I'll cook up a patch.

Thanks for the report!

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#17 lore raw

PATCH v7 7/10 package/nvidia-driver: build the kernel module

In reply to Yann E. MORIN

Add option to build the nvidia.ko module. If CUDA is enabled on x86_64, 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        | 14 ++++++++++
 package/nvidia-driver/nvidia-driver.mk | 50 ++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
package/nvidia-driver/Config.in +14 -0
index 9be6764..a9ac109 100644
@@ -48,4 +48,18 @@ 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, and the target is x86_64, 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 +50 -0

62 lines not on this page · raw message

Signature · 1 line
1.9.1
#18 lore raw

PATCH v7 7/10 package/nvidia-driver: build the kernel module

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

Add option to build the nvidia.ko module. If CUDA is enabled on x86_64, 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

Applied to next, after doing some minor changes:

[Thomas:
- add quotes when using $(TARGET_CC) and other variables, since they can have spaces in their values
- remove space after opening parenthesis and before closing parenthesis.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#19 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

In reply to Yann E. MORIN

From: Nicolas Serafini <[email protected]>

This patch adds a new package for all libraries and drivers provided by Nvidia Linux4Tegra release 16.4.0.

We have intermediate .mk and Config.in, because those values will be shared with the codecs package, to come in a follow-up patch, like we have for the Freescale stuff.

[yann.morin.1998 at free.fr:
- split jpeg into its own patch
- split codecs and gstreamer plugins out into their own packages
- do not patch for .pc files, just bundle them in $(@D)
]

---
Changes v6 -> v7:
- use mesa3d-headers instead of Khronos

---
 package/Config.in                                  |  1 +
 package/nvidia-tegra23/Config.in                   | 36 ++++++++
 .../nvidia-tegra23-binaries/Config.in              | 92 ++++++++++++++++++++
 .../nvidia-tegra23/nvidia-tegra23-binaries/egl.pc  | 10 +++
 .../nvidia-tegra23/nvidia-tegra23-binaries/gles.pc | 10 +++
 .../nvidia-tegra23-binaries/glesv2.pc              | 10 +++
 .../nvidia-tegra23-binaries.hash                   |  3 +
 .../nvidia-tegra23-binaries.mk                     | 98 ++++++++++++++++++++++
 package/nvidia-tegra23/nvidia-tegra23.mk           | 17 ++++
 9 files changed, 277 insertions(+)
 create mode 100644 package/nvidia-tegra23/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23.mk
package/Config.in +1 -0
index a80cec6..ba28620 100644
@@ -350,6 +350,7 @@ endif
 	source "package/nanocom/Config.in"
 	source "package/neard/Config.in"
 	source "package/nvidia-driver/Config.in"
+	source "package/nvidia-tegra23/Config.in"
 	source "package/ofono/Config.in"
 	source "package/ola/Config.in"
 	source "package/on2-8170-modules/Config.in"
package/nvidia-tegra23/Config.in new file +36 -0
new file mode 100644
index 0000000..950f2f8
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7
+	help
+	  Install NVidia proprietary blobs to drive Tegra2 or Tegra3
+	  GPUs found in some mobile-targeted ARM SoCs.
+
+if BR2_PACKAGE_NVIDIA_TEGRA23
+
+choice
+	prompt "Tegra platform"
+	help
+	  Select the SOC platform.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2
+	bool "Tegra 2"
+	help
+	  NVIDIA Tegra 2 is a dual-core Cortex-A9 without NEON.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3
+	bool "Tegra 3"
+	depends on BR2_ARM_CPU_HAS_NEON
+	help
+	  NVIDIA Tegra 3 is a quad-core Cortex-A9 with NEON.
+
+endchoice
+
+source "package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in"
+endif
+
+comment "nvidia-tegra23 needs Xorg and a (e)glibc toolchain w/ EABIhf"
+	depends on BR2_cortex_a9
+	depends on !BR2_ARM_EABIHF || !BR2_TOOLCHAIN_USES_GLIBC \
+		|| !BR2_PACKAGE_XORG7
package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in new file +92 -0

92 lines not on this page · raw message

package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc new file +10 -0
new file mode 100644
index 0000000..3af7eec
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: egl
+Description: EGL implementation
+Version: 1
+Cflags: -I${includedir}/EGL
+Libs: -L${libdir} -lEGL
package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc new file +10 -0
new file mode 100644
index 0000000..91387c9
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 1.1 implementation
+Version: 1.1
+Cflags: -I${includedir}/GLES
+Libs: -L${libdir} -lGLESv1_CM
package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +10 -0
new file mode 100644
index 0000000..356a1cb
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 2 implementation
+Version: 2
+Cflags: -I${includedir}/GLESv2
+Libs: -L${libdir} -lGLESv2
package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash new file +3 -0
new file mode 100644
index 0000000..8185593
@@ -0,0 +1,3 @@
+# From https://developer.nvidia.com/linux-tegra-rel-16
+sha1 6b57b43f8f9c5b76fa3763144e57c0c16047b1a8 Tegra20_Linux_R16.4.0_armhf.tbz2
+sha1 44e7f84dd6e3b80d37ecddf9cc133031b2653004 Tegra30_Linux_R16.4.0_armhf.tbz2
package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk new file +98 -0

98 lines not on this page · raw message

package/nvidia-tegra23/nvidia-tegra23.mk new file +17 -0
new file mode 100644
index 0000000..46a7e04
@@ -0,0 +1,17 @@
+################################################################################
+#
+# nvidia-tegra23
+#
+################################################################################
+
+NVIDIA_TEGRA23_SITE = https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T
+NVIDIA_TEGRA23_VERSION = 16.4.0
+
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y)
+NVIDIA_TEGRA23_BASE = Tegra20_Linux
+endif
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y)
+NVIDIA_TEGRA23_BASE = Tegra30_Linux
+endif
+
+include $(sort $(wildcard package/nvidia-tegra23/*/*.mk))
Signature · 1 line
1.9.1
#20 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Yann, Ben, All,

Thanks for this new version of the patch. I was in holliday the two previous week, so sorry I have not responded for the previous version of the patch.

It's a good idea to use the mesa headers.

I have done some tests and there is only one small bug into the .mk file. The correction is below into the patch.

Thanks,

Quoted 275 lines · On Tue, 10 Feb 2015 21:01:15 +0100 "Yann E. MORIN" <[email protected]>…

From: Nicolas Serafini <[email protected]>

This patch adds a new package for all libraries and drivers provided by Nvidia Linux4Tegra release 16.4.0.

We have intermediate .mk and Config.in, because those values will be shared with the codecs package, to come in a follow-up patch, like we have for the Freescale stuff.

[yann.morin.1998 at free.fr:
- split jpeg into its own patch
- split codecs and gstreamer plugins out into their own packages
- do not patch for .pc files, just bundle them in $(@D)
]

---
Changes v6 -> v7:
- use mesa3d-headers instead of Khronos

---
 package/Config.in                                  |  1 +
 package/nvidia-tegra23/Config.in                   | 36 ++++++++
 .../nvidia-tegra23-binaries/Config.in              | 92
++++++++++++++++++++ .../nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
| 10 +++ .../nvidia-tegra23/nvidia-tegra23-binaries/gles.pc | 10 +++
 .../nvidia-tegra23-binaries/glesv2.pc              | 10 +++
 .../nvidia-tegra23-binaries.hash                   |  3 +
 .../nvidia-tegra23-binaries.mk                     | 98

++++++++++++++++++++++
package/nvidia-tegra23/nvidia-tegra23.mk | 17 ++++ 9 files
changed, 277 insertions(+) create mode 100644 package/nvidia-tegra23/Config.in create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash create mode 100644 package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk create mode 100644 package/nvidia-tegra23/nvidia-tegra23.mk

package/Config.in +1 -0
index a80cec6..ba28620 100644
@@ -350,6 +350,7 @@ endif
 	source "package/nanocom/Config.in"
 	source "package/neard/Config.in"
 	source "package/nvidia-driver/Config.in"
+	source "package/nvidia-tegra23/Config.in"
 	source "package/ofono/Config.in"
 	source "package/ola/Config.in"
 	source "package/on2-8170-modules/Config.in"
(quoted diff) +0 -0

b/package/nvidia-tegra23/Config.in new file mode 100644 index 0000000..950f2f8

package/nvidia-tegra23/Config.in new file +33 -0
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7
+	help
+	  Install NVidia proprietary blobs to drive Tegra2 or Tegra3
+	  GPUs found in some mobile-targeted ARM SoCs.
+
+if BR2_PACKAGE_NVIDIA_TEGRA23
+
+choice
+	prompt "Tegra platform"
+	help
+	  Select the SOC platform.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2
+	bool "Tegra 2"
+	help
+	  NVIDIA Tegra 2 is a dual-core Cortex-A9 without NEON.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3
+	bool "Tegra 3"
+	depends on BR2_ARM_CPU_HAS_NEON
+	help
+	  NVIDIA Tegra 3 is a quad-core Cortex-A9 with NEON.
+
+endchoice
+
+source "package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in"
+endif
+
+comment "nvidia-tegra23 needs Xorg and a (e)glibc toolchain w/

EABIhf"

package/nvidia-tegra23/Config.in new file +3 -0
+	depends on BR2_cortex_a9
+	depends on !BR2_ARM_EABIHF || !BR2_TOOLCHAIN_USES_GLIBC \
+		|| !BR2_PACKAGE_XORG7
(quoted diff) +0 -0

b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in new file mode 100644 index 0000000..1d213d0

package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in new file +11 -0
@@ -0,0 +1,92 @@
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+	bool "nvidia-tegra23 binaries"
+	select BR2_PACKAGE_MESA3D_HEADERS
+	select BR2_PACKAGE_XLIB_LIBXT
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBXV
+	select BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_HAS_LIBOPENMAX
+	help
+	  Those packages provide libraries, drivers and firmware

that comes from

package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in new file +81 -0
+	  NVIDIA Linux For Tegra.
+
+	  https://developer.nvidia.com/linux-tegra
+
+if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+	default "nvidia-tegra23-binaries"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+	default "nvidia-tegra23-binaries"
+
+config BR2_PACKAGE_PROVIDES_LIBOPENMAX
+	default "nvidia-tegra23-binaries"
+
+choice
+	prompt "X11 ABI version"
+	default BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	help
+	  Select Tegra X11 ABI version.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	bool "X11 ABI 5"
+	help
+	  Tegra X11 ABI 5.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	bool "X11 ABI 6"
+	help
+	  Tegra X11 ABI 6.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	bool "X11 ABI 7"
+	help
+	  Tegra X11 ABI 7.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	bool "X11 ABI 8"
+	help
+	  Tegra X11 ABI 8.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	bool "X11 ABI 10"
+	help
+	  Tegra X11 ABI 10.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	bool "X11 ABI 11"
+	help
+	  Tegra X11 ABI 11.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	bool "X11 ABI 12"
+	help
+	  Tegra X11 ABI 12.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	bool "X11 ABI 13"
+	help
+	  Tegra X11 ABI 13.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+	bool "X11 ABI 14"
+	help
+	  Tegra X11 ABI 14.
+
+endchoice
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI
+	int
+	default 5  if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	default 6  if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	default 7  if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	default 8  if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	default 10 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	default 11 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	default 12 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	default 13 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	default 14 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+
+endif
(quoted diff) +0 -0

b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc new file mode 100644 index 0000000..3af7eec

package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc new file +10 -0
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: egl
+Description: EGL implementation
+Version: 1
+Cflags: -I${includedir}/EGL
+Libs: -L${libdir} -lEGL
(quoted diff) +0 -0

b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc new file mode 100644 index 0000000..91387c9

package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc new file +10 -0
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 1.1 implementation
+Version: 1.1
+Cflags: -I${includedir}/GLES
+Libs: -L${libdir} -lGLESv1_CM
(quoted diff) +0 -0

b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file mode 100644 index 0000000..356a1cb

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +10 -0
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: glesv2
+Description: OpenGL ES 2 implementation
+Version: 2
+Cflags: -I${includedir}/GLESv2
+Libs: -L${libdir} -lGLESv2

diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash new file mode 100644 index 0000000..8185593 --- /dev/null
+++
b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +0 -0
@@ -0,0 +1,3 @@ +# From

https://developer.nvidia.com/linux-tegra-rel-16 +sha1 6b57b43f8f9c5b76fa3763144e57c0c16047b1a8 Tegra20_Linux_R16.4.0_armhf.tbz2 +sha1 44e7f84dd6e3b80d37ecddf9cc133031b2653004 Tegra30_Linux_R16.4.0_armhf.tbz2 diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk new file mode 100644 index 0000000..792cc7c --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +7 -0
@@ -0,0 +1,98 @@
+################################################################################
+# +# nvidia-tegra3-binaries +#
+################################################################################
+
+NVIDIA_TEGRA23_BINARIES_VERSION	= $(NVIDIA_TEGRA23_VERSION)
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE =

$(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+ +NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software +NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE +

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc

Quoted 9 lines
package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +9 -0
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES
+
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+	xlib_libX11 xlib_libXext xlib_libXv
+
+NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax
+
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA2),y)

must be replaced by
ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y)

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc

Quoted 5 lines
package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +5 -0
+NVIDIA_TEGRA23_BINARIES_FIRMWARE = \
+	nvrm_avp.bin nvavp_vid_ucode_alt.bin nvavp_os_0ff00000.bin \
+	nvavp_os_eff00000.bin
+endif
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA3),y)

must be replaced by
ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y)

Quoted 115 lines
package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+NVIDIA_TEGRA23_BINARIES_FIRMWARE = \
+	nvrm_avp_0ff00000.bin nvrm_avp_8e000000.bin

nvrm_avp_9e000000.bin \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	nvrm_avp_be000000.bin nvrm_avp_eff00000.bin

nvavp_vid_ucode_alt.bin \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +5 -0
+	nvavp_os_0ff00000.bin nvavp_os_eff00000.bin
+endif
+
+NVIDIA_TEGRA23_BINARIES_LIBRARIES = \
+	libardrv_dynamic.so libcgdrv.so libEGL.so.1

libGLESv1_CM.so.1 libGLESv2.so.2 \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+	libKD.so libnvapputil.so libnvavp.so libnvcwm.so libnvdc.so \
+	libnvddk_2d.so libnvddk_2d_v2.so libnvddk_disp.so

libnvddk_kbc.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvddk_mipihsi.so libnvddk_nand.so libnvddk_se.so

libnvddk_snor.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvddk_spif.so libnvddk_usbphy.so libnvdispatch_helper.so

libnvglsi.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvmedia_audio.so libnvmm_audio.so libnvmm_camera.so

libnvmm_contentpipe.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvmm_image.so libnvmmlite_audio.so libnvmmlite_image.so

libnvmmlite.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvmmlite_utils.so libnvmmlite_video.so libnvmm_manager.so

libnvmm_parser.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvmm_service.so libnvmm.so libnvmm_utils.so

libnvmm_video.so libnvmm_writer.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvodm_disp.so libnvodm_dtvtuner.so libnvodm_imager.so

libnvodm_misc.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvodm_query.so libnvomxilclient.so libnvomx.so libnvos.so

libnvparser.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +1 -0
+	libnvrm_graphics.so libnvrm.so libnvsm.so libnvtestio.so

libnvtestresults.so \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +4 -0
+	libnvtvmr.so libnvwinsys.so libnvwsi.so
+
+NVIDIA_TEGRA23_BINARIES_DRV = \
+

nv_tegra/nvidia_drivers/usr/lib/xorg/modules/drivers/tegra_drv.abi$(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI).so
+ +NVIDIA_TEGRA23_BINARIES_PKGCONFIG = egl.pc gles.pc glesv2.pc

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +4 -0
+
+define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
+	$(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers
+	$(call

suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+		$(@D)/nv_tegra/nvidia_drivers.tbz2 | \
+	$(TAR) $(TAR_STRIP_COMPONENTS)=0 -C

$(@D)/nv_tegra/nvidia_drivers/ $(TAR_OPTIONS) -

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+	$(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps
+	$(call

suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+		$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2 | \
+	$(TAR) $(TAR_STRIP_COMPONENTS)=0 -C

$(@D)/nv_tegra/nv_sample_apps/nvgstapps/ $(TAR_OPTIONS) - +endef +NVIDIA_TEGRA23_BINARIES_POST_EXTRACT_HOOKS += NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER +

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +3 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+	$(foreach lib,$(NVIDIA_TEGRA23_BINARIES_LIBRARIES),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/usr/lib/$(lib) \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +13 -0
+			$(1)/usr/lib/$(lib); \
+	)
+	(cd $(1)/usr/lib; \
+		ln -sf libGLESv2.so.2 libGLESv2.so; \
+		ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
+		ln -sf libEGL.so.1 libEGL.so \
+	)
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
+	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
+		$(INSTALL) -D -m 0644

package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
+
$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +7 -0
+	)
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))
+	$(foreach firmware,$(NVIDIA_TEGRA23_BINARIES_FIRMWARE),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/lib/firmware/$(firmware) \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +3 -0
+			$(TARGET_DIR)/lib/firmware/$(firmware); \
+	)
+	$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +3 -0
+		$(TARGET_DIR)/etc/nv_tegra_release
+	$(INSTALL) -D -m 0644 $(@D)/$(NVIDIA_TEGRA23_BINARIES_DRV) \
+

$(TARGET_DIR)/usr/lib/xorg/modules/drivers/tegra_drv.so +endef

package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file +2 -0
+
+$(eval $(generic-package))
(quoted diff) +0 -0

b/package/nvidia-tegra23/nvidia-tegra23.mk new file mode 100644 index 0000000..46a7e04

package/nvidia-tegra23/nvidia-tegra23.mk new file +7 -0
@@ -0,0 +1,17 @@
+################################################################################
+#
+# nvidia-tegra23
+#
+################################################################################
+
+NVIDIA_TEGRA23_SITE =

https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T

package/nvidia-tegra23/nvidia-tegra23.mk new file +9 -0
+NVIDIA_TEGRA23_VERSION = 16.4.0 +
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y)
+NVIDIA_TEGRA23_BASE = Tegra20_Linux
+endif
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y)
+NVIDIA_TEGRA23_BASE = Tegra30_Linux
+endif
+
+include $(sort $(wildcard package/nvidia-tegra23/*/*.mk))
Signature · 7 lines
Nicolas Serafini
R&D Embedded Software Engineer

www.sensefly.com
Route de Gen?ve 38
1033 Cheseaux-Lausanne
Switzerland
#21 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Nicolas, All,

On 2015-02-11 14:42 +0100, Nicolas Serafini spake thusly:

Quoted 3 lines

Thanks for this new version of the patch. I was in holliday the two previous week, so sorry I have not responded for the previous version of the patch.

No problem! hope you enjoyed it! ;-)

Quoted 2 lines

I have done some tests and there is only one small bug into the .mk file. The correction is below into the patch.

[--SNIP--]

Quoted 3 lines
Quoted 1 line

+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA2),y)

must be replaced by
ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y)

Dang... Nice catch!

Quoted 7 lines

package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk line 27

Quoted 5 lines
package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk new file +5 -0
+NVIDIA_TEGRA23_BINARIES_FIRMWARE = \
+	nvrm_avp.bin nvavp_vid_ucode_alt.bin nvavp_os_0ff00000.bin \
+	nvavp_os_eff00000.bin
+endif
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA3),y)

must be replaced by
ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y)

Ditto.

Thanks for the review!

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#22 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

In reply to Yann E. MORIN

Yann, Nicolas,

package/nvidia-tegra23/Config.in line 5

Quoted 11 lines · Yann E. MORIN
package/nvidia-tegra23/Config.in new file +5 -0
new file mode 100644
index 0000000..950f2f8
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7

Why is X.org required? Those NVidia drivers provide an EGL implementation, so I would expect them to be usable without X.org, for example if you want to do Qt5 over eglfs. Isn't it the case?

Quoted 40 lines
package/nvidia-tegra23/Config.in new file +40 -0
+choice
+	prompt "X11 ABI version"
+	default BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	help
+	  Select Tegra X11 ABI version.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	bool "X11 ABI 5"
+	help
+	  Tegra X11 ABI 5.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	bool "X11 ABI 6"
+	help
+	  Tegra X11 ABI 6.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	bool "X11 ABI 7"
+	help
+	  Tegra X11 ABI 7.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	bool "X11 ABI 8"
+	help
+	  Tegra X11 ABI 8.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	bool "X11 ABI 10"
+	help
+	  Tegra X11 ABI 10.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	bool "X11 ABI 11"
+	help
+	  Tegra X11 ABI 11.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	bool "X11 ABI 12"
+	help
+	  Tegra X11 ABI 12.

package/nvidia-tegra23/Config.in

Quoted 10 lines
package/nvidia-tegra23/Config.in new file +10 -0
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	bool "X11 ABI 13"
+	help
+	  Tegra X11 ABI 13.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+	bool "X11 ABI 14"
+	help
+	  Tegra X11 ABI 14.

Is this choice really useful? In Buildroot, we only support one version of the X.org server at a time, so only one ABI version.

And currently, we have X.org server 1.17.1, which implementation the video driver ABI version 19. How can this work with the Tegra drivers if they only support up to ABI version 14 ?

Quoted 1 line

+NVIDIA_TEGRA23_BINARIES_VERSION = $(NVIDIA_TEGRA23_VERSION)

Spacing issue here.

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +8 -0
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+
+NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software
+NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE
+
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES

Last line not needed, it's the default.

package/nvidia-tegra23/Config.in

Quoted 2 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+	xlib_libX11 xlib_libXext xlib_libXv

A comment above this explaining why even though those are not build dependencies of nvidia-tegra23-binaries they should still be listed in the DEPENDENCIES would be useful.

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +8 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+	$(foreach lib,$(NVIDIA_TEGRA23_BINARIES_LIBRARIES),
+		$(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/usr/lib/$(lib) \
+			$(1)/usr/lib/$(lib); \
+	)
+	(cd $(1)/usr/lib; \
+		ln -sf libGLESv2.so.2 libGLESv2.so; \
+		ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \

package/nvidia-tegra23/Config.in

Quoted 10 lines
package/nvidia-tegra23/Config.in new file +10 -0
+		ln -sf libEGL.so.1 libEGL.so \
+	)
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
+	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
+		$(INSTALL) -D -m 0644 package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
+			$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \
+	)

Don't we need a $(sep) here in the foreach loop?

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +8 -0
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))
+	$(foreach firmware,$(NVIDIA_TEGRA23_BINARIES_FIRMWARE),
+		$(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/lib/firmware/$(firmware) \
+			$(TARGET_DIR)/lib/firmware/$(firmware); \
+	)

Ditto.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#23 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Thomas, Nicolas, All,

On 2015-02-21 23:46 +0100, Thomas Petazzoni spake thusly:

Quoted 17 lines · Yann E. MORIN

package/nvidia-tegra23/Config.in line 5

Quoted 12 lines
package/nvidia-tegra23/Config.in new file +5 -0
new file mode 100644
index 0000000..950f2f8
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7

Why is X.org required? Those NVidia drivers provide an EGL implementation, so I would expect them to be usable without X.org, for example if you want to do Qt5 over eglfs. Isn't it the case?

I'll let Nicolas reply on that one...

Quoted 45 lines
Quoted 45 lines
package/nvidia-tegra23/Config.in new file +45 -0
+choice
+	prompt "X11 ABI version"
+	default BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	help
+	  Select Tegra X11 ABI version.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	bool "X11 ABI 5"
+	help
+	  Tegra X11 ABI 5.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	bool "X11 ABI 6"
+	help
+	  Tegra X11 ABI 6.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	bool "X11 ABI 7"
+	help
+	  Tegra X11 ABI 7.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	bool "X11 ABI 8"
+	help
+	  Tegra X11 ABI 8.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	bool "X11 ABI 10"
+	help
+	  Tegra X11 ABI 10.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	bool "X11 ABI 11"
+	help
+	  Tegra X11 ABI 11.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	bool "X11 ABI 12"
+	help
+	  Tegra X11 ABI 12.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	bool "X11 ABI 13"
+	help
+	  Tegra X11 ABI 13.
Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 5 lines
package/nvidia-tegra23/Config.in new file +5 -0
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+	bool "X11 ABI 14"
+	help
+	  Tegra X11 ABI 14.

Is this choice really useful? In Buildroot, we only support one version of the X.org server at a time, so only one ABI version.

Ditto.

Quoted 3 lines

And currently, we have X.org server 1.17.1, which implementation the video driver ABI version 19. How can this work with the Tegra drivers if they only support up to ABI version 14 ?

Ditto.

Quoted 3 lines
Quoted 1 line

+NVIDIA_TEGRA23_BINARIES_VERSION = $(NVIDIA_TEGRA23_VERSION)

Spacing issue here.

Sure.

Quoted 10 lines

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +8 -0
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+
+NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software
+NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE
+
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES

Last line not needed, it's the default.

Indeed, my bad.

Quoted 6 lines

package/nvidia-tegra23/Config.in

Quoted 2 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+	xlib_libX11 xlib_libXext xlib_libXv

A comment above this explaining why even though those are not build dependencies of nvidia-tegra23-binaries they should still be listed in the DEPENDENCIES would be useful.

Yup, like the one you added in nvidia-x86.

Quoted 12 lines
Quoted 12 lines
package/nvidia-tegra23/Config.in new file +12 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+	$(foreach lib,$(NVIDIA_TEGRA23_BINARIES_LIBRARIES),
+		$(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/usr/lib/$(lib) \
+			$(1)/usr/lib/$(lib); \
+	)
+	(cd $(1)/usr/lib; \
+		ln -sf libGLESv2.so.2 libGLESv2.so; \
+		ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
+		ln -sf libEGL.so.1 libEGL.so \
+	)
+endef
+
Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 6 lines
package/nvidia-tegra23/Config.in new file +6 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
+	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
+		$(INSTALL) -D -m 0644 package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
+			$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \
+	)

Don't we need a $(sep) here in the foreach loop?

Eh, no, because the command ends up with a semi-colon ';', so the whole 'foreach' generates what POSIX calls a 'list' of commands, like:

    foo; bar; buz;

And it is valid to end a (list of) command(s) with a semi-colon.

But maybe, for consistency with all foreach instances, we should be using a $(sep), indeed.

Quoted 10 lines

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +8 -0
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))
+	$(foreach firmware,$(NVIDIA_TEGRA23_BINARIES_FIRMWARE),
+		$(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/lib/firmware/$(firmware) \
+			$(TARGET_DIR)/lib/firmware/$(firmware); \
+	)

Ditto.

Ditto.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#24 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Yann, Thomas, All,

Quoted 21 lines · On Sat, 21 Feb 2015 23:58:36 +0100 "Yann E. MORIN" <[email protected]>…

Thomas, Nicolas, All,

On 2015-02-21 23:46 +0100, Thomas Petazzoni spake thusly:

Quoted 17 lines · Yann E. MORIN

package/nvidia-tegra23/Config.in line 5

Quoted 12 lines
(quoted diff) +0 -0

b/package/nvidia-tegra23/Config.in new file mode 100644 index 0000000..950f2f8

package/nvidia-tegra23/Config.in new file +5 -0
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7

Why is X.org required? Those NVidia drivers provide an EGL implementation, so I would expect them to be usable without X.org, for example if you want to do Qt5 over eglfs. Isn't it the case?

Quoted 1 line

I'll let Nicolas reply on that one...

The main problem with all theses Nvidia binaries is that if you take any libraries you have a dependency on X11 libraries.

For exemple I only need gstreamer v4l2 capture, hardware format conversion with libgstnvvidconv and hardware encoding but I have to embed all binaries and X11 due to the dependency tree.

Quoted 55 lines
Quoted 46 lines
Quoted 46 lines
package/nvidia-tegra23/Config.in new file +45 -0
+choice
+	prompt "X11 ABI version"
+	default BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	help
+	  Select Tegra X11 ABI version.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	bool "X11 ABI 5"
+	help
+	  Tegra X11 ABI 5.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	bool "X11 ABI 6"
+	help
+	  Tegra X11 ABI 6.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	bool "X11 ABI 7"
+	help
+	  Tegra X11 ABI 7.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	bool "X11 ABI 8"
+	help
+	  Tegra X11 ABI 8.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	bool "X11 ABI 10"
+	help
+	  Tegra X11 ABI 10.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	bool "X11 ABI 11"
+	help
+	  Tegra X11 ABI 11.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	bool "X11 ABI 12"
+	help
+	  Tegra X11 ABI 12.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	bool "X11 ABI 13"
+	help
+	  Tegra X11 ABI 13.
Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 5 lines
package/nvidia-tegra23/Config.in new file +5 -0
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+	bool "X11 ABI 14"
+	help
+	  Tegra X11 ABI 14.

Is this choice really useful? In Buildroot, we only support one version of the X.org server at a time, so only one ABI version.

Quoted 7 lines

Ditto.

Quoted 3 lines

And currently, we have X.org server 1.17.1, which implementation the video driver ABI version 19. How can this work with the Tegra drivers if they only support up to ABI version 14 ?

Ditto.

You right, I have only tested with an old version (1.14.7) of X.org so this driver won't work with the 1.17.1 version. I don't know if Nvidia will provide new driver with support of latest ABI version. Currently I have no more hardware with display to test the graphics part.

Quoted 82 lines
Quoted 5 lines
Quoted 3 lines

+NVIDIA_TEGRA23_BINARIES_VERSION =
$(NVIDIA_TEGRA23_VERSION)

Spacing issue here.

Sure.

Quoted 10 lines

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE =

$(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+ +NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software +NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE +

package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES

Last line not needed, it's the default.

Indeed, my bad.

Quoted 6 lines

package/nvidia-tegra23/Config.in

Quoted 2 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+	xlib_libX11 xlib_libXext xlib_libXv

A comment above this explaining why even though those are not build dependencies of nvidia-tegra23-binaries they should still be listed in the DEPENDENCIES would be useful.

Yup, like the one you added in nvidia-x86.

Quoted 16 lines
Quoted 16 lines
package/nvidia-tegra23/Config.in new file +3 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+	$(foreach lib,$(NVIDIA_TEGRA23_BINARIES_LIBRARIES),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/usr/lib/$(lib) \

package/nvidia-tegra23/Config.in new file +11 -0
+			$(1)/usr/lib/$(lib); \
+	)
+	(cd $(1)/usr/lib; \
+		ln -sf libGLESv2.so.2 libGLESv2.so; \
+		ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
+		ln -sf libEGL.so.1 libEGL.so \
+	)
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+	$(call

NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))

Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 6 lines
package/nvidia-tegra23/Config.in new file +2 -0
+	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
+		$(INSTALL) -D -m 0644

package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
+
$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \

package/nvidia-tegra23/Config.in new file +1 -0
+	)

Don't we need a $(sep) here in the foreach loop?

Eh, no, because the command ends up with a semi-colon ';', so the whole 'foreach' generates what POSIX calls a 'list' of commands, like:

    foo; bar; buz;

And it is valid to end a (list of) command(s) with a semi-colon.

But maybe, for consistency with all foreach instances, we should be using a $(sep), indeed.

Quoted 4 lines
Quoted 4 lines
package/nvidia-tegra23/Config.in new file +4 -0
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+	$(call
Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 6 lines

NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))

package/nvidia-tegra23/Config.in new file +2 -0
+	$(foreach firmware,$(NVIDIA_TEGRA23_BINARIES_FIRMWARE),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/lib/firmware/$(firmware) \

package/nvidia-tegra23/Config.in new file +2 -0
+			$(TARGET_DIR)/lib/firmware/$(firmware); \
+	)

Ditto.

Ditto.

Regards,
Yann E. MORIN.

Signature · 7 lines
Nicolas Serafini
R&D Embedded Software Engineer

www.sensefly.com
Route de Gen?ve 38
1033 Cheseaux-Lausanne
Switzerland
#25 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

All,

Quoted 96 lines · Nicolas Serafini

Yann, Thomas, All,

Quoted 21 lines · On Sat, 21 Feb 2015 23:58:36 +0100 "Yann E. MORIN" <[email protected]>…

Thomas, Nicolas, All,

On 2015-02-21 23:46 +0100, Thomas Petazzoni spake thusly:

Quoted 17 lines · Yann E. MORIN

package/nvidia-tegra23/Config.in line 5

Quoted 12 lines
(quoted diff) +0 -0

b/package/nvidia-tegra23/Config.in new file mode 100644 index 0000000..950f2f8

package/nvidia-tegra23/Config.in new file +5 -0
@@ -0,0 +1,36 @@
+menuconfig BR2_PACKAGE_NVIDIA_TEGRA23
+	bool "nvidia-tegra23"
+	depends on BR2_cortex_a9
+	depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_XORG7

Why is X.org required? Those NVidia drivers provide an EGL implementation, so I would expect them to be usable without X.org, for example if you want to do Qt5 over eglfs. Isn't it the case?

Quoted 1 line

I'll let Nicolas reply on that one...

The main problem with all theses Nvidia binaries is that if you take any libraries you have a dependency on X11 libraries.

For exemple I only need gstreamer v4l2 capture, hardware format conversion with libgstnvvidconv and hardware encoding but I have to embed all binaries and X11 due to the dependency tree.

Quoted 61 lines
Quoted 46 lines
Quoted 46 lines
package/nvidia-tegra23/Config.in new file +45 -0
+choice
+	prompt "X11 ABI version"
+	default BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	help
+	  Select Tegra X11 ABI version.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V5
+	bool "X11 ABI 5"
+	help
+	  Tegra X11 ABI 5.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V6
+	bool "X11 ABI 6"
+	help
+	  Tegra X11 ABI 6.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V7
+	bool "X11 ABI 7"
+	help
+	  Tegra X11 ABI 7.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V8
+	bool "X11 ABI 8"
+	help
+	  Tegra X11 ABI 8.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V10
+	bool "X11 ABI 10"
+	help
+	  Tegra X11 ABI 10.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V11
+	bool "X11 ABI 11"
+	help
+	  Tegra X11 ABI 11.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V12
+	bool "X11 ABI 12"
+	help
+	  Tegra X11 ABI 12.
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
+	bool "X11 ABI 13"
+	help
+	  Tegra X11 ABI 13.
Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 5 lines
package/nvidia-tegra23/Config.in new file +5 -0
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
+	bool "X11 ABI 14"
+	help
+	  Tegra X11 ABI 14.

Is this choice really useful? In Buildroot, we only support one version of the X.org server at a time, so only one ABI version.

Ditto.

Quoted 3 lines

And currently, we have X.org server 1.17.1, which implementation the video driver ABI version 19. How can this work with the Tegra drivers if they only support up to ABI version 14 ?

Quoted 8 lines
Quoted 1 line

Ditto.

You right, I have only tested with an old version (1.14.7) of X.org so this driver won't work with the 1.17.1 version. I don't know if Nvidia will provide new driver with support of latest ABI version. Currently I have no more hardware with display to test the graphics part.

I confirm that video playback works on Tegra 3 using X.org v1.14.7. As far as I know, Nvidia won't release any new version of those drivers for Tegra 2 and Tegra 3 so we'll have to keep using an old version of X.org.

Quoted 77 lines
Quoted 77 lines
Quoted 5 lines
Quoted 3 lines

+NVIDIA_TEGRA23_BINARIES_VERSION =
$(NVIDIA_TEGRA23_VERSION)

Spacing issue here.

Sure.

Quoted 10 lines

package/nvidia-tegra23/Config.in

Quoted 8 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_BINARIES_SOURCE =

$(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
+ +NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software +NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE +

package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES

Last line not needed, it's the default.

Indeed, my bad.

Quoted 6 lines

package/nvidia-tegra23/Config.in

Quoted 2 lines
package/nvidia-tegra23/Config.in new file +2 -0
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
+	xlib_libX11 xlib_libXext xlib_libXv

A comment above this explaining why even though those are not build dependencies of nvidia-tegra23-binaries they should still be listed in the DEPENDENCIES would be useful.

Yup, like the one you added in nvidia-x86.

Quoted 16 lines
Quoted 16 lines
package/nvidia-tegra23/Config.in new file +3 -0
+define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
+	$(foreach lib,$(NVIDIA_TEGRA23_BINARIES_LIBRARIES),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/usr/lib/$(lib) \

package/nvidia-tegra23/Config.in new file +11 -0
+			$(1)/usr/lib/$(lib); \
+	)
+	(cd $(1)/usr/lib; \
+		ln -sf libGLESv2.so.2 libGLESv2.so; \
+		ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
+		ln -sf libEGL.so.1 libEGL.so \
+	)
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
+	$(call

NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))

Quoted 8 lines

package/nvidia-tegra23/Config.in

Quoted 6 lines
package/nvidia-tegra23/Config.in new file +2 -0
+	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
+		$(INSTALL) -D -m 0644

package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
+
$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \

package/nvidia-tegra23/Config.in new file +1 -0
+	)

Don't we need a $(sep) here in the foreach loop?

Eh, no, because the command ends up with a semi-colon ';', so the whole 'foreach' generates what POSIX calls a 'list' of commands, like:

     foo; bar; buz;

And it is valid to end a (list of) command(s) with a semi-colon.

But maybe, for consistency with all foreach instances, we should be using a $(sep), indeed.

Quoted 12 lines

package/nvidia-tegra23/Config.in

Quoted 10 lines
package/nvidia-tegra23/Config.in new file +4 -0
+endef
+
+define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
+	$(call

NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))

package/nvidia-tegra23/Config.in new file +2 -0
+	$(foreach firmware,$(NVIDIA_TEGRA23_BINARIES_FIRMWARE),
+		$(INSTALL) -D -m 0644

$(@D)/nv_tegra/nvidia_drivers/lib/firmware/$(firmware) \

package/nvidia-tegra23/Config.in new file +2 -0
+			$(TARGET_DIR)/lib/firmware/$(firmware); \
+	)

Ditto.

Quoted 8 lines
Quoted 5 lines

Ditto.

Regards,
Yann E. MORIN.

Regards,
Laurent Colloud

#26 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Nicolas, Laurent, All,

On 2015-03-04 23:39 +0100, Laurent Colloud spake thusly:

Quoted 1 line · Nicolas Serafini

[--SNIP--]

Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines

And currently, we have X.org server 1.17.1, which implementation the video driver ABI version 19. How can this work with the Tegra drivers if they only support up to ABI version 14 ?

You right, I have only tested with an old version (1.14.7) of X.org so this driver won't work with the 1.17.1 version. I don't know if Nvidia will provide new driver with support of latest ABI version. Currently I have no more hardware with display to test the graphics part.

Quoted 3 lines

I confirm that video playback works on Tegra 3 using X.org v1.14.7. As far as I know, Nvidia won't release any new version of those drivers for Tegra 2 and Tegra 3 so we'll have to keep using an old version of X.org.

OK, we have the current situation:

- Buildroot uses Xorg 1.17.1, which implements ABI 19;

- nvidia-tegra23 only has support for ABI up to 14;

- NVidia won't update those drivers.

Question: is Xorg ABI backward compatible? I.e. are drivers written for a specific ABI able to work on a newer ABI?

If yes, then we can package those nvidia-t4egra23 drivers. If no, then there's no point in packaging them... :-/

Also, as far as I understand, the two users of those drivers, Nicolas and Laurent, either no longer have the hardware (and thus do not use the drivers anymore), or are using an old version of Xorg (and presumably, not using Buildroot).

So, in the end, I wonder if it makes sense to package nvidia-tegra23 in Buildroot...

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#27 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Dear Yann E. MORIN,

Adding Bernd in the Cc loop, he might have some insights.

Quoted 7 lines · Yann E. MORIN

OK, we have the current situation:

- Buildroot uses Xorg 1.17.1, which implements ABI 19;

- nvidia-tegra23 only has support for ABI up to 14;

- NVidia won't update those drivers.

Correct, that's my understanding.

Quoted 2 lines

Question: is Xorg ABI backward compatible? I.e. are drivers written for a specific ABI able to work on a newer ABI?

My understanding is that no, there is no backward compatibility. Maybe I'm wrong, but I remember a few years ago having to downgrade the X.org server version + a bunch of other X.org libraries, in order to have a sufficiently old X.org server to match the ABI used by proprietary ATI drivers.

Now the question is: is it possible to offer a version selection for the X.org server ? Will an old X.org server build/work fine with recent versions of the X.org libraries around it, so that we only have to change the version of the X.org server, or will we enter an horrible mess of "if the X.org server is at version <foo>, then we must use version <bar> of this library, and version <foobar> of this other library" ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#28 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

[posted and mailed]

Thomas Petazzoni <[email protected]> wrote in news:20150307090354.60c844a3 at free-electrons.com:

Quoted 3 lines

Will an old X.org server build/work fine with recent versions of the X.org libraries around it, so that we only have to change the version of the X.org server

Hi Thomas,

I just compiled

-XSERVER_XORG_SERVER_VERSION = 1.17.1
+XSERVER_XORG_SERVER_VERSION = 1.14.7

(also removed package/x11r7/xserver_xorg-server/0004-backtrace.c-Fix-word- cast-to-a-pointer.patch)

successfully using buildroot git master using this defconfig:

BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_I915=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y

Regards, Bernd

#29 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

In reply to Thomas Petazzoni

Thomas, All,

On 2015-03-07 09:03 +0100, Thomas Petazzoni spake thusly:

Quoted 1 line · Yann E. MORIN

[--SNIP--]

Quoted 7 lines

Now the question is: is it possible to offer a version selection for the X.org server ? Will an old X.org server build/work fine with recent versions of the X.org libraries around it, so that we only have to change the version of the X.org server, or will we enter an horrible mess of "if the X.org server is at version <foo>, then we must use version <bar> of this library, and version <foobar> of this other library" ?

Given the feedback from Bernd, I'll see at adding such a version choice.

Let's say we go this route:

- add a version choice for 1.14.7 (for tegra-binaries) and 1.17.1 (the

    current version), defaulting to 17.1;

- add hidden symbols for the driver ABI supported by each version;

- make nvidia-tegra23 depend on the appropriate ABI symbol.

OK?

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#30 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN

Given the feedback from Bernd, I'll see at adding such a version choice.

Let's say we go this route:

Quoted 8 lines

- add a version choice for 1.14.7 (for tegra-binaries) and 1.17.1 (the

    current version), defaulting to 17.1;

- add hidden symbols for the driver ABI supported by each version;

- make nvidia-tegra23 depend on the appropriate ABI symbol.

OK?

Seems OK to me. Though it would be good if someone can actually test the patches. I don't know when I'll have the time to test on the Tegra 3 platform.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#31 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Thomas, All,

On 2015-03-07 14:19 +0100, Thomas Petazzoni spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 6 lines

Given the feedback from Bernd, I'll see at adding such a version choice. Let's say we go this route:
- add a version choice for 1.14.7 (for tegra-binaries) and 1.17.1 (the

    current version), defaulting to 17.1;

- add hidden symbols for the driver ABI supported by each version;
- make nvidia-tegra23 depend on the appropriate ABI symbol.

Seems OK to me. Though it would be good if someone can actually test the patches. I don't know when I'll have the time to test on the Tegra 3 platform.

Well, we can at least go up to the point where it builds. From there, you can pick it up when you are available for run-time testing.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#32 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Yann, Thomas, All,

Quoted 10 lines · Yann E. MORIN

Thomas, All,

On 2015-03-07 14:19 +0100, Thomas Petazzoni spake thusly:

Quoted 7 lines · Yann E. MORIN
Quoted 6 lines

Given the feedback from Bernd, I'll see at adding such a version choice. Let's say we go this route:
- add a version choice for 1.14.7 (for tegra-binaries) and 1.17.1 (the

     current version), defaulting to 17.1;

- add hidden symbols for the driver ABI supported by each version;
- make nvidia-tegra23 depend on the appropriate ABI symbol.

Quoted 5 lines
Quoted 3 lines

Seems OK to me. Though it would be good if someone can actually test the patches. I don't know when I'll have the time to test on the Tegra 3 platform.

Well, we can at least go up to the point where it builds. From there, you can pick it up when you are available for run-time testing.

Sounds good to me too.
I confirm that I am using Buildroot (v2014.08) and that I just hand-picked the version of X.org just like Bernd did and that all X libraries built correctly. Hopefully this is a viable solution without entering the X.org server <-> X libraries dependency nightmare that Thomas mentioned previously.
I hope to find some time to test the patch once it's rolled out.

Best,

Laurent

#33 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Laurent, All,

On 2015-03-09 20:25 +0100, Laurent Colloud spake thusly:

Quoted 16 lines · Yann E. MORIN
Quoted 10 lines

Thomas, All,

On 2015-03-07 14:19 +0100, Thomas Petazzoni spake thusly:

Quoted 7 lines · Yann E. MORIN
Quoted 6 lines

Given the feedback from Bernd, I'll see at adding such a version choice. Let's say we go this route:
- add a version choice for 1.14.7 (for tegra-binaries) and 1.17.1 (the

    current version), defaulting to 17.1;

- add hidden symbols for the driver ABI supported by each version;
- make nvidia-tegra23 depend on the appropriate ABI symbol.

Quoted 5 lines
Quoted 3 lines

Seems OK to me. Though it would be good if someone can actually test the patches. I don't know when I'll have the time to test on the Tegra 3 platform.

Well, we can at least go up to the point where it builds. From there, you can pick it up when you are available for run-time testing.

Quoted 7 lines

Sounds good to me too.
I confirm that I am using Buildroot (v2014.08) and that I just hand-picked the version of X.org just like Bernd did and that all X libraries built correctly. Hopefully this is a viable solution without entering the X.org server <-> X libraries dependency nightmare that Thomas mentioned previously.
I hope to find some time to test the patch once it's rolled out.

I have a series locally that implements just that idea. It's only patches for now, I have to test them.

Hopefully, I can do that by the end of the week. At worse, I have next week off, so I will be able to work on it.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#34 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

Yann, Thomas, Laurent, All,

Quoted 29 lines · On Mon, 9 Mar 2015 22:27:24 +0100 "Yann E. MORIN" <[email protected]>…

Laurent, All,

On 2015-03-09 20:25 +0100, Laurent Colloud spake thusly:

Quoted 25 lines · Yann E. MORIN
Quoted 11 lines

Thomas, All,

On 2015-03-07 14:19 +0100, Thomas Petazzoni spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 7 lines

Given the feedback from Bernd, I'll see at adding such a version choice. Let's say we go this route:
- add a version choice for 1.14.7 (for tegra-binaries) and
1.17.1 (the current version), defaulting to 17.1;
- add hidden symbols for the driver ABI supported by each
version;
- make nvidia-tegra23 depend on the appropriate ABI symbol.

Quoted 6 lines
Quoted 3 lines

Seems OK to me. Though it would be good if someone can actually test the patches. I don't know when I'll have the time to test on the Tegra 3 platform.

Well, we can at least go up to the point where it builds. From there, you can pick it up when you are available for run-time testing.

Sounds good to me too.
I confirm that I am using Buildroot (v2014.08) and that I just hand-picked the version of X.org just like Bernd did and that all X libraries built correctly. Hopefully this is a viable solution without entering the X.org server <-> X libraries dependency nightmare that Thomas mentioned previously.
I hope to find some time to test the patch once it's rolled out.

Great news, that's good to me too.

Quoted 9 lines

I have a series locally that implements just that idea. It's only patches for now, I have to test them.

Hopefully, I can do that by the end of the week. At worse, I have next week off, so I will be able to work on it.

Regards,
Yann E. MORIN.

Yann, I have just found an evaluation board that has display support to do complete tests and not only gstreamer video encoding/decoding.

Regards,
Nicolas

Signature · 7 lines
Nicolas Serafini
R&D Embedded Software Engineer

www.sensefly.com
Route de Gen?ve 38
1033 Cheseaux-Lausanne
Switzerland
#35 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 4 lines · Yann E. MORIN

Also, as far as I understand, the two users of those drivers, Nicolas and Laurent, either no longer have the hardware (and thus do not use the drivers anymore), or are using an old version of Xorg (and presumably, not using Buildroot).

BTW, I do happen to have a Tegra 3 platform available. I've never played with it so far, but I could use it to do some testing if needed.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#36 lore raw

PATCH v7 8/10 package/nvidia-tegra23-binaries: new package

In reply to Nicolas Serafini

Dear Nicolas Serafini,

Quoted 5 lines · Nicolas Serafini

You right, I have only tested with an old version (1.14.7) of X.org so this driver won't work with the 1.17.1 version. I don't know if Nvidia will provide new driver with support of latest ABI version. Currently I have no more hardware with display to test the graphics part.

How were you building an old version of X.org ? By patching many Buildroot packages ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#37 lore raw

PATCH v7 9/10 package.nvidia-tegra23-binaries: add gstreamer plugins

In reply to Yann E. MORIN

From: Nicolas Serafini <[email protected]>

[yann.morin.1998 at free.fr: split out into their own patch]
---
 .../nvidia-tegra23-binaries/Config.in              | 15 +++++++++++
 .../nvidia-tegra23-binaries.mk                     | 30 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)
package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in +15 -0
index 1d213d0..007233b 100644
@@ -89,4 +89,19 @@ config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI
 	default 13 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V13
 	default 14 if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI_V14
 
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS
+	bool "GStreamer 0.10.x plugins"
+	depends on BR2_PACKAGE_GSTREAMER # Run-time only
+	help
+	  GStreamer 0.10.x plugins
+
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS
+	bool "NVIDIA multimedia sample apps"
+	depends on BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS
+	help
+	  nvgstplayer and nvgstcapture multimedia test applications.
+
+comment "GStreamer 0.10.x plugins need GStreamer 0.10"
+	depends on !BR2_PACKAGE_GSTREAMER
+
 endif
package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk +30 -0
index 792cc7c..478639f 100644
@@ -10,6 +10,10 @@ NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARI
 
 NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software
 NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y)
+NVIDIA_TEGRA23_BINARIES_LICENSE += LGPLv2.1
+NVIDIA_TEGRA23_BINARIES_LICENSE_FILES += nv_tegra/nv_sample_apps/LICENSE.gst-openmax
+endif
 
 NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
 NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES
@@ -49,6 +53,11 @@ NVIDIA_TEGRA23_BINARIES_LIBRARIES = \
 NVIDIA_TEGRA23_BINARIES_DRV = \
 	nv_tegra/nvidia_drivers/usr/lib/xorg/modules/drivers/tegra_drv.abi$(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_X11ABI).so
 
+NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS = \
+	libgstnv4l2.so libgstnvvidconv.so libgstnvxvimagesink.so libgstomx.so
+
+NVIDIA_TEGRA23_BINARIES_MULTIMEDIA_APPS = nvgstplayer nvgstcapture
+
 NVIDIA_TEGRA23_BINARIES_PKGCONFIG = egl.pc gles.pc glesv2.pc
 
 define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
@@ -75,12 +84,31 @@ define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
 	)
 endef
 
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y)
+define NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS
+	$(foreach gst_plug,$(NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),
+		$(INSTALL) -D -m 0644 $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/lib/gstreamer-0.10/$(gst_plug) \
+			$(1)/usr/lib/gstreamer-0.10/$(gst_plug); \
+	)
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS),y)
+define NVIDIA_TEGRA23_BINARIES_INSTALL_APPS
+	$(foreach apps,$(NVIDIA_TEGRA23_BINARIES_MULTIMEDIA_APPS),
+		$(INSTALL) -D -m 0755 $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/bin/$(apps) \
+			$(TARGET_DIR)/usr/bin/$(apps); \
+	)
+endef
+endif
+
 define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
 	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
 	$(foreach pkgconfig,$(NVIDIA_TEGRA23_BINARIES_PKGCONFIG),
 		$(INSTALL) -D -m 0644 package/nvidia-tegra23/nvidia-tegra23-binaries/$(pkgconfig) \
 			$(STAGING_DIR)/usr/lib/pkgconfig/$(pkgconfig); \
 	)
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(STAGING_DIR))
 endef
 
 define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
@@ -93,6 +121,8 @@ define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
 		$(TARGET_DIR)/etc/nv_tegra_release
 	$(INSTALL) -D -m 0644 $(@D)/$(NVIDIA_TEGRA23_BINARIES_DRV) \
 		$(TARGET_DIR)/usr/lib/xorg/modules/drivers/tegra_drv.so
+	$(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(TARGET_DIR))
+	$(NVIDIA_TEGRA23_BINARIES_INSTALL_APPS)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.9.1
#38 lore raw

PATCH v7 10/10 package/nvidia-tegra23-codecs: new package

In reply to Yann E. MORIN

From: Nicolas Serafini <[email protected]>

nvidia-tegra23-codecs provides various HW-accelerated media codecs, such
as: AAC3, h264, jpeg, MP3...

[me:
- split codecs from binaries into this patch
- use our extractor helpers
]

---
 package/nvidia-tegra23/Config.in                   |  1 +
 .../nvidia-tegra23/nvidia-tegra23-codecs/Config.in |  7 ++++
 .../nvidia-tegra23-codecs.hash                     |  3 ++
 .../nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk | 41 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash
 create mode 100644 package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk
package/nvidia-tegra23/Config.in +1 -0
index 950f2f8..89bdf83 100644
@@ -28,6 +28,7 @@ config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3
 endchoice
 
 source "package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in"
+source "package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in"
 endif
 
 comment "nvidia-tegra23 needs Xorg and a (e)glibc toolchain w/ EABIhf"
package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in new file +7 -0
new file mode 100644
index 0000000..07a8e74
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_NVIDIA_TEGRA23_CODECS
+	bool "nvidia-tegra23 codecs"
+	depends on BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+	help
+	  NVIDIA Tegra restricted codecs from Linux For Tegra 16.4.0
+
+	  https://developer.nvidia.com/linux-tegra-rel-16
package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash new file +3 -0
new file mode 100644
index 0000000..de4a461
@@ -0,0 +1,3 @@
+# From https://developer.nvidia.com/linux-tegra-rel-16
+sha1 d0889bf0ca408583a1e88657c6fd18f3659ef1bb Tegra20_Linux-codecs_R16.4.0_armhf.tbz2
+sha1 a9f298222d3b6a618ef96a6bed9641929b152c8a Tegra30_Linux-codecs_R16.4.0_armhf.tbz2
package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.9.1
#39 lore raw

v7 cover NVidia GPU binary blobs for x86 and ARM (branch yem/gfx2)

In reply to Yann E. MORIN

Hello All!

On 2015-02-10 21:01 +0100, Yann E. MORIN spake thusly:

Quoted 2 lines

This series adds support for NVidia's binary blob, the driver to its family of GPUs, for x86 (by Yann) and Tegra2 and Tegra3 (by Nicolas).

[--SNIP--]

Quoted 2 lines

Yann E. MORIN (5):
package/python-lxml: new host package

[--SNIP--]

Quoted 2 lines

Yegor Yefremov (1):
package/python-lxml: add target variant

One thing I forgot to say in the cover letter: python-lxml is no longer required in this series, because we no longer install the Khronos Registries.

However, since they were part of previous iterations of this series, and some users seem to be wanting them, I kept them in the series.

What this means is: python-lxml (host and target variants) can be applies without applying the NVidia packages patches, and conversely, the NVidia patches can be applied without applying the python-lxml patches (of course, barring any comment on either).

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#40 lore raw

v7 cover NVidia GPU binary blobs for x86 and ARM (branch yem/gfx2)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 2 lines · Yann E. MORIN

package/python-lxml: new host package
package/python-lxml: add target variant

Since the host variant of python-lxml is no longer needed, I've squashed those two patches together, kept only the target variant code, and applied the result to the next branch.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com