* [Buildroot] [PATCH 01/14 v6] package/python-lxml: new host package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 02/14 v6] package/python-lxml: add target variant Yann E. MORIN
` (12 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
The lxml XML toolkit is a Pythonic binding for the C libraries libxml2
and libxslt.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
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
diff --git a/package/python-lxml/python-lxml.hash b/package/python-lxml/python-lxml.hash
new file mode 100644
index 0000000..470a245
--- /dev/null
+++ b/package/python-lxml/python-lxml.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf lxml-3.4.1.tgz
diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk
new file mode 100644
index 0000000..758ce87
--- /dev/null
+++ b/package/python-lxml/python-lxml.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 02/14 v6] package/python-lxml: add target variant
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 01/14 v6] package/python-lxml: new host package Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 03/14 v6] package/khronos-registry-khrplatform: new package Yann E. MORIN
` (11 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
[yann.morin.1998 at free.fr: fix staging path; trim dependencies of
the host variant]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index 5f6ebc2..6b2b2a3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -519,6 +519,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"
diff --git a/package/python-lxml/Config.in b/package/python-lxml/Config.in
new file mode 100644
index 0000000..1ccaa5e
--- /dev/null
+++ b/package/python-lxml/Config.in
@@ -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/
diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk
index 758ce87..7a94b09 100644
--- a/package/python-lxml/python-lxml.mk
+++ b/package/python-lxml/python-lxml.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 03/14 v6] package/khronos-registry-khrplatform: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 01/14 v6] package/python-lxml: new host package Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 02/14 v6] package/python-lxml: add target variant Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 04/14 v6] package/khronos-registry-openkode: " Yann E. MORIN
` (10 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
Khronos is the group behind OpenGL and its siblings, OpenMAX and all
other GFX-related Open-something.
Khronos maintains the Registry, in which the reference headers for the
different Open-something are maintained.
khrplatform is the header used by most (if not all) other Khronos headers.
Note: there is no version for that file, so we rely on the hash to
decide whether we have to re-download it or not. That's unfortunate,
however, as an old build will not be reproducible in the future... :-(
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/opengl/Config.in | 3 +++
.../opengl/khronos-registry-khrplatform/Config.in | 11 +++++++++
.../khronos-registry-khrplatform.hash | 2 ++
.../khronos-registry-khrplatform.mk | 28 ++++++++++++++++++++++
4 files changed, 44 insertions(+)
create mode 100644 package/opengl/khronos-registry-khrplatform/Config.in
create mode 100644 package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.hash
create mode 100644 package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.mk
diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index 20ee28b..0afb158 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -3,3 +3,6 @@ source "package/opengl/libegl/Config.in"
source "package/opengl/libgles/Config.in"
source "package/opengl/libopenvg/Config.in"
source "package/opengl/libopenmax/Config.in"
+
+# Khronos headers, from the Khronos Registries
+source "package/opengl/khronos-registry-khrplatform/Config.in"
diff --git a/package/opengl/khronos-registry-khrplatform/Config.in b/package/opengl/khronos-registry-khrplatform/Config.in
new file mode 100644
index 0000000..c653a69
--- /dev/null
+++ b/package/opengl/khronos-registry-khrplatform/Config.in
@@ -0,0 +1,11 @@
+# Promptless package, because we do not want the user be responsible
+# for enabling this package. Instead, it should be selected by those
+# packages that need the KHR header(s).
+
+config BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
+ bool
+ help
+ khrplatform installs the khrplatform.h headers, used by most
+ other Khronos headers.
+
+ https://www.khronos.org/registry/
diff --git a/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.hash b/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.hash
new file mode 100644
index 0000000..9abb73c
--- /dev/null
+++ b/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 7631de0f2ce64747bfd893486eaa41aa08b9e8c5e5c6501b81c045c6ebf04b2a khrplatform.h
diff --git a/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.mk b/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.mk
new file mode 100644
index 0000000..a8ea4cc
--- /dev/null
+++ b/package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# khronos-registry-khrplatform
+#
+################################################################################
+
+# There is no version for that file :-(
+
+KHRONOS_REGISTRY_KHRPLATFORM_SOURCE = khrplatform.h
+KHRONOS_REGISTRY_KHRPLATFORM_SITE = https://www.khronos.org/registry/egl/api/KHR
+
+# No license file, license in the header file itself
+KHRONOS_REGISTRY_KHRPLATFORM_LICENSE = MIT
+
+# Only installs a header
+KHRONOS_REGISTRY_KHRPLATFORM_INSTALL_STAGING = YES
+KHRONOS_REGISTRY_KHRPLATFORM_INSTALL_TARGET = NO
+
+define KHRONOS_REGISTRY_KHRPLATFORM_EXTRACT_CMDS
+ $(INSTALL) -d $(@D)
+ $(INSTALL) -D -m 0644 $(DL_DIR)/khrplatform.h $(@D)/khrplatform.h
+endef
+
+define KHRONOS_REGISTRY_KHRPLATFORM_INSTALL_STAGING_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/khrplatform.h $(STAGING_DIR)/usr/include/KHR/khrplatform.h
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 04/14 v6] package/khronos-registry-openkode: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (2 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 03/14 v6] package/khronos-registry-khrplatform: new package Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: " Yann E. MORIN
` (9 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
The OpenKODE Registry provides all OpenKODE headers, directly from the
Khronos group.
Those headers are needed when an OpenKODE implementation does not
provide them, like the NVidia binary blobs.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Nicolas Serafini <nicolas.serafini@sensefly.com>
---
package/opengl/Config.in | 1 +
package/opengl/khronos-registry-openkode/Config.in | 15 +++++++
.../khronos-registry-openkode.hash | 7 ++++
.../khronos-registry-openkode.mk | 49 ++++++++++++++++++++++
4 files changed, 72 insertions(+)
create mode 100644 package/opengl/khronos-registry-openkode/Config.in
create mode 100644 package/opengl/khronos-registry-openkode/khronos-registry-openkode.hash
create mode 100644 package/opengl/khronos-registry-openkode/khronos-registry-openkode.mk
diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index 0afb158..d9a5c37 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -6,3 +6,4 @@ source "package/opengl/libopenmax/Config.in"
# Khronos headers, from the Khronos Registries
source "package/opengl/khronos-registry-khrplatform/Config.in"
+source "package/opengl/khronos-registry-openkode/Config.in"
diff --git a/package/opengl/khronos-registry-openkode/Config.in b/package/opengl/khronos-registry-openkode/Config.in
new file mode 100644
index 0000000..ea3e5e7
--- /dev/null
+++ b/package/opengl/khronos-registry-openkode/Config.in
@@ -0,0 +1,15 @@
+# Note: this package has no prompt, because it is to be selected by
+# packages that need it, and does not make sense on its own.
+# Further more, we want to avoid it being enabled alongside any other
+# package that provide their own OpenKODE headers
+
+config BR2_PACKAGE_KHRONOS_REGISTRY_OPENKODE
+ bool
+ select BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
+ help
+ The OpenKODE Registry contains specifications of the core API and
+ headers, optional OpenKODE extensions and headers, points to other
+ Khronos APIs required by a conformant OpenKODE implementation, and
+ includes some related documentation.
+
+ https://www.khronos.org/registry/kode/
diff --git a/package/opengl/khronos-registry-openkode/khronos-registry-openkode.hash b/package/opengl/khronos-registry-openkode/khronos-registry-openkode.hash
new file mode 100644
index 0000000..2a66ea8
--- /dev/null
+++ b/package/opengl/khronos-registry-openkode/khronos-registry-openkode.hash
@@ -0,0 +1,7 @@
+# Locally computed
+sha256 e55f962ec91f9a58824a8c42d3556ea1d803b589f5d7b1b6d1ab5bae929fd1cd kd.h
+sha256 a51e0cbda20c393585e08a5035fe1bb6b9bed239a80f95e843686d1567a9f513 kdplatform.h
+sha256 331835322e53fc131774b6116318a2445651b3487e41510a786d5a27ce556e91 KHR_float64.h
+sha256 37a7596ec5377bb17fb157750a584b39b8bc7955a96b4fb29ff0c6cdf7a3fd9e KHR_formatted.h
+sha256 cea58f28b749c59790327f61c445b09a202ef71c97b13cbbce1310316121c23e KHR_perfcounter.h
+sha256 aa2bfc742d209e195580a0194352e1b375f9b71688ce7f6b222ab020c397e7f9 KHR_thread_storage.h
diff --git a/package/opengl/khronos-registry-openkode/khronos-registry-openkode.mk b/package/opengl/khronos-registry-openkode/khronos-registry-openkode.mk
new file mode 100644
index 0000000..aaf0ed2
--- /dev/null
+++ b/package/opengl/khronos-registry-openkode/khronos-registry-openkode.mk
@@ -0,0 +1,49 @@
+################################################################################
+#
+# khronos-registry-openkode
+#
+################################################################################
+
+KHRONOS_REGISTRY_OPENKODE_VERSION = 1.0.3
+KHRONOS_REGISTRY_OPENKODE_SITE = https://www.khronos.org/registry/kode/api/$(KHRONOS_REGISTRY_OPENKODE_VERSION)
+
+# There is no archive available. So, we just have a buncha files to download.
+# Just download everything as _EXTRA downloads.
+# The first two headers are the base for OpenKODE; the KHR headers are core
+# extensions which we always want anyway.
+KHRONOS_REGISTRY_OPENKODE_SOURCE =
+KHRONOS_REGISTRY_OPENKODE_EXTRA_DOWNLOADS = kd.h kdplatform.h \
+ ../KHR/KHR_float64.h \
+ ../KHR/KHR_formatted.h \
+ ../KHR/KHR_perfcounter.h \
+ ../KHR/KHR_thread_storage.h
+
+KHRONOS_REGISTRY_OPENKODE_LICENSE = Unknown
+KHRONOS_REGISTRY_OPENKODE_DEPENDENCIES = khronos-registry-khrplatform
+
+# The registry only installs header files
+KHRONOS_REGISTRY_OPENKODE_INSTALL_STAGING = YES
+KHRONOS_REGISTRY_OPENKODE_INSTALL_TARGET = NO
+
+# We could well completely do without an EXTRACT phase, because we will
+# then just copy the files again over to staging. But if we need to patch
+# them, we must have them in the package build dir.
+define KHRONOS_REGISTRY_OPENKODE_EXTRACT_CMDS
+ $(INSTALL) -D -m 0644 $(DL_DIR)/kd.h $(@D)/KD/kd.h
+ $(INSTALL) -D -m 0644 $(DL_DIR)/kdplatform.h $(@D)/KD/kdplatform.h
+ $(INSTALL) -D -m 0644 $(DL_DIR)/KHR_float64.h $(@D)/KHR/KHR_float64.h
+ $(INSTALL) -D -m 0644 $(DL_DIR)/KHR_formatted.h $(@D)/KHR/KHR_formatted.h
+ $(INSTALL) -D -m 0644 $(DL_DIR)/KHR_perfcounter.h $(@D)/KHR/KHR_perfcounter.h
+ $(INSTALL) -D -m 0644 $(DL_DIR)/KHR_thread_storage.h $(@D)/KHR/KHR_thread_storage.h
+endef
+
+define KHRONOS_REGISTRY_OPENKODE_INSTALL_STAGING_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/KD/kd.h $(STAGING_DIR)/usr/include/KD/kd.h
+ $(INSTALL) -D -m 0644 $(@D)/KD/kdplatform.h $(STAGING_DIR)/usr/include/KD/kdplatform.h
+ $(INSTALL) -D -m 0644 $(@D)/KHR/KHR_float64.h $(STAGING_DIR)/usr/include/KHR/KHR_float64.h
+ $(INSTALL) -D -m 0644 $(@D)/KHR/KHR_formatted.h $(STAGING_DIR)/usr/include/KHR/KHR_formatted.h
+ $(INSTALL) -D -m 0644 $(@D)/KHR/KHR_perfcounter.h $(STAGING_DIR)/usr/include/KHR/KHR_perfcounter.h
+ $(INSTALL) -D -m 0644 $(@D)/KHR/KHR_thread_storage.h $(STAGING_DIR)/usr/include/KHR/KHR_thread_storage.h
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (3 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 04/14 v6] package/khronos-registry-openkode: " Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-26 8:54 ` Jérôme Pouiller
2015-01-23 23:24 ` [Buildroot] [PATCH 06/14 v6] package/khronos-registry-opengl: " Yann E. MORIN
` (8 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
Some headers required to build GL/EGL/GLES/... stuff are not provided by
Khronos, so we must find an alternate source for those headers.
Currently, we're missing:
- gl.h for full GL (gl.h for GLES is available from Khronos)
- dri_interface.h to be able to build GL-enabled Xorg
mesa3d provides all of them, and they are generic enough that they can
be re-used even for other GL/EGL/GLES/... implementations.
Unfortunately, modifying mesa3d so that it only installs its headers is
no trivial task, and would render the mesa3d package really ugly and
unmaintainable in the long run.
Instead, we introduce a stripped-down mesa3d-headers package, which sole
purpose is to install those missing headers.
Alongside the dri_interface.h header, we also need to install a
pkg-config file, dri.pc, so that Xorg et al. are content and believe
they have DRI available.
Since we do only really require a very limited subset of files from
mesa3d, we do not really care of the version we use, so there is no
reason to keep them both in sync, and no reason to add a comment in
mesa3d to that effect.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
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 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 +
| 8 +++++
| 2 ++
| 57 ++++++++++++++++++++++++++++++
4 files changed, 68 insertions(+)
create mode 100644 package/mesa3d-headers/Config.in
create mode 100644 package/mesa3d-headers/mesa3d-headers.hash
create mode 100644 package/mesa3d-headers/mesa3d-headers.mk
diff --git a/package/Config.in b/package/Config.in
index 6b2b2a3..b808483 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -215,6 +215,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"
--git a/package/mesa3d-headers/Config.in b/package/mesa3d-headers/Config.in
new file mode 100644
index 0000000..a64fc0c
--- /dev/null
+++ b/package/mesa3d-headers/Config.in
@@ -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
--git a/package/mesa3d-headers/mesa3d-headers.hash b/package/mesa3d-headers/mesa3d-headers.hash
new file mode 100644
index 0000000..df309b5
--- /dev/null
+++ b/package/mesa3d-headers/mesa3d-headers.hash
@@ -0,0 +1,2 @@
+# From http://mesa3d.org/relnotes/10.4.2.html
+sha256 08a119937d9f2aa2f66dd5de97baffc2a6e675f549e40e699a31f5485d15327f MesaLib-10.4.2.tar.bz2
--git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
new file mode 100644
index 0000000..5bfb3c6
--- /dev/null
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -0,0 +1,57 @@
+################################################################################
+#
+# 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...
+MESA3D_HEADERS_VERSION = 10.4.2
+MESA3D_HEADERS_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
+MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
+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
+
+# Not using $(SED) because we do not want to work in-place, and $(SED)
+# contains -i.
+define MESA3D_HEADERS_BUILD_CMDS
+ 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_STAGING_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/include/GL/gl.h \
+ $(STAGING_DIR)/usr/include/GL/gl.h
+ $(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 # !mesa3d
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 06/14 v6] package/khronos-registry-opengl: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (4 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: " Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 07/14 v6] package/khronos-registry-opengl: download and install extra headers Yann E. MORIN
` (7 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
The OpenGL Registry provides all GL headers, save for gl.h itself. We
vampirise the one from mesa3d (at the version we currently package),
which is as good as any other.
Those headers are needed when an OpenGL/EGL/GLES implementation does
not provide its own headers, like the NVidia binary blob (to come in
follow-up patches.)
Note that, even though this is a generic package, and we could
everything in the BUILD_CMDS, we decided to split the tweaking of glx.h
in a post-build script, to really make it clear we are tweaking a
generated file.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
--
Tested by building XBMC against the NVidia proprietary blob.
Note: their svn repository holds many other things, even non-public
stuff, so the svn revision we use is the one at which the api directory
was *changed*, which might be lagging behind the revision the repository
is currently at
---
Changes v5 -> v6:
- depend on mesa3d-headers to provide gl.h, so ditch our bundled copy
Changes v4 -> v5:
- fix env when calling make
Changes v3 -> v4:
- move to a sub-dir of opengl/ because we'll add some more Khronos
registry packages (OpenMAX...)
- bump revision
---
package/opengl/Config.in | 1 +
.../0001-run-from-current-dir.patch | 17 +++++
package/opengl/khronos-registry-opengl/Config.in | 25 +++++++
.../khronos-registry-opengl.mk | 83 ++++++++++++++++++++++
4 files changed, 126 insertions(+)
create mode 100644 package/opengl/khronos-registry-opengl/0001-run-from-current-dir.patch
create mode 100644 package/opengl/khronos-registry-opengl/Config.in
create mode 100644 package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index d9a5c37..0c3f2cb 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -7,3 +7,4 @@ source "package/opengl/libopenmax/Config.in"
# Khronos headers, from the Khronos Registries
source "package/opengl/khronos-registry-khrplatform/Config.in"
source "package/opengl/khronos-registry-openkode/Config.in"
+source "package/opengl/khronos-registry-opengl/Config.in"
diff --git a/package/opengl/khronos-registry-opengl/0001-run-from-current-dir.patch b/package/opengl/khronos-registry-opengl/0001-run-from-current-dir.patch
new file mode 100644
index 0000000..4b042ab
--- /dev/null
+++ b/package/opengl/khronos-registry-opengl/0001-run-from-current-dir.patch
@@ -0,0 +1,17 @@
+Makefile: allow running without the current dir in PATH
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+Index: a/Makefile
+===================================================================
+--- a/Makefile (revision 27863)
++++ a/Makefile (working copy)
+@@ -24,7 +24,7 @@
+
+ PYFILES = genheaders.py reg.py
+ GENOPTS =
+-GENHEADERS = genheaders.py $(GENOPTS)
++GENHEADERS = ./genheaders.py $(GENOPTS)
+
+ # Generate all headers for GL / GLES / WGL / GLX / EGL
+ # Different headers depend on different XML registry files
diff --git a/package/opengl/khronos-registry-opengl/Config.in b/package/opengl/khronos-registry-opengl/Config.in
new file mode 100644
index 0000000..b320e77
--- /dev/null
+++ b/package/opengl/khronos-registry-opengl/Config.in
@@ -0,0 +1,25 @@
+# Note: this package has no prompt, because it is to be selected by
+# packages that need it, and does not make sense on its own.
+# Further more, we want to avoid it being enabled alongside any other
+# package that provide their own OpenGL headers, like mesa3d or
+# rpi-userland...
+
+config BR2_PACKAGE_KHRONOS_REGISTRY_OPENGL
+ bool
+ select BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
+ select BR2_PACKAGE_MESA3D_HEADERS
+ help
+ The OpenGL Registry contains specifications, header files, and
+ related documentation for OpenGL and related APIs including GLU,
+ GLX, and WGL. In addition to the core API specifications, many
+ extensions to these APIs have been defined by vendors, groups of
+ vendors, and the ARB. The Registry also contains specifications
+ and header files for all registered extensions, written as
+ modifications to the appropriate core API specifications.
+
+ This package installs the openGL header files. You do not need them
+ if the OpenGL/EGL/GLES implementation provides its own headers.
+ Currently, the only known implementation requiring OpenGL Resgistry
+ is the NVidia proprietary driver.
+
+ https://www.opengl.org/registry/
diff --git a/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
new file mode 100644
index 0000000..a66def4
--- /dev/null
+++ b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
@@ -0,0 +1,83 @@
+################################################################################
+#
+# khronos-registry-opengl
+#
+################################################################################
+
+# Using last revision at which the 'api' directory was *changed*, which might
+# not be the latest revision the repository is currently at.
+KHRONOS_REGISTRY_OPENGL_VERSION = 29537
+KHRONOS_REGISTRY_OPENGL_SITE = https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api
+KHRONOS_REGISTRY_OPENGL_SITE_METHOD = svn
+
+# No license file, license text in all generated headers
+KHRONOS_REGISTRY_OPENGL_LICENSE = MIT
+
+KHRONOS_REGISTRY_OPENGL_DEPENDENCIES = host-python host-python-lxml \
+ khronos-registry-khrplatform mesa3d-headers
+
+# The registry only installs header files
+KHRONOS_REGISTRY_OPENGL_INSTALL_STAGING = YES
+KHRONOS_REGISTRY_OPENGL_INSTALL_TARGET = NO
+
+# opengl-registry depends on at least one of those virtual packages,
+# so we can be sure we'll have _DIRS set to non-empty.
+KHRONOS_REGISTRY_OPENGL_DIRS = \
+ $(if $(BR2_PACKAGE_HAS_LIBGL),GL) \
+ $(if $(BR2_PACKAGE_HAS_LIBEGL),EGL) \
+ $(if $(BR2_PACKAGE_HAS_LIBGLES),GLES GLES2 GLES3)
+
+# Remove pre-generated files
+define KHRONOS_REGISTRY_OPENGL_RM_H
+ rm -f $(@D)/GL/*.h
+endef
+KHRONOS_REGISTRY_OPENGL_POST_EXTRACT_HOOKS += KHRONOS_REGISTRY_OPENGL_RM_H
+
+define KHRONOS_REGISTRY_OPENGL_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+# We need to tweak the generated glx.h to:
+# - include the X11 headers it needs
+# - include glxext.h like mesa3d's one does
+# - define the glxext prototypes
+define KHRONOS_REGISTRY_OPENGL_FIX_GLX_H
+ awk 'BEGIN { def_proto=1; } \
+ $$0=="#ifdef GLX_GLXEXT_PROTOTYPES" && def_proto==1 { \
+ print "#define GLX_GLXEXT_PROTOTYPES 1 /* Added by Buildroot */"; \
+ def_proto=0; \
+ } \
+ $$0=="#endif /* GLX_VERSION_1_4 */" { \
+ print ""; \
+ print "/* Added by Buildroot */"; \
+ print "#ifndef GLX_GLXEXT_LEGACY"; \
+ print "#include <GL/glxext.h>"; \
+ print "#endif /* GLX_GLXEXT_LEGACY */"; \
+ print "/* End added by Buildroot */"; \
+ print ""; \
+ } \
+ { print; } \
+ $$0=="#define GLX_VERSION_1_0 1" { \
+ print ""; \
+ print "/* Added by Buildroot */"; \
+ print "#include <X11/Xlib.h>"; \
+ print "#include <X11/Xutil.h>"; \
+ print "#include <GL/gl.h>"; \
+ print "/* End added by Buildroot */"; \
+ print ""; \
+ } \
+ ' $(@D)/GL/glx.h >$(@D)/GL/glx.h.tmp
+ mv $(@D)/GL/glx.h.tmp $(@D)/GL/glx.h
+endef
+KHRONOS_REGISTRY_OPENGL_POST_BUILD_HOOKS += KHRONOS_REGISTRY_OPENGL_FIX_GLX_H
+
+define KHRONOS_REGISTRY_OPENGL_INSTALL_STAGING_CMDS
+ for d in $(KHRONOS_REGISTRY_OPENGL_DIRS); do \
+ for h in $(@D)/$${d}/*.h; do \
+ $(INSTALL) -D -m 0644 $${h} $(STAGING_DIR)/usr/include/$${d}/$${h##*/} \
+ || exit 1; \
+ done \
+ done
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 07/14 v6] package/khronos-registry-opengl: download and install extra headers
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (5 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 06/14 v6] package/khronos-registry-opengl: " Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 08/14 v6] package/khronos-registry-openmaxil: new package Yann E. MORIN
` (6 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
Those headers are not part of the OpenGL registry, and are provided by
Khronos in a location different from the OpenGL registry.
We get the registry via svn, and we want to download the extra headers
with wget. But extra-downloads are currently always using the same
ite-methos as the main download, so we have to define our own download
function, like we are doing for the Linux kernel patches.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
.../khronos-registry-opengl.hash | 4 +++
.../khronos-registry-opengl.mk | 32 ++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 package/opengl/khronos-registry-opengl/khronos-registry-opengl.hash
diff --git a/package/opengl/khronos-registry-opengl/khronos-registry-opengl.hash b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.hash
new file mode 100644
index 0000000..8933646
--- /dev/null
+++ b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.hash
@@ -0,0 +1,4 @@
+# Locally computed
+sha256 03552610f3dd821c020264745d7aa37d760ca68ab44d3c7314b0959a0a24ae8e glplatform.h
+sha256 9fa1b645c46dee2ff091628f3804572403ba5e424785595d3d97068c3fdc7522 gl2platform.h
+sha256 3eae5adc8ad2adef24c2a9fc5572a8ea73dc953fd519d3fe7d374cd7f7b9aba8 gl3platform.h
diff --git a/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
index a66def4..aee9ff1 100644
--- a/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
+++ b/package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
@@ -27,6 +27,38 @@ KHRONOS_REGISTRY_OPENGL_DIRS = \
$(if $(BR2_PACKAGE_HAS_LIBEGL),EGL) \
$(if $(BR2_PACKAGE_HAS_LIBGLES),GLES GLES2 GLES3)
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+
+KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS_BASE = http://www.khronos.org/registry/gles/api
+KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS = \
+ GLES/glplatform.h \
+ GLES2/gl2platform.h \
+ GLES3/gl3platform.h
+
+# Extra downloads can only be dowloaded with the same site-method as the main
+# sources, so we can not use them. Instead, we have to download them manually
+# as a post-download hook.
+define KHRONOS_REGISTRY_OPENGL_DOWNLOAD_PATCHES
+ $(foreach h,$(KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS),\
+ $(call DOWNLOAD_WGET,$(KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS_BASE)/$(h),$(notdir $(h)))$(sep))
+endef
+KHRONOS_REGISTRY_OPENGL_POST_DOWNLOAD_HOOKS += KHRONOS_REGISTRY_OPENGL_DOWNLOAD_PATCHES
+
+# Destination directories already exist
+define KHRONOS_REGISTRY_OPENGL_EXTRACT_PATCHES
+ $(foreach h,$(KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS),\
+ cp $(DL_DIR)/$(notdir $(h)) $(@D)/$(h)$(sep))
+endef
+KHRONOS_REGISTRY_OPENGL_POST_EXTRACT_HOOKS += KHRONOS_REGISTRY_OPENGL_EXTRACT_PATCHES
+
+define KHRONOS_REGISTRY_OPENGL_INSTALL_PATCHES
+ $(foreach h,$(KHRONOS_REGISTRY_OPENGL_EXTRA_HEADERS),\
+ $(INSTALL) -m 0644 -D $(@D)/$(h) $(STAGING_DIR)/usr/include/$(h)$(sep))
+endef
+KHRONOS_REGISTRY_OPENGL_POST_INSTALL_STAGING_HOOKS += KHRONOS_REGISTRY_OPENGL_INSTALL_PATCHES
+
+endif # GLES
+
# Remove pre-generated files
define KHRONOS_REGISTRY_OPENGL_RM_H
rm -f $(@D)/GL/*.h
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 08/14 v6] package/khronos-registry-openmaxil: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (6 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 07/14 v6] package/khronos-registry-opengl: download and install extra headers Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob Yann E. MORIN
` (5 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
The OpenMAX Registry provides all OpenMAX headers, directly from the
Khronos group.
Those headers are needed when an OpenMAX implementation does not
provide them, like the NVidia binary blob.
These are the OpenMAX Inegration Layer (IL) headers.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Nicolas Serafini <nicolas.serafini@sensefly.com>
---
package/opengl/Config.in | 1 +
.../opengl/khronos-registry-openmaxil/Config.in | 20 ++++++++++++++
.../khronos-registry-openmax.hash | 3 ++
.../khronos-registry-openmaxil.mk | 32 ++++++++++++++++++++++
4 files changed, 56 insertions(+)
create mode 100644 package/opengl/khronos-registry-openmaxil/Config.in
create mode 100644 package/opengl/khronos-registry-openmaxil/khronos-registry-openmax.hash
create mode 100644 package/opengl/khronos-registry-openmaxil/khronos-registry-openmaxil.mk
diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index 0c3f2cb..efe31a3 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -8,3 +8,4 @@ source "package/opengl/libopenmax/Config.in"
source "package/opengl/khronos-registry-khrplatform/Config.in"
source "package/opengl/khronos-registry-openkode/Config.in"
source "package/opengl/khronos-registry-opengl/Config.in"
+source "package/opengl/khronos-registry-openmaxil/Config.in"
diff --git a/package/opengl/khronos-registry-openmaxil/Config.in b/package/opengl/khronos-registry-openmaxil/Config.in
new file mode 100644
index 0000000..35dddf9
--- /dev/null
+++ b/package/opengl/khronos-registry-openmaxil/Config.in
@@ -0,0 +1,20 @@
+# Note: this package has no prompt, because it is to be selected by
+# packages that need it, and does not make sense on its own.
+# Further more, we want to avoid it being enabled alongside any other
+# package that provide their own OpenMAX headers, like rpi-userland...
+
+config BR2_PACKAGE_KHRONOS_REGISTRY_OPENMAXIL
+ bool
+ select BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
+ help
+ The OpenMAX IL registry contains specifications of the core API;
+ specifications of Khronos- and vendor-approved OpenMAX IL extensions;
+ header files corresponding to the specifications; and other related
+ documentation.
+
+ This package installs the OpenMAX header files. You do not need them
+ if the OpenMAX implementation provides its own headers.
+ Currently, the only known implementation requiring OpenGL Resgistry
+ is the NVidia proprietary driver.
+
+ https://www.khronos.org/registry/omxil/
diff --git a/package/opengl/khronos-registry-openmaxil/khronos-registry-openmax.hash b/package/opengl/khronos-registry-openmaxil/khronos-registry-openmax.hash
new file mode 100644
index 0000000..e2f5014
--- /dev/null
+++ b/package/opengl/khronos-registry-openmaxil/khronos-registry-openmax.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha1 35b2c565a050b4235feac3f22bbbf4bf80092a00 OpenMAX_IL_1_1_2_Header.zip
+sha256 9e8aee85f37946202ff15a52836233f983e90a751c0816ba341ba0c1ffedf99e OpenMAX_IL_1_1_2_Header.zip
diff --git a/package/opengl/khronos-registry-openmaxil/khronos-registry-openmaxil.mk b/package/opengl/khronos-registry-openmaxil/khronos-registry-openmaxil.mk
new file mode 100644
index 0000000..10b6896
--- /dev/null
+++ b/package/opengl/khronos-registry-openmaxil/khronos-registry-openmaxil.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# khronos-registry-openmaxil
+#
+################################################################################
+
+# The latest 'stable' version is 1.1.2; the 1.2.0 version is only
+# considered "provisional", so we keep using 1.1.2 for now.
+KHRONOS_REGISTRY_OPENMAXIL_VERSION = 1.1.2
+KHRONOS_REGISTRY_OPENMAXIL_SOURCE = OpenMAX_IL_$(subst .,_,$(KHRONOS_REGISTRY_OPENMAXIL_VERSION))_Header.zip
+KHRONOS_REGISTRY_OPENMAXIL_SITE = https://www.khronos.org/registry/omxil/api/$(KHRONOS_REGISTRY_OPENMAXIL_VERSION)
+
+# No license file, license text in each header file
+KHRONOS_REGISTRY_OPENMAXIL_LICENSE = MIT
+
+# The registry only installs header files
+KHRONOS_REGISTRY_OPENMAXIL_INSTALL_STAGING = YES
+KHRONOS_REGISTRY_OPENMAXIL_INSTALL_TARGET = NO
+
+define KHRONOS_REGISTRY_OPENMAXIL_EXTRACT_CMDS
+ $(UNZIP) $(DL_DIR)/$(KHRONOS_REGISTRY_OPENMAXIL_SOURCE) -d $(@D)
+endef
+
+# OpenMAX headers go directly into /usr/include, no sub-dir
+# At least, that's what bellagio does...
+define KHRONOS_REGISTRY_OPENMAXIL_INSTALL_STAGING_CMDS
+ for h in $(@D)/*.h; do \
+ $(INSTALL) -D -m 0644 $${h} $(STAGING_DIR)/usr/include/$${h##*/} || exit 1; \
+ done
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (7 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 08/14 v6] package/khronos-registry-openmaxil: new package Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-02-21 17:39 ` Thomas Petazzoni
2015-01-23 23:24 ` [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc Yann E. MORIN
` (4 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
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
diff --git a/package/Config.in b/package/Config.in
index b808483..d5382f6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -352,6 +352,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"
diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in
new file mode 100644
index 0000000..e1d2946
--- /dev/null
+++ b/package/nvidia-driver/Config.in
@@ -0,0 +1,51 @@
+comment "nvidia-driver needs an (e)glibc toolchain and a modular Xorg server"
+ depends on BR2_i386 || BR2_x86_64
+ depends on !BR2_TOOLCHAIN_USES_GLIBC \
+ || !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
+
+config BR2_PACKAGE_NVIDIA_DRIVER
+ bool "nvidia-driver"
+ depends on BR2_i386 || BR2_x86_64
+ depends on BR2_TOOLCHAIN_USES_GLIBC
+ depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
+ select BR2_PACKAGE_KHRONOS_REGISTRY_OPENGL
+ select BR2_PACKAGE_XLIB_LIBX11
+ select BR2_PACKAGE_XLIB_LIBXEXT
+ select BR2_PACKAGE_HAS_LIBGL
+ select BR2_PACKAGE_HAS_LIBEGL
+ select BR2_PACKAGE_HAS_LIBGLES
+ help
+ The binary-only driver blob for NVidia cards.
+ This is the userland part only.
+
+ http://www.nvidia.com/
+
+if BR2_PACKAGE_NVIDIA_DRIVER
+
+config BR2_PACKAGE_PROVIDES_LIBGL
+ default "nvidia-driver"
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+ default "nvidia-driver"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+ default "nvidia-driver"
+
+config BR2_PACKAGE_NVIDIA_DRIVER_CUDA
+ bool "CUDA support"
+
+config BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
+ bool "OpenCL support"
+ depends on BR2_PACKAGE_NVIDIA_DRIVER_CUDA
+
+config BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS
+ bool "Install private libraries"
+ help
+ Two libraries require special agreement with NVidia to develop code
+ linking to those libraries: libnvidia-ifr.so and libnvidia-fbc.so
+ (to grab and encode an OpenGL buffer or an X framebuffer.)
+
+ Say 'y' here if you plan on running a program that uses those
+ private libraries.
+
+endif # BR2_PACKAGE_NVIDIA_DRIVER
diff --git a/package/nvidia-driver/nvidia-driver.hash b/package/nvidia-driver/nvidia-driver.hash
new file mode 100644
index 0000000..137590f
--- /dev/null
+++ b/package/nvidia-driver/nvidia-driver.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 bba63c30c730ad7b8500a77c81cae58562b9f9b57cd576b61f37a2d8bc45df25 NVIDIA-Linux-x86-346.35.run
+sha256 8625acbbc7a2abdda436a5cb9d06f2a7f5913b16e0a35ac4f9f106853a94d086 NVIDIA-Linux-x86_64-346.35.run
diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk
new file mode 100644
index 0000000..714892d
--- /dev/null
+++ b/package/nvidia-driver/nvidia-driver.mk
@@ -0,0 +1,110 @@
+################################################################################
+#
+# nvidia-driver
+#
+################################################################################
+
+NVIDIA_DRIVER_VERSION = 346.35
+NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64)
+NVIDIA_DRIVER_SITE = ftp://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION)
+NVIDIA_DRIVER_SOURCE = NVIDIA-Linux-x86$(NVIDIA_DRIVER_SUFFIX)-$(NVIDIA_DRIVER_VERSION).run
+NVIDIA_DRIVER_LICENSE = NVIDIA Software License
+NVIDIA_DRIVER_LICENSE_FILES = LICENSE
+NVIDIA_DRIVER_REDISTRIBUTE = NO
+NVIDIA_DRIVER_INSTALL_STAGING = YES
+
+NVIDIA_DRIVER_DEPENDENCIES = khronos-registry-opengl xlib_libX11 xlib_libXext
+NVIDIA_DRIVER_PROVIDES = libgl libegl libgles
+
+# We have two variables that contains a list of libraries to install:
+# NVIDIA_DRIVER_LIBS
+# contains the libraries whose filename end up in .so.$(VERSION); rather
+# than duplicate the version string for all of them, we just store their
+# basename, and append the version string below.
+# NVIDIA_DRIVER_LIBS_NO_VERSION
+# contains all libraries the do not use the NVidia version; since there
+# is currently only one such library, we store its full name.
+
+# Each line corresponds to a specific set of libraries
+NVIDIA_DRIVER_LIBS = \
+ libEGL libGLESv1_CM libGLESv2 libGL \
+ libnvidia-glcore libnvidia-eglcore libnvidia-glsi \
+ tls/libnvidia-tls \
+ libvdpau libvdpau_nvidia \
+ libnvidia-ml
+
+ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),y)
+NVIDIA_DRIVER_LIBS += libcuda libnvidia-compiler libnvcuvid libnvidia-encode
+endif
+
+ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_OPENCL),y)
+NVIDIA_DRIVER_LIBS_NO_VERSION += libOpenCL.so.1.0.0
+NVIDIA_DRIVER_LIBS += libnvidia-opencl
+endif
+
+# Those libraries are 'private' libraries requiring an agreement with
+# NVidia to develop code for those libs. There seems to be no restriction
+# on using those libraries (e.g. if the user has such an agreement, or
+# wants to run a third-party program developped under such an agreement).
+ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS),y)
+NVIDIA_DRIVER_LIBS += libnvidia-ifr libnvidia-fbc
+endif
+
+# We refer to the destination path; the origin file has no directory component
+NVIDIA_DRIVER_X_MODS = drivers/nvidia_drv.so \
+ extensions/libglx.so.$(NVIDIA_DRIVER_VERSION) \
+ libnvidia-wfb.so.$(NVIDIA_DRIVER_VERSION)
+
+# The downloaded archive is in fact an auto-extract script. So, it can run
+# virtually everywhere, and it is fine enough to provide useful options.
+# Except it can't extract into an existing (even empty) directory.
+define NVIDIA_DRIVER_EXTRACT_CMDS
+ $(SHELL) $(DL_DIR)/$(NVIDIA_DRIVER_SOURCE) --extract-only --target \
+ $(@D)/tmp-extract
+ mv $(@D)/tmp-extract/* $(@D)/tmp-extract/.manifest $(@D)
+ rm -rf $(@D)/tmp-extract
+endef
+
+# Helper to install libraries
+# $1: destination directory (target or staging)
+#
+# For all libraries that need it, we append the NVidia version string.
+# The for all libraries, we install them and create a symlink using their
+# SONAME, so we can link to them at runtime; we also create the no-version
+# symlink, so we can link to them at build time.
+define NVIDIA_DRIVER_INSTALL_LIBS
+ for lib in $(patsubst %,%.so.$(NVIDIA_DRIVER_VERSION),$(NVIDIA_DRIVER_LIBS)) \
+ $(NVIDIA_DRIVER_LIBS_NO_VERSION); \
+ do \
+ $(INSTALL) -D -m 0644 $(@D)/$${lib} $(1)/usr/lib/$${lib##*/}; \
+ n="$$( $(TARGET_READELF) -d "$(@D)/$${lib}" \
+ |sed -r -e '/.*\(SONAME\).*\[(.*)\]$$/!d; s//\1/;' )"; \
+ if [ -n "$${n}" -a "$${n}" != "$${lib##*/}" ]; then \
+ ln -sf $${lib##*/} $(1)/usr/lib/$${n}; \
+ fi; \
+ n="$${lib##*/}"; n="$${n/.so*}.so"; \
+ if [ -n "$${n}" -a "$${n}" != "$${lib##*/}" ]; then \
+ ln -sf $${lib##*/} $(1)/usr/lib/$${n}; \
+ fi; \
+ done
+endef
+
+# For staging, install libraries and development files
+define NVIDIA_DRIVER_INSTALL_STAGING_CMDS
+ $(call NVIDIA_DRIVER_INSTALL_LIBS,$(STAGING_DIR))
+ $(INSTALL) -D -m 0644 $(@D)/libGL.la $(STAGING_DIR)/usr/lib/libGL.la
+ $(SED) 's:__GENERATED_BY__:Buildroot:' $(STAGING_DIR)/usr/lib/libGL.la
+ $(SED) 's:__LIBGL_PATH__:/usr/lib:' $(STAGING_DIR)/usr/lib/libGL.la
+ $(SED) 's:-L[^[:space:]]\+::' $(STAGING_DIR)/usr/lib/libGL.la
+endef
+
+# For target, install libraries and X.org modules
+define NVIDIA_DRIVER_INSTALL_TARGET_CMDS
+ $(call NVIDIA_DRIVER_INSTALL_LIBS,$(TARGET_DIR))
+ for m in $(NVIDIA_DRIVER_X_MODS); do \
+ $(INSTALL) -D -m 0644 $(@D)/$${m##*/} \
+ $(TARGET_DIR)/usr/lib/xorg/modules/$${m}; \
+ done
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx)
@ 2015-01-23 23:24 Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 01/14 v6] package/python-lxml: new host package Yann E. MORIN
` (13 more replies)
0 siblings, 14 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
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 OpenGL Registry, to provide GL headers for
those OpenGL/EGL/GLES implementations that do not provide their own
headers (like NVidia's binary blob.)
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 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 dfdf173a4c7ca1c8584833a7286df37cb008fdb2:
qt: add X11 support (2015-01-23 23:32:23 +0100)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/gfx
for you to fetch changes up to a7e8708b7a6bd74374470fd8a453c612de9a60dd:
package/nvidia-tegra23-codecs: new package (2015-01-23 23:48:33 +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 (9):
package/python-lxml: new host package
package/khronos-registry-khrplatform: new package
package/khronos-registry-openkode: new package
package/mesa3d-headers: new package
package/khronos-registry-opengl: new package
package/khronos-registry-opengl: download and install extra headers
package/khronos-registry-openmaxil: new package
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 | 2 +
package/mesa3d-headers/mesa3d-headers.mk | 57 ++++++++
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 | 110 ++++++++++++++
.../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 | 130 +++++++++++++++++
.../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/opengl/Config.in | 6 +
.../opengl/khronos-registry-khrplatform/Config.in | 11 ++
.../khronos-registry-khrplatform.hash | 2 +
.../khronos-registry-khrplatform.mk | 28 ++++
.../0001-run-from-current-dir.patch | 17 +++
package/opengl/khronos-registry-opengl/Config.in | 25 ++++
.../khronos-registry-opengl.hash | 4 +
.../khronos-registry-opengl.mk | 115 +++++++++++++++
package/opengl/khronos-registry-openkode/Config.in | 15 ++
.../khronos-registry-openkode.hash | 7 +
.../khronos-registry-openkode.mk | 49 +++++++
.../opengl/khronos-registry-openmaxil/Config.in | 20 +++
.../khronos-registry-openmax.hash | 3 +
.../khronos-registry-openmaxil.mk | 32 ++++
package/python-lxml/Config.in | 10 ++
package/python-lxml/python-lxml.hash | 2 +
package/python-lxml/python-lxml.mk | 33 +++++
36 files changed, 1068 insertions(+)
create mode 100644 package/mesa3d-headers/Config.in
create mode 100644 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/opengl/khronos-registry-khrplatform/Config.in
create mode 100644 package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.hash
create mode 100644 package/opengl/khronos-registry-khrplatform/khronos-registry-khrplatform.mk
create mode 100644 package/opengl/khronos-registry-opengl/0001-run-from-current-dir.patch
create mode 100644 package/opengl/khronos-registry-opengl/Config.in
create mode 100644 package/opengl/khronos-registry-opengl/khronos-registry-opengl.hash
create mode 100644 package/opengl/khronos-registry-opengl/khronos-registry-opengl.mk
create mode 100644 package/opengl/khronos-registry-openkode/Config.in
create mode 100644 package/opengl/khronos-registry-openkode/khronos-registry-openkode.hash
create mode 100644 package/opengl/khronos-registry-openkode/khronos-registry-openkode.mk
create mode 100644 package/opengl/khronos-registry-openmaxil/Config.in
create mode 100644 package/opengl/khronos-registry-openmaxil/khronos-registry-openmax.hash
create mode 100644 package/opengl/khronos-registry-openmaxil/khronos-registry-openmaxil.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
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (8 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-02-21 17:40 ` Thomas Petazzoni
2015-01-23 23:24 ` [Buildroot] [PATCH 11/14 v6] package/nvidia-driver: build the kernel module Yann E. MORIN
` (3 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
From: J?r?me Pouiller <jezz@sysmic.org>
In order to compile xserver, libgl provider have to provide gl.pc file.
Signed-off-by: J?r?me Pouiller <jezz@sysmic.org>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
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
diff --git a/package/nvidia-driver/gl.pc b/package/nvidia-driver/gl.pc
new file mode 100644
index 0000000..d822763
--- /dev/null
+++ b/package/nvidia-driver/gl.pc
@@ -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
diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk
index 714892d..d53dc06 100644
--- a/package/nvidia-driver/nvidia-driver.mk
+++ b/package/nvidia-driver/nvidia-driver.mk
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 11/14 v6] package/nvidia-driver: build the kernel module
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (9 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package Yann E. MORIN
` (2 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/nvidia-driver/Config.in | 14 ++++++++++
package/nvidia-driver/nvidia-driver.mk | 50 ++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in
index e1d2946..9579c7a 100644
--- a/package/nvidia-driver/Config.in
+++ b/package/nvidia-driver/Config.in
@@ -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
diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk
index d53dc06..d1b2c25 100644
--- a/package/nvidia-driver/nvidia-driver.mk
+++ b/package/nvidia-driver/nvidia-driver.mk
@@ -65,6 +65,55 @@ define NVIDIA_DRIVER_EXTRACT_CMDS
rm -rf $(@D)/tmp-extract
endef
+# Build and install the kernel modules if needed
+ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_MODULE),y)
+
+NVIDIA_DRIVER_DEPENDENCIES += linux
+
+# NVidia uses the legacy naming scheme for the x86 architecture, when i386
+# and x86_64 were still considered two separate architectures in the Linux
+# kernel.
+NVIDIA_DRIVER_ARCH = $(if $(BR2_i386),i386,$(BR2_ARCH))
+
+NVIDIA_DRIVER_MOD_DIRS = kernel
+NVIDIA_DRIVER_MOD_FILES = kernel/nvidia.ko
+# nvidia-uvm.ko only available for x86_64
+ifeq ($(BR2_x86_64)$(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),yy)
+NVIDIA_DRIVER_MOD_DIRS += kernel/uvm
+NVIDIA_DRIVER_MOD_FILES += kernel/uvm/nvidia-uvm.ko
+endif
+
+# We can not use '$(MAKE) -C $(@D)/$${dir}' because NVidia's uses its own
+# Makefile to build a kernel module, which includes a lot of assumptions
+# on where to find its own sub-Makefile fragments, and fails if make is
+# not run from the directory where the module's source files are. Hence
+# our little trick to cd in there first.
+# That's also the reason why we do not use LINUX_MAKE_FLAGS or the other
+# linux-specific variables, since NVidia's Makefile does not understand
+# them.
+define NVIDIA_DRIVER_BUILD_CMDS
+ for dir in $(NVIDIA_DRIVER_MOD_DIRS); do \
+ ( cd $(@D)/$${dir} && \
+ $(MAKE) SYSSRC=$(LINUX_DIR) SYSOUT=$(LINUX_DIR) \
+ CC=$(TARGET_CC) LD=$(TARGET_LD) HOSTCC=$(HOSTCC) \
+ ARCH=$(NVIDIA_DRIVER_ARCH) module ) || exit 1; \
+ done
+endef
+
+# We do not use module-install because NVidia's Makefile requires root.
+# Also, we do not install it in the expected location (in nvidia/ rather
+# than in kernel/drivers/video/ )
+define NVIDIA_DRIVER_INSTALL_KERNEL_MODULE
+ for mod in $(NVIDIA_DRIVER_MOD_FILES); do \
+ $(INSTALL) -D -m 0644 $(@D)/$${mod} \
+ $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/nvidia/$${mod##*/} \
+ || exit 1; \
+ done
+ $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED)
+endef
+
+endif # BR2_PACKAGE_NVIDIA_DRIVER_MODULE == y
+
# Helper to install libraries
# $1: destination directory (target or staging)
#
@@ -106,6 +155,7 @@ define NVIDIA_DRIVER_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(@D)/$${m##*/} \
$(TARGET_DIR)/usr/lib/xorg/modules/$${m}; \
done
+ $(NVIDIA_DRIVER_INSTALL_KERNEL_MODULE)
endef
$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (10 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 11/14 v6] package/nvidia-driver: build the kernel module Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-26 13:31 ` Ben Ben
2015-01-23 23:24 ` [Buildroot] [PATCH 13/14 v6] package.nvidia-tegra23-binaries: add gstreamer plugins Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 14/14 v6] package/nvidia-tegra23-codecs: new package Yann E. MORIN
13 siblings, 1 reply; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
From: Nicolas Serafini <nicolas.serafini@sensefly.com>
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.
Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
[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)
]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/Config.in | 1 +
package/nvidia-tegra23/Config.in | 36 ++++++++
.../nvidia-tegra23-binaries/Config.in | 95 ++++++++++++++++++++
.../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 | 100 +++++++++++++++++++++
package/nvidia-tegra23/nvidia-tegra23.mk | 17 ++++
9 files changed, 282 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
diff --git a/package/Config.in b/package/Config.in
index d5382f6..89526f5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -353,6 +353,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"
diff --git a/package/nvidia-tegra23/Config.in b/package/nvidia-tegra23/Config.in
new file mode 100644
index 0000000..950f2f8
--- /dev/null
+++ b/package/nvidia-tegra23/Config.in
@@ -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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
new file mode 100644
index 0000000..66bb8c3
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
@@ -0,0 +1,95 @@
+config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
+ bool "nvidia-tegra23 binaries"
+ select BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
+ select BR2_PACKAGE_KHRONOS_REGISTRY_OPENGL
+ select BR2_PACKAGE_KHRONOS_REGISTRY_OPENKODE
+ select BR2_PACKAGE_KHRONOS_REGISTRY_OPENMAXIL
+ 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
+ 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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
new file mode 100644
index 0000000..3af7eec
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
@@ -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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
new file mode 100644
index 0000000..91387c9
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
@@ -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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
new file mode 100644
index 0000000..356a1cb
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
@@ -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
@@ -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..5998bbf
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
@@ -0,0 +1,100 @@
+################################################################################
+#
+# 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
+
+NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
+NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES
+
+NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = \
+ khronos-registry-opengl khronos-registry-openkode \
+ khronos-registry-openmax khronos-registry-khrplatform \
+ xlib_libX11 xlib_libXext xlib_libXv
+
+NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax
+
+ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA2),y)
+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)
+NVIDIA_TEGRA23_BINARIES_FIRMWARE = \
+ nvrm_avp_0ff00000.bin nvrm_avp_8e000000.bin nvrm_avp_9e000000.bin \
+ nvrm_avp_be000000.bin nvrm_avp_eff00000.bin nvavp_vid_ucode_alt.bin \
+ 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 \
+ libKD.so libnvapputil.so libnvavp.so libnvcwm.so libnvdc.so \
+ libnvddk_2d.so libnvddk_2d_v2.so libnvddk_disp.so libnvddk_kbc.so \
+ libnvddk_mipihsi.so libnvddk_nand.so libnvddk_se.so libnvddk_snor.so \
+ libnvddk_spif.so libnvddk_usbphy.so libnvdispatch_helper.so libnvglsi.so \
+ libnvmedia_audio.so libnvmm_audio.so libnvmm_camera.so libnvmm_contentpipe.so \
+ libnvmm_image.so libnvmmlite_audio.so libnvmmlite_image.so libnvmmlite.so \
+ libnvmmlite_utils.so libnvmmlite_video.so libnvmm_manager.so libnvmm_parser.so \
+ libnvmm_service.so libnvmm.so libnvmm_utils.so libnvmm_video.so libnvmm_writer.so \
+ libnvodm_disp.so libnvodm_dtvtuner.so libnvodm_imager.so libnvodm_misc.so \
+ libnvodm_query.so libnvomxilclient.so libnvomx.so libnvos.so libnvparser.so \
+ libnvrm_graphics.so libnvrm.so libnvsm.so libnvtestio.so libnvtestresults.so \
+ 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
+
+define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
+ $(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers
+ $(call suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \
+ $(@D)/nv_tegra/nvidia_drivers.tbz2 | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D)/nv_tegra/nvidia_drivers/ $(TAR_OPTIONS) -
+ $(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps
+ $(call suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \
+ $(@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
+
+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
+
+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); \
+ )
+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); \
+ )
+ $(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \
+ $(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
+
+$(eval $(generic-package))
diff --git a/package/nvidia-tegra23/nvidia-tegra23.mk b/package/nvidia-tegra23/nvidia-tegra23.mk
new file mode 100644
index 0000000..46a7e04
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 13/14 v6] package.nvidia-tegra23-binaries: add gstreamer plugins
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (11 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 14/14 v6] package/nvidia-tegra23-codecs: new package Yann E. MORIN
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
From: Nicolas Serafini <nicolas.serafini@sensefly.com>
Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
[yann.morin.1998 at free.fr: split out into their own patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
.../nvidia-tegra23-binaries/Config.in | 15 +++++++++++
.../nvidia-tegra23-binaries.mk | 30 ++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
index 66bb8c3..94a86fa 100644
--- a/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
@@ -92,4 +92,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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
index 5998bbf..077ec0d 100644
--- a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
+++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk
@@ -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
@@ -51,6 +55,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
@@ -77,12 +86,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
@@ -95,6 +123,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))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 14/14 v6] package/nvidia-tegra23-codecs: new package
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
` (12 preceding siblings ...)
2015-01-23 23:24 ` [Buildroot] [PATCH 13/14 v6] package.nvidia-tegra23-binaries: add gstreamer plugins Yann E. MORIN
@ 2015-01-23 23:24 ` Yann E. MORIN
13 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-23 23:24 UTC (permalink / raw)
To: buildroot
From: Nicolas Serafini <nicolas.serafini@sensefly.com>
nvidia-tegra23-codecs provides various HW-accelerated media codecs, such
as: AAC3, h264, jpeg, MP3...
Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
[me:
- split codecs from binaries into this patch
- use our extractor helpers
]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
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
diff --git a/package/nvidia-tegra23/Config.in b/package/nvidia-tegra23/Config.in
index 950f2f8..89bdf83 100644
--- a/package/nvidia-tegra23/Config.in
+++ b/package/nvidia-tegra23/Config.in
@@ -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"
diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in b/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in
new file mode 100644
index 0000000..07a8e74
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in
@@ -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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash
new file mode 100644
index 0000000..de4a461
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash
@@ -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
diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk
new file mode 100644
index 0000000..d05dbb8
--- /dev/null
+++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk
@@ -0,0 +1,41 @@
+################################################################################
+#
+# nvidia-tegra23-codecs
+#
+################################################################################
+
+NVIDIA_TEGRA23_CODECS_VERSION = $(NVIDIA_TEGRA23_VERSION)
+NVIDIA_TEGRA23_CODECS_SOURCE = $(NVIDIA_TEGRA23_BASE)-codecs_R$(NVIDIA_TEGRA23_CODECS_VERSION)_armhf.tbz2
+NVIDIA_TEGRA23_CODECS_SITE = $(NVIDIA_TEGRA23_SITE)
+NVIDIA_TEGRA23_CODECS_LICENSE = NVIDIA(r) Tegra(r) Software License Agreement
+NVIDIA_TEGRA23_CODECS_LICENSE_FILES = Tegra_Software_License_Agreement-Tegra-Linux-codecs.txt
+NVIDIA_TEGRA23_CODECS_REDISTRIBUTE = NO
+NVIDIA_TEGRA23_CODECS_DEPENDENCIES = nvidia-tegra23-binaries
+NVIDIA_TEGRA23_CODECS_INSTALL_STAGING = NO
+NVIDIA_TEGRA23_CODECS_INSTALL_TARGET = YES
+
+NVIDIA_TEGRA23_CODECS_FIRMWARE = \
+ nvmm_aacdec.axf nvmm_adtsdec.axf nvmm_h264dec.axf nvmm_h264dec2x.axf \
+ nvmm_jpegdec.axf nvmm_jpegenc.axf nvmm_manager.axf nvmm_mp3dec.axf \
+ nvmm_mpeg4dec.axf nvmm_service.axf
+
+# The archive contains an archive with the firmware codecs
+define NVIDIA_TEGRA23_CODECS_EXTRACT_CMDS
+ $(INSTALL) -d $(@D)
+ $(call suitable-extractor,$(NVIDIA_TEGRA23_CODECS_SOURCE)) \
+ $(DL_DIR)/$(NVIDIA_TEGRA23_CODECS_SOURCE) | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D) $(TAR_OPTIONS) -
+ $(INSTALL) -d $(@D)/restricted_codecs
+ $(call suitable-extractor,$(@D)/restricted_codecs.tbz2) \
+ $(@D)/restricted_codecs.tbz2 | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D)/restricted_codecs/ $(TAR_OPTIONS) -
+endef
+
+define NVIDIA_TEGRA23_CODECS_INSTALL_TARGET_CMDS
+ $(foreach codec,$(NVIDIA_TEGRA23_CODECS_FIRMWARE),
+ $(INSTALL) -D -m 0644 $(@D)/restricted_codecs/lib/firmware/$(codec) \
+ $(TARGET_DIR)/lib/firmware/$(codec); \
+ )
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: new package
2015-01-23 23:24 ` [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: " Yann E. MORIN
@ 2015-01-26 8:54 ` Jérôme Pouiller
2015-01-26 18:26 ` Yann E. MORIN
0 siblings, 1 reply; 22+ messages in thread
From: Jérôme Pouiller @ 2015-01-26 8:54 UTC (permalink / raw)
To: buildroot
Hello Yann,
On Saturday 24 January 2015 00:24:34 Yann E. MORIN wrote:
> Some headers required to build GL/EGL/GLES/... stuff are not provided by
> Khronos, so we must find an alternate source for those headers.
> Currently, we're missing:
> - gl.h for full GL (gl.h for GLES is available from Khronos)
> - dri_interface.h to be able to build GL-enabled Xorg
>
> mesa3d provides all of them, and they are generic enough that they can
> be re-used even for other GL/EGL/GLES/... implementations.
>
> Unfortunately, modifying mesa3d so that it only installs its headers is
> no trivial task, and would render the mesa3d package really ugly and
> unmaintainable in the long run.
Did you try "make install-data" in mesa3d tree? It should install all
files but the libraries (in other terms, it install headers only).
> Instead, we introduce a stripped-down mesa3d-headers package, which sole
> purpose is to install those missing headers.
hmmm... since mesa3d-headers provide all headers, do we really need
khronos-registry-* packages? In add, all developers test their code
using mesa3d headers. So, I would prefer to use headers provided by
mesa3d than khronos.
[...]
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package
2015-01-23 23:24 ` [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package Yann E. MORIN
@ 2015-01-26 13:31 ` Ben Ben
2015-01-26 18:19 ` Yann E. MORIN
0 siblings, 1 reply; 22+ messages in thread
From: Ben Ben @ 2015-01-26 13:31 UTC (permalink / raw)
To: buildroot
Hi Yann,
They are no package khronos-registry-openmax.
I replace it with khronos-registry-openmaxil.
Works fine.
Regards,
Beno?t
2015-01-24 0:24 GMT+01:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> From: Nicolas Serafini <nicolas.serafini@sensefly.com>
>
> 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.
>
> Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
> [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)
> ]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> package/Config.in | 1 +
> package/nvidia-tegra23/Config.in | 36 ++++++++
> .../nvidia-tegra23-binaries/Config.in | 95
> ++++++++++++++++++++
> .../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 | 100
> +++++++++++++++++++++
> package/nvidia-tegra23/nvidia-tegra23.mk | 17 ++++
> 9 files changed, 282 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
>
> diff --git a/package/Config.in b/package/Config.in
> index d5382f6..89526f5 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -353,6 +353,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"
> diff --git a/package/nvidia-tegra23/Config.in
> b/package/nvidia-tegra23/Config.in
> new file mode 100644
> index 0000000..950f2f8
> --- /dev/null
> +++ b/package/nvidia-tegra23/Config.in
> @@ -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
> diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
> b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
> new file mode 100644
> index 0000000..66bb8c3
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in
> @@ -0,0 +1,95 @@
> +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES
> + bool "nvidia-tegra23 binaries"
> + select BR2_PACKAGE_KHRONOS_REGISTRY_KHRPLATFORM
> + select BR2_PACKAGE_KHRONOS_REGISTRY_OPENGL
> + select BR2_PACKAGE_KHRONOS_REGISTRY_OPENKODE
> + select BR2_PACKAGE_KHRONOS_REGISTRY_OPENMAXIL
> + 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
> + 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
> diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
> b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
> new file mode 100644
> index 0000000..3af7eec
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc
> @@ -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
> diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
> b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
> new file mode 100644
> index 0000000..91387c9
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc
> @@ -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
> diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
> b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
> new file mode 100644
> index 0000000..356a1cb
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc
> @@ -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
> @@ -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..5998bbf
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/
> nvidia-tegra23-binaries.mk
> @@ -0,0 +1,100 @@
>
> +################################################################################
> +#
> +# 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
> +
> +NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
> +NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET = YES
> +
> +NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = \
> + khronos-registry-opengl khronos-registry-openkode \
> + khronos-registry-openmax khronos-registry-khrplatform \
> + xlib_libX11 xlib_libXext xlib_libXv
> +
> +NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax
> +
> +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_TEGRA2),y)
> +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)
> +NVIDIA_TEGRA23_BINARIES_FIRMWARE = \
> + nvrm_avp_0ff00000.bin nvrm_avp_8e000000.bin nvrm_avp_9e000000.bin \
> + nvrm_avp_be000000.bin nvrm_avp_eff00000.bin
> nvavp_vid_ucode_alt.bin \
> + 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 \
> + libKD.so libnvapputil.so libnvavp.so libnvcwm.so libnvdc.so \
> + libnvddk_2d.so libnvddk_2d_v2.so libnvddk_disp.so libnvddk_kbc.so \
> + libnvddk_mipihsi.so libnvddk_nand.so libnvddk_se.so
> libnvddk_snor.so \
> + libnvddk_spif.so libnvddk_usbphy.so libnvdispatch_helper.so
> libnvglsi.so \
> + libnvmedia_audio.so libnvmm_audio.so libnvmm_camera.so
> libnvmm_contentpipe.so \
> + libnvmm_image.so libnvmmlite_audio.so libnvmmlite_image.so
> libnvmmlite.so \
> + libnvmmlite_utils.so libnvmmlite_video.so libnvmm_manager.so
> libnvmm_parser.so \
> + libnvmm_service.so libnvmm.so libnvmm_utils.so libnvmm_video.so
> libnvmm_writer.so \
> + libnvodm_disp.so libnvodm_dtvtuner.so libnvodm_imager.so
> libnvodm_misc.so \
> + libnvodm_query.so libnvomxilclient.so libnvomx.so libnvos.so
> libnvparser.so \
> + libnvrm_graphics.so libnvrm.so libnvsm.so libnvtestio.so
> libnvtestresults.so \
> + 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
> +
> +define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
> + $(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers
> + $(call suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \
> + $(@D)/nv_tegra/nvidia_drivers.tbz2 | \
> + $(TAR) $(TAR_STRIP_COMPONENTS)=0 -C $(@D)/nv_tegra/nvidia_drivers/
> $(TAR_OPTIONS) -
> + $(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps
> + $(call
> suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \
> + $(@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
> +
> +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
> +
> +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); \
> + )
> +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); \
> + )
> + $(INSTALL) -D -m 0644
> $(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \
> + $(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
> +
> +$(eval $(generic-package))
> diff --git a/package/nvidia-tegra23/nvidia-tegra23.mk
> b/package/nvidia-tegra23/nvidia-tegra23.mk
> new file mode 100644
> index 0000000..46a7e04
> --- /dev/null
> +++ b/package/nvidia-tegra23/nvidia-tegra23.mk
> @@ -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))
> --
> 1.9.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150126/6c198446/attachment.html>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package
2015-01-26 13:31 ` Ben Ben
@ 2015-01-26 18:19 ` Yann E. MORIN
0 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-26 18:19 UTC (permalink / raw)
To: buildroot
Beno?t, All,
On 2015-01-26 14:31 +0100, Ben Ben spake thusly:
> They are no package khronos-registry-openmax.
> I replace it with khronos-registry-openmaxil.
Fixed, thanks for spotting.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: new package
2015-01-26 8:54 ` Jérôme Pouiller
@ 2015-01-26 18:26 ` Yann E. MORIN
0 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-01-26 18:26 UTC (permalink / raw)
To: buildroot
J?r?me, All,
On 2015-01-26 09:54 +0100, J?r?me Pouiller spake thusly:
> On Saturday 24 January 2015 00:24:34 Yann E. MORIN wrote:
> > Some headers required to build GL/EGL/GLES/... stuff are not provided by
> > Khronos, so we must find an alternate source for those headers.
> > Currently, we're missing:
> > - gl.h for full GL (gl.h for GLES is available from Khronos)
> > - dri_interface.h to be able to build GL-enabled Xorg
> >
> > mesa3d provides all of them, and they are generic enough that they can
> > be re-used even for other GL/EGL/GLES/... implementations.
> >
> > Unfortunately, modifying mesa3d so that it only installs its headers is
> > no trivial task, and would render the mesa3d package really ugly and
> > unmaintainable in the long run.
> Did you try "make install-data" in mesa3d tree? It should install all
> files but the libraries (in other terms, it install headers only).
I thought of doing just that, indeed.
But then, it is only possible to run 'make install-anything' if the
package had previously been configured and built, i.e. './configure' and
.make' were previously called.
But then, what flags are we supposed to pass ./configure ? We surely do
not want to enable everything, jsut what is needed to get the headers.
And then, we would have to carefuly call 'make' so that it does not
build everything, just the headers.
> > Instead, we introduce a stripped-down mesa3d-headers package, which sole
> > purpose is to install those missing headers.
> hmmm... since mesa3d-headers provide all headers, do we really need
> khronos-registry-* packages? In add, all developers test their code
> using mesa3d headers. So, I would prefer to use headers provided by
> mesa3d than khronos.
Well, I'm not really against droippign the Khronos registries, since it
is not fun packaging those.
However, as I said above, we'd have to carefuly craft mesa3d-headers to
just configure and build the headers, and I'm afraid that's not so
easy...
But I can give it a shot to see how dirty/difficult it would be.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob
2015-01-23 23:24 ` [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob Yann E. MORIN
@ 2015-02-21 17:39 ` Thomas Petazzoni
2015-03-06 22:47 ` Yann E. MORIN
0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2015-02-21 17:39 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sat, 24 Jan 2015 00:24:38 +0100, Yann E. MORIN wrote:
> 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.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
I've applied to next, after doing some changes:
[Thomas:
- Rewrap Config.in help text.
- Add a comment to explain why mesa3d-headers, xlib_libX11 and
xlib_libXext are part of the dependencies.
- Fix typo in comment about library installation: s/The/Then/
- Use 'addsuffix' instead of 'patsubst' to calculate the final
filename of libraries to install.
- Use more temporary variables to make the library installation
loop clearer: 'libpath' is the relative path of the library in
nvidia-driver sources, 'libname' the base name of the library,
'libsoname' the soname of the library, and 'baseso' the base .so
symlink name.]
See my diff below for the details.
However, one thing that I find a bit unclear and that might need
improvement is that you are making this package depend on X.org while
it does provide an EGL implementation. So you install the 36 MB
libnvidia-eglcore.so.346.35 unconditionally, even though I believe it's
probably unused when X.org is used.
Same for libGLES: do we really need to install both libGL and libGLES ?
Though I agree libGLES* are very small.
So I believe at least the EGL stuff should be separated out: either you
do X.org, or you do EGL. But I don't think both can be used at the same
time. Doing this would allow to drastically cut the installed size of
this huge package.
So now, the diff of the changes I made:
diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in
index 9be6764..18453ab 100644
--- a/package/nvidia-driver/Config.in
+++ b/package/nvidia-driver/Config.in
@@ -41,11 +41,12 @@ config BR2_PACKAGE_NVIDIA_DRIVER_OPENCL
config BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS
bool "Install private libraries"
help
- Two libraries require special agreement with NVidia to develop code
- linking to those libraries: libnvidia-ifr.so and libnvidia-fbc.so
- (to grab and encode an OpenGL buffer or an X framebuffer.)
+ Two libraries require special agreement with NVidia to
+ develop code linking to those libraries: libnvidia-ifr.so
+ and libnvidia-fbc.so (to grab and encode an OpenGL buffer or
+ an X framebuffer.)
- Say 'y' here if you plan on running a program that uses those
- private libraries.
+ Say 'y' here if you plan on running a program that uses
+ those private libraries.
endif # BR2_PACKAGE_NVIDIA_DRIVER
diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk
index 30b2ab6..f703fab 100644
--- a/package/nvidia-driver/nvidia-driver.mk
+++ b/package/nvidia-driver/nvidia-driver.mk
@@ -13,6 +13,11 @@ NVIDIA_DRIVER_LICENSE_FILES = LICENSE
NVIDIA_DRIVER_REDISTRIBUTE = NO
NVIDIA_DRIVER_INSTALL_STAGING = YES
+# Since nvidia-driver are binary blobs, the below dependencies are not
+# strictly speaking build dependencies of nvidia-driver. However, they
+# are build dependencies of packages that depend on nvidia-driver, so
+# they should be built prior to those packages, and the only simple
+# way to do so is to make nvidia-driver depend on them.
NVIDIA_DRIVER_DEPENDENCIES = mesa3d-headers xlib_libX11 xlib_libXext
NVIDIA_DRIVER_PROVIDES = libgl libegl libgles
@@ -69,22 +74,23 @@ endef
# $1: destination directory (target or staging)
#
# For all libraries that need it, we append the NVidia version string.
-# The for all libraries, we install them and create a symlink using their
-# SONAME, so we can link to them at runtime; we also create the no-version
-# symlink, so we can link to them at build time.
+# Then for all libraries, we install them and create a symlink using
+# their SONAME, so we can link to them at runtime; we also create the
+# no-version symlink, so we can link to them at build time.
define NVIDIA_DRIVER_INSTALL_LIBS
- for lib in $(patsubst %,%.so.$(NVIDIA_DRIVER_VERSION),$(NVIDIA_DRIVER_LIBS)) \
+ for libpath in $(addsuffix .so.$(NVIDIA_DRIVER_VERSION),$(NVIDIA_DRIVER_LIBS)) \
$(NVIDIA_DRIVER_LIBS_NO_VERSION); \
do \
- $(INSTALL) -D -m 0644 $(@D)/$${lib} $(1)/usr/lib/$${lib##*/}; \
- n="$$( $(TARGET_READELF) -d "$(@D)/$${lib}" \
+ libname="$${libpath##*/}"; \
+ $(INSTALL) -D -m 0644 $(@D)/$${libpath} $(1)/usr/lib/$${libname}; \
+ libsoname="$$( $(TARGET_READELF) -d "$(@D)/$${libpath}" \
|sed -r -e '/.*\(SONAME\).*\[(.*)\]$$/!d; s//\1/;' )"; \
- if [ -n "$${n}" -a "$${n}" != "$${lib##*/}" ]; then \
- ln -sf $${lib##*/} $(1)/usr/lib/$${n}; \
+ if [ -n "$${libsoname}" -a "$${libsoname}" != "$${libname}" ]; then \
+ ln -sf $${libname} $(1)/usr/lib/$${libsoname}; \
fi; \
- n="$${lib##*/}"; n="$${n/.so*}.so"; \
- if [ -n "$${n}" -a "$${n}" != "$${lib##*/}" ]; then \
- ln -sf $${lib##*/} $(1)/usr/lib/$${n}; \
+ baseso="$${libname/.so*}.so"; \
+ if [ -n "$${baseso}" -a "$${baseso}" != "$${libname}" ]; then \
+ ln -sf $${libname} $(1)/usr/lib/$${baseso}; \
fi; \
done
endef
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc
2015-01-23 23:24 ` [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc Yann E. MORIN
@ 2015-02-21 17:40 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2015-02-21 17:40 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sat, 24 Jan 2015 00:24:39 +0100, Yann E. MORIN wrote:
> From: J?r?me Pouiller <jezz@sysmic.org>
>
> In order to compile xserver, libgl provider have to provide gl.pc file.
>
> Signed-off-by: J?r?me Pouiller <jezz@sysmic.org>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Applied to next, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob
2015-02-21 17:39 ` Thomas Petazzoni
@ 2015-03-06 22:47 ` Yann E. MORIN
0 siblings, 0 replies; 22+ messages in thread
From: Yann E. MORIN @ 2015-03-06 22:47 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2015-02-21 18:39 +0100, Thomas Petazzoni spake thusly:
> On Sat, 24 Jan 2015 00:24:38 +0100, Yann E. MORIN wrote:
> > 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.
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> I've applied to next, after doing some changes:
[--SNIP--]
> However, one thing that I find a bit unclear and that might need
> improvement is that you are making this package depend on X.org while
> it does provide an EGL implementation. So you install the 36 MB
> libnvidia-eglcore.so.346.35 unconditionally, even though I believe it's
> probably unused when X.org is used.
>
> Same for libGLES: do we really need to install both libGL and libGLES ?
> Though I agree libGLES* are very small.
Well, I just did reproduce what the standard install procedure of the
package does: it installs everything. Agreed, I did not even try to
think those things apart.
> So I believe at least the EGL stuff should be separated out: either you
> do X.org, or you do EGL. But I don't think both can be used at the same
> time. Doing this would allow to drastically cut the installed size of
> this huge package.
Well, it is indeed quite huge, but also consider the type of systems it
is supposed to run on: desktop-class machines. The only embedded-class
board I know of that has an NVidia GPU is the newly introduced Jetson
TK1, and it has 16GiB of on-board eMMC...
> So now, the diff of the changes I made:
Thanks for this cleanup pass! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2015-03-06 22:47 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 23:24 [Buildroot] [PATCH 0/14 v6] NVidia GPU binary blobs for x86 and ARM (branch yem/gfx) Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 01/14 v6] package/python-lxml: new host package Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 02/14 v6] package/python-lxml: add target variant Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 03/14 v6] package/khronos-registry-khrplatform: new package Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 04/14 v6] package/khronos-registry-openkode: " Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 05/14 v6] package/mesa3d-headers: " Yann E. MORIN
2015-01-26 8:54 ` Jérôme Pouiller
2015-01-26 18:26 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 06/14 v6] package/khronos-registry-opengl: " Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 07/14 v6] package/khronos-registry-opengl: download and install extra headers Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 08/14 v6] package/khronos-registry-openmaxil: new package Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 09/14 v6] package/nvidia-driver: add NVidia's OpenGL binary blob Yann E. MORIN
2015-02-21 17:39 ` Thomas Petazzoni
2015-03-06 22:47 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 10/14 v6] package/nvidia-driver: Add gl.pc Yann E. MORIN
2015-02-21 17:40 ` Thomas Petazzoni
2015-01-23 23:24 ` [Buildroot] [PATCH 11/14 v6] package/nvidia-driver: build the kernel module Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 12/14 v6] package/nvidia-tegra23-binaries: new package Yann E. MORIN
2015-01-26 13:31 ` Ben Ben
2015-01-26 18:19 ` Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 13/14 v6] package.nvidia-tegra23-binaries: add gstreamer plugins Yann E. MORIN
2015-01-23 23:24 ` [Buildroot] [PATCH 14/14 v6] package/nvidia-tegra23-codecs: new package Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox