forked from OE4T/meta-tegra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new providers for EGL and DRM Libs
The target to have these providers is to be able to choose them instead of mesa open source drivers. so that we can build against them, not mesa open source drivers.
- Loading branch information
Bassem Mohsen
committed
Aug 25, 2017
1 parent
6a67249
commit 1a6473e
Showing
13 changed files
with
582 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prefix=OEPREFIX | ||
exec_prefix=OEEXECPREFIX | ||
libdir=OELIBDIR | ||
includedir=OEINCDIR | ||
|
||
Name: libdrm | ||
Description: Nvidia pre-compiled libdrm | ||
Version: 2.4.41 | ||
Libs: -L${libdir} -ldrm | ||
Cflags: -I${includedir} -I${includedir}/libdrm |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms and conditions of the GNU General Public License, | ||
# version 2, as published by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
# more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
DESCRIPTION = "Nvidia libdrm library in binary form" | ||
|
||
LICENSE = "GPLv2" | ||
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
|
||
INSANE_SKIP_${PN} = "already-stripped \ | ||
dev-so \ | ||
dev-deps \ | ||
build-deps \ | ||
installed-vs-shipped \ | ||
ldflags \ | ||
" | ||
|
||
DRM_PACKAGES = " \ | ||
virtual/libdrm \ | ||
libdrm \ | ||
libdrm-dev \ | ||
libdrm-drivers \ | ||
libdrm-doc \ | ||
libdrm-staticdev \ | ||
libdrm-dbg \ | ||
libdrm-locale \ | ||
drm \ | ||
" | ||
|
||
PROVIDES = "${DRM_PACKAGES}" | ||
RPROVIDES_${PN} = "${DRM_PACKAGES}" | ||
CONFLICTS_${PN} = "${DRM_PACKAGES}" | ||
REPLACES_${PN} = "${DRM_PACKAGES}" | ||
|
||
PACKAGES = "${PN}" | ||
|
||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
|
||
S = "${WORKDIR}" | ||
|
||
SRC_URI = "file://drm-headers.tar.gz \ | ||
file://COPYING \ | ||
file://libdrm.so.2 \ | ||
file://libdrm.pc.in \ | ||
" | ||
|
||
do_install() { | ||
# install lib | ||
install -d -m 0755 ${D}/${libdir} | ||
install -m 0775 ${WORKDIR}/libdrm.so.2 ${D}/${libdir}/ | ||
ln -sf libdrm.so.2 ${D}/${libdir}/libdrm.so | ||
|
||
# install headers | ||
install -d -m 0755 ${D}/${includedir} | ||
install -m 0775 ${WORKDIR}/drm-headers/include/*.h ${D}/${includedir} | ||
|
||
# install pc file | ||
install -D ${WORKDIR}/libdrm.pc.in ${D}${libdir}/pkgconfig/libdrm.pc | ||
sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/libdrm.pc | ||
sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/libdrm.pc | ||
sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/libdrm.pc | ||
sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/libdrm.pc | ||
} | ||
|
||
FILES_${PN} = "${libdir}/*.so* \ | ||
${includedir}/ \ | ||
" | ||
|
||
FILES_${PN}-dev = "${libdir}/pkgconfig/" |
25 changes: 25 additions & 0 deletions
25
recipes-bsp/tegra-egl/files/0001-Force-wayland-to-be-enabled.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 15b100764eab162483fd18d367e9dd750976f17e Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Jonatan=20P=C3=A5lsson?= <jonatan.palsson@pelagicore.com> | ||
Date: Mon, 29 Feb 2016 15:16:05 +0100 | ||
Subject: [PATCH] Force wayland to be enabled | ||
|
||
--- | ||
include/EGL/eglplatform.h | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h | ||
index 2bb4dd1..406f35e 100644 | ||
--- a/include/EGL/eglplatform.h | ||
+++ b/include/EGL/eglplatform.h | ||
@@ -1,6 +1,8 @@ | ||
#ifndef __eglplatform_h_ | ||
#define __eglplatform_h_ | ||
|
||
+#define WAYLAND 1 | ||
+ | ||
/* | ||
** Copyright (c) 2007-2013 The Khronos Group Inc. | ||
** | ||
-- | ||
2.7.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
prefix=/usr | ||
exec_prefix=${prefix} | ||
libdir=${prefix}/lib/aarch64-linux-gnu/tegra-egl | ||
includedir=${prefix}/include | ||
|
||
Name: egl | ||
Description: NVIDIA EGL library | ||
Version: 11.1.2 | ||
Libs: -L${libdir} -lEGL | ||
Libs.private: -lm -lpthread -ldl | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prefix=/usr | ||
exec_prefix=${prefix} | ||
libdir=${prefix}/lib/aarch64-linux-gnu/tegra-egl | ||
includedir=${prefix}/include | ||
|
||
Name: glesv2 | ||
Description: NVIDIA GLESv2 library | ||
Version: 11.1.2 | ||
Libs: -L${libdir} -lGLESv2 | ||
Cflags: -I${includedir} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prefix=/usr | ||
exec_prefix=/usr | ||
libdir=${prefix}/lib/aarch64-linux-gnu/tegra-egl | ||
includedir=/usr/include | ||
|
||
Name: wayland-egl | ||
Description: NVIDIA wayland-egl library | ||
Version: 9.1.6 | ||
Libs: -L${libdir} -lwayland-egl | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify it | ||
# under the terms and conditions of the GNU General Public License, | ||
# version 2, as published by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
# more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
DESCRIPTION = "Nvidia drivers for graphics and multimedia libraries" | ||
LICENSE = "GPLv2" | ||
LIC_FILES_CHKSUM = "file://lib-target/COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
file://include/COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
|
||
INSANE_SKIP_${PN} = "already-stripped \ | ||
dev-so dev-deps \ | ||
build-deps textrel \ | ||
installed-vs-shipped" | ||
ERROR_QA_remove = "ldflags" | ||
|
||
SRC_URI = "file://lib-target.tar.gz \ | ||
file://include.tar.gz \ | ||
file://egl.pc \ | ||
file://glesv2.pc \ | ||
file://wayland-egl.pc \ | ||
file://nvidia-tegra-egl.conf \ | ||
" | ||
|
||
SRC_URI_append = " ${@bb.utils.contains("DISTRO_FEATURES", "wayland", " file://0001-Force-wayland-to-be-enabled.patch ", "",d)}" | ||
|
||
S = "${WORKDIR}" | ||
|
||
GRAPHICS_PACKAGES = " \ | ||
virtual/libgles2 \ | ||
virtual/egl \ | ||
" | ||
|
||
PROVIDES = "${GRAPHICS_PACKAGES}" | ||
RPROVIDES_${PN} = "${GRAPHICS_PACKAGES}" | ||
CONFLICTS_${PN} = "${GRAPHICS_PACKAGES}" | ||
REPLACES_${PN} = "${GRAPHICS_PACKAGES}" | ||
|
||
RPROVIDES_${PN} += " libGLESv2.so()(64bit) libEGL.so()(64bit) libcuda.so()(64bit)" | ||
PROVIDES_append = " virtual/egl virtual/libgles2 " | ||
|
||
PACKAGES = "${PN}" | ||
|
||
DEPENDS = "wayland tegra-drm" | ||
|
||
NV_DRV_VER = "${PN}" | ||
|
||
do_install() { | ||
# libs | ||
install -d -m 0755 ${D}/${libdir} | ||
install -m 0775 ./lib-target/*.so* ${D}/${libdir} | ||
|
||
# headers | ||
install -d ${D}/${includedir}/GLES2 ${D}/${includedir}/GLES3 ${D}/${includedir}/EGL ${D}/${includedir}/KHR | ||
install -m 0775 include/*.h ${D}/${includedir} | ||
install -m 0775 include/EGL/*.h ${D}/${includedir}/EGL | ||
install -m 0775 include/GLES2/*.h ${D}/${includedir}/GLES2 | ||
install -m 0775 include/GLES3/*.h ${D}/${includedir}/GLES3 | ||
install -m 0775 include/KHR/*.h ${D}/${includedir}/KHR | ||
|
||
# links | ||
ln -sf libcuda.so.1 ${D}/${libdir}/libcuda.so | ||
ln -sf libnvidia-glsi.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-glsi.so | ||
#ln -sf libnvidia-rmapi-tegra.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-rmapi-tegra.so | ||
ln -sf libnvidia-eglcore.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-eglcore.so | ||
ln -sf libnvidia-glcore.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-glcore.so | ||
#ln -sf libnvidia-glcore-cg.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-glcore-cg.so | ||
#ln -sf libnvidia-glcore-ocg.so.${NV_DRV_VER} ${D}/${libdir}/libnvidia-glcore-ocg.so | ||
ln -sf libGLESv2.so.2 ${D}/${libdir}/libGLESv2.so | ||
ln -sf libGLESv2_nvidia.so.2 ${D}/${libdir}/libGLESv2_nvidia.so | ||
#ln -sf libwayland-egl.so.1.0.0 ${D}/${libdir}/libwayland-egl.so.1 | ||
#ln -sf libwayland-egl.so.1.0.0 ${D}/${libdir}/libwayland-egl.so | ||
ln -sf libEGL.so.1 ${D}/${libdir}/libEGL.so | ||
ln -sf libwayland-egl.so.1 ${D}/${libdir}/libwayland-egl.so | ||
|
||
# pkg-config | ||
install -d ${D}/${libdir}/pkgconfig/ | ||
install -m 0775 *.pc ${D}/${libdir}/pkgconfig/ | ||
} | ||
|
||
FILES_${PN} = "\ | ||
${libdir}/* \ | ||
" | ||
|
||
FILES_${PN}-dev = "\ | ||
${includedir}/* \ | ||
${libdir}/pkgconfig/* \ | ||
" |