From fecccd7ebf62b8da88569d229b5c7bb3938aaa76 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 7 Apr 2017 13:51:54 +0200 Subject: tdx-nv-binaries: renamed from trdx-nv-binaries While at it also update the comment in recipes-graphics/mesa/mesa_%.bbappend. Signed-off-by: Marcel Ziswiler Acked-by: Dominik Sliwa --- recipes-bsp/tdx-nv-binaries/files/aplay.desktop | 5 + recipes-bsp/tdx-nv-binaries/files/egl.pc | 10 ++ recipes-bsp/tdx-nv-binaries/files/eglplatform.h | 147 +++++++++++++++++++++ recipes-bsp/tdx-nv-binaries/files/gles.pc | 10 ++ recipes-bsp/tdx-nv-binaries/files/glesv2.pc | 10 ++ .../tdx-nv-binaries/files/khronos_headers.tgz | Bin 0 -> 279190 bytes recipes-bsp/tdx-nv-binaries/files/mimeapps.list | 10 ++ .../tdx-nv-binaries/files/nvgstplayer.desktop | 6 + .../tdx-nv-binaries/files/nvsamples-hardfp.patch | Bin 0 -> 6479 bytes .../files/nvsamples-no-binary-shaders.patch | 93 +++++++++++++ .../tdx-nv-binaries/files/nvsamples-oe.patch | 50 +++++++ 11 files changed, 341 insertions(+) create mode 100644 recipes-bsp/tdx-nv-binaries/files/aplay.desktop create mode 100644 recipes-bsp/tdx-nv-binaries/files/egl.pc create mode 100644 recipes-bsp/tdx-nv-binaries/files/eglplatform.h create mode 100644 recipes-bsp/tdx-nv-binaries/files/gles.pc create mode 100644 recipes-bsp/tdx-nv-binaries/files/glesv2.pc create mode 100644 recipes-bsp/tdx-nv-binaries/files/khronos_headers.tgz create mode 100644 recipes-bsp/tdx-nv-binaries/files/mimeapps.list create mode 100644 recipes-bsp/tdx-nv-binaries/files/nvgstplayer.desktop create mode 100644 recipes-bsp/tdx-nv-binaries/files/nvsamples-hardfp.patch create mode 100644 recipes-bsp/tdx-nv-binaries/files/nvsamples-no-binary-shaders.patch create mode 100644 recipes-bsp/tdx-nv-binaries/files/nvsamples-oe.patch (limited to 'recipes-bsp/tdx-nv-binaries/files') diff --git a/recipes-bsp/tdx-nv-binaries/files/aplay.desktop b/recipes-bsp/tdx-nv-binaries/files/aplay.desktop new file mode 100644 index 0000000..ead86f3 --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/aplay.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Type=Application +Name=aplay +Exec=aplay %f +NoDisplay=true diff --git a/recipes-bsp/tdx-nv-binaries/files/egl.pc b/recipes-bsp/tdx-nv-binaries/files/egl.pc new file mode 100644 index 0000000..3af7eec --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/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/recipes-bsp/tdx-nv-binaries/files/eglplatform.h b/recipes-bsp/tdx-nv-binaries/files/eglplatform.h new file mode 100644 index 0000000..72b5f2d --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/eglplatform.h @@ -0,0 +1,147 @@ +#ifndef __eglplatform_h_ +#define __eglplatform_h_ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Platform-specific types and definitions for egl.h + * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "EGL" component "Registry". + */ + +#include + +/* Macros used in EGL function prototype declarations. + * + * EGL functions should be prototyped as: + * + * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); + * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); + * + * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h + */ + +#ifndef EGLAPI +#define EGLAPI KHRONOS_APICALL +#endif + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY KHRONOS_APIENTRY +#endif +#define EGLAPIENTRYP EGLAPIENTRY* + +/* The types NativeDisplayType, NativeWindowType, and NativePixmapType + * are aliases of window-system-dependent types, such as X Display * or + * Windows Device Context. They must be defined in platform-specific + * code below. The EGL-prefixed versions of Native*Type are the same + * types, renamed in EGL 1.3 so all types in the API start with "EGL". + * + * Khronos STRONGLY RECOMMENDS that you use the default definitions + * provided below, since these changes affect both binary and source + * portability of applications using EGL running on different EGL + * implementations. + */ + +#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include + +typedef HDC EGLNativeDisplayType; +typedef HBITMAP EGLNativePixmapType; +typedef HWND EGLNativeWindowType; + +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ + +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; + +#elif defined(WL_EGL_PLATFORM) + +typedef struct wl_display *EGLNativeDisplayType; +typedef struct wl_egl_pixmap *EGLNativePixmapType; +typedef struct wl_egl_window *EGLNativeWindowType; + +#elif defined(__GBM__) + +typedef struct gbm_device *EGLNativeDisplayType; +typedef struct gbm_bo *EGLNativePixmapType; +typedef void *EGLNativeWindowType; + +#elif defined(ANDROID) /* Android */ + +struct ANativeWindow; +struct egl_native_pixmap_t; + +typedef struct ANativeWindow *EGLNativeWindowType; +typedef struct egl_native_pixmap_t *EGLNativePixmapType; +typedef void *EGLNativeDisplayType; + +#elif defined(__unix__) + +/* don't include the X headers here, some define clash with Qt5 symbols */ +#if 1 + +typedef struct _XDisplay *EGLNativeDisplayType; +typedef unsigned long EGLNativePixmapType; +typedef unsigned long EGLNativeWindowType; + +#else + +/* X11 (tentative) */ +#include +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; + +#endif /* MESA_EGL_NO_X11_HEADERS */ + +#else +#error "Platform not recognized" +#endif + +/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ +typedef EGLNativeDisplayType NativeDisplayType; +typedef EGLNativePixmapType NativePixmapType; +typedef EGLNativeWindowType NativeWindowType; + + +/* Define EGLint. This must be a signed integral type large enough to contain + * all legal attribute names and values passed into and out of EGL, whether + * their type is boolean, bitmask, enumerant (symbolic constant), integer, + * handle, or other. While in general a 32-bit integer will suffice, if + * handles are 64 bit types, then EGLint should be defined as a signed 64-bit + * integer type. + */ +typedef khronos_int32_t EGLint; + +#endif /* __eglplatform_h */ diff --git a/recipes-bsp/tdx-nv-binaries/files/gles.pc b/recipes-bsp/tdx-nv-binaries/files/gles.pc new file mode 100644 index 0000000..91387c9 --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/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/recipes-bsp/tdx-nv-binaries/files/glesv2.pc b/recipes-bsp/tdx-nv-binaries/files/glesv2.pc new file mode 100644 index 0000000..356a1cb --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/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/recipes-bsp/tdx-nv-binaries/files/khronos_headers.tgz b/recipes-bsp/tdx-nv-binaries/files/khronos_headers.tgz new file mode 100644 index 0000000..5eb5db7 Binary files /dev/null and b/recipes-bsp/tdx-nv-binaries/files/khronos_headers.tgz differ diff --git a/recipes-bsp/tdx-nv-binaries/files/mimeapps.list b/recipes-bsp/tdx-nv-binaries/files/mimeapps.list new file mode 100644 index 0000000..6a513dc --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/mimeapps.list @@ -0,0 +1,10 @@ +[Added Associations] +video/mpeg=nvgstplayer.desktop; +video/x-msvideo=nvgstplayer.desktop; +video/mp4=nvgstplayer.desktop; +video/quicktime=nvgstplayer.desktop; +video/x-ms-wmv=nvgstplayer.desktop; +video/x-matroska=cd nvgstplayer.desktop; +audio/mpeg=nvgstplayer.desktop; +audio/basic=aplay.desktop; +audio/x-wav=aplay.desktop; diff --git a/recipes-bsp/tdx-nv-binaries/files/nvgstplayer.desktop b/recipes-bsp/tdx-nv-binaries/files/nvgstplayer.desktop new file mode 100644 index 0000000..f85659c --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/nvgstplayer.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=nvgstplayer +Exec=nvgstplayer --uri %u +Terminal=true +NoDisplay=true diff --git a/recipes-bsp/tdx-nv-binaries/files/nvsamples-hardfp.patch b/recipes-bsp/tdx-nv-binaries/files/nvsamples-hardfp.patch new file mode 100644 index 0000000..43376d7 Binary files /dev/null and b/recipes-bsp/tdx-nv-binaries/files/nvsamples-hardfp.patch differ diff --git a/recipes-bsp/tdx-nv-binaries/files/nvsamples-no-binary-shaders.patch b/recipes-bsp/tdx-nv-binaries/files/nvsamples-no-binary-shaders.patch new file mode 100644 index 0000000..73b27a1 --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/nvsamples-no-binary-shaders.patch @@ -0,0 +1,93 @@ +diff -Naur nvsamples.orig/make/nvdefs.mk nvsamples/make/nvdefs.mk +--- nvsamples.orig/make/nvdefs.mk 2012-09-10 19:16:45.299731097 +0200 ++++ nvsamples/make/nvdefs.mk 2012-09-24 19:41:40.659811178 +0200 +@@ -86,7 +86,8 @@ + + NV_CGDIR = $(NV_TOPDIR)/utils/Cg + HEXIFY = $(NV_CGDIR)/hexify.pl +-CGC = $(NV_CGDIR)/$(NV_HOST_OSTYPE)/cgc -quiet ++#prevent binary shaders, the L4T OpenGL drivers do not support them ++#CGC = $(NV_CGDIR)/$(NV_HOST_OSTYPE)/cgc -quiet + SHADER_FIX = $(NV_CGDIR)/$(NV_HOST_OSTYPE)/shaderfix + CGC_CG = $(CGC) + CGC_GLSL = $(CGC) -ogles +@@ -124,3 +127,10 @@ + $(CGC_CG_FRG) -o $*.tmp $< + $(SHADER_FIX) -o $@ $*.tmp + rm -rf $*.tmp ++ ++#deploy source shaders in headerfiles ++%.hglslv: %.glslv ++ $(HEXIFY) $< $@ ++ ++%.hglslf: %.glslf ++ $(HEXIFY) $< $@ + +diff -Naur nvsamples.orig/samples/opengles2/bubble/shaders.c nvsamples/samples/opengles2/bubble/shaders.c +--- nvsamples.orig/samples/opengles2/bubble/shaders.c 2011-05-04 13:36:25.000000000 +0200 ++++ nvsamples/samples/opengles2/bubble/shaders.c 2012-10-16 14:17:57.593654157 +0200 +@@ -88,16 +88,16 @@ + // Otherwise, load and compile the shader sources + prog_bubble = + NvGl2DemoLoadShaderSources( +- "bubble_vert.glslv", "bubble_frag.glslf", GL_FALSE); ++ "shaders/bubble_vert.glslv", "shaders/bubble_frag.glslf", GL_FALSE); + prog_mesh = + NvGl2DemoLoadShaderSources( +- "mesh_vert.glslv", "mesh_frag.glslf", GL_FALSE); ++ "shaders/mesh_vert.glslv", "shaders/mesh_frag.glslf", GL_FALSE); + prog_cube = + NvGl2DemoLoadShaderSources( +- "envCube_vert.glslv", "envCube_frag.glslf", GL_FALSE); ++ "shaders/envCube_vert.glslv", "shaders/envCube_frag.glslf", GL_FALSE); + prog_mouse = + NvGl2DemoLoadShaderSources( +- "mouse_vert.glslv", "mouse_frag.glslf", GL_FALSE); ++ "shaders/mouse_vert.glslv", "shaders/mouse_frag.glslf", GL_FALSE); + # endif + + success = prog_bubble && prog_mesh && prog_cube && prog_mouse; +diff -Naur nvsamples.orig/samples/opengles2/ctree/shaders.c nvsamples/samples/opengles2/ctree/shaders.c +--- nvsamples.orig/samples/opengles2/ctree/shaders.c 2011-05-04 13:36:26.000000000 +0200 ++++ nvsamples/samples/opengles2/ctree/shaders.c 2012-10-16 14:17:16.193651084 +0200 +@@ -130,22 +130,22 @@ + // Otherwise, load and compile the shader sources + prog_solids = + NvGl2DemoLoadShaderSources( +- "lighting_vert.glslv", "solids_frag.glslf", GL_FALSE); ++ "shaders/lighting_vert.glslv", "shaders/solids_frag.glslf", GL_FALSE); + prog_leaves = + NvGl2DemoLoadShaderSources( +- "lighting_vert.glslv", "leaves_frag.glslf", GL_FALSE); ++ "shaders/lighting_vert.glslv", "shaders/leaves_frag.glslf", GL_FALSE); + prog_simplecol = + NvGl2DemoLoadShaderSources( +- "simplecol_vert.glslv", "simplecol_frag.glslf", GL_FALSE); ++ "shaders/simplecol_vert.glslv", "shaders/simplecol_frag.glslf", GL_FALSE); + prog_simpletex = + NvGl2DemoLoadShaderSources( +- "simpletex_vert.glslv", "simpletex_frag.glslf", GL_FALSE); ++ "shaders/simpletex_vert.glslv", "shaders/simpletex_frag.glslf", GL_FALSE); + prog_overlaycol = + NvGl2DemoLoadShaderSources( +- "overlaycol_vert.glslv", "overlaycol_frag.glslf", GL_FALSE); ++ "shaders/overlaycol_vert.glslv", "shaders/overlaycol_frag.glslf", GL_FALSE); + prog_overlaytex = + NvGl2DemoLoadShaderSources( +- "overlaytex_vert.glslv", "overlaytex_frag.glslf", GL_FALSE); ++ "shaders/overlaytex_vert.glslv", "shaders/overlaytex_frag.glslf", GL_FALSE); + # endif + success = prog_solids && prog_leaves + && prog_simplecol && prog_simpletex +diff -Naur nvsamples.orig/samples/opengles2/gears/gears.c nvsamples/samples/opengles2/gears/gears.c +--- nvsamples.orig/samples/opengles2/gears/gears.c 2011-05-04 13:36:27.000000000 +0200 ++++ nvsamples/samples/opengles2/gears/gears.c 2012-10-16 14:14:51.433680786 +0200 +@@ -393,7 +393,7 @@ + // Otherwise, load and compile the shader source + gearShaderProgram = + NvGl2DemoLoadShaderSources( +- "gears_vert.glslv", "gears_frag.glslf", GL_FALSE); ++ "shaders/gears_vert.glslv", "shaders/gears_frag.glslf", GL_FALSE); + # endif + + // Use the program we just loaded diff --git a/recipes-bsp/tdx-nv-binaries/files/nvsamples-oe.patch b/recipes-bsp/tdx-nv-binaries/files/nvsamples-oe.patch new file mode 100644 index 0000000..5b8e137 --- /dev/null +++ b/recipes-bsp/tdx-nv-binaries/files/nvsamples-oe.patch @@ -0,0 +1,50 @@ +diff -Naur nvsamples-1.0-r0.orig/nvsamples/make/nvdefs.mk nvsamples-1.0-r0/nvsamples/make/nvdefs.mk +--- nvsamples/make/nvdefs.mk.orig 2011-12-07 10:22:49.000000000 +0100 ++++ nvsamples/make/nvdefs.mk 2012-07-07 12:37:13.000000000 +0200 +@@ -1,4 +1,4 @@ +-NV_TOPDIR = $(HOME)/nvsamples ++NV_TOPDIR = $(WORKDIR)/nvsamples + NV_PLATFORM_DIR = $(NV_TOPDIR) + NV_KERNDIR = $(NV_TOPDIR)/../kernel + +@@ -42,17 +42,13 @@ + NV_PLATFORM_CPPFLAGS += -DKD + endif + +-NV_PLATFORM_LDFLAGS = ++NV_PLATFORM_LDFLAGS = -L/usr/X11R6.4/lib -lX11 -lICE -lSM + + NV_PLATFORM_SDK_INC_DIR = $(NV_TOPDIR)/include + NV_PLATFORM_SDK_LIB_DIR = $(NV_TOPDIR)/lib-target +-ROOTFS_LIB_DIR = $(NV_TOPDIR)/../T20_LinuxImageV1.0Beta4/rootfs/usr/lib + + NV_PLATFORM_SDK_INC = -I$(NV_PLATFORM_SDK_INC_DIR) +-NV_PLATFORM_SDK_LIB = -L$(NV_PLATFORM_SDK_LIB_DIR) \ +- -L$(ROOTFS_LIB_DIR) \ +- -Xlinker -rpath-link \ +- -Xlinker $(ROOTFS_LIB_DIR) ++NV_PLATFORM_SDK_LIB = -L$(NV_PLATFORM_SDK_LIB_DIR) + NV_PLATFORM_OPT = -Os -O2 + NV_PLATFORM_MATHLIB = -lm + NV_PLATFORM_THREADLIB = -lpthread +@@ -80,13 +76,13 @@ + + # compiler utilities + +-CROSSBIN = $(NV_TOPDIR)/../arm-2009q3/bin/arm-none-linux-gnueabi- +-CC = $(CROSSBIN)gcc +-CXX = $(CROSSBIN)g++ +-LD = $(CROSSBIN)gcc +-AR = $(CROSSBIN)ar +-RANLIB = $(CROSSBIN)ranlib +-STRIP = $(CROSSBIN)strip ++CROSSBIN = arm-angstrom-linux-gnueabi- ++CC ?= $(CROSSBIN)gcc ++CXX ?= $(CROSSBIN)g++ ++LD = $(CC) ++AR ?= $(CROSSBIN)ar ++RANLIB ?= $(CROSSBIN)ranlib ++STRIP ?= $(CROSSBIN)strip + + NV_CGDIR = $(NV_TOPDIR)/utils/Cg + HEXIFY = $(NV_CGDIR)/hexify.pl -- cgit v1.2.3