Skip to contentSkip to conversation

GPU Vivante 1.1.0 support

PATCH In review Otavio Salvador 3 participants 14 messages Mar 23, 2013 – Mar 31, 2013

lore
Share & tools
lore
#0 lore raw

cover GPU Vivante 1.1.0 support

This is the GPU support part, still not including X11 drivers, for review and merging. I have built and tested it in 'x11' and 'non-x11' distros and using buildhistory to compare the image additions/removals.

All seems fine but a second look would be great. Please give it a good review. I tried to keep the patches in single and logical changes but any advice and refactoring suggestion is appreciated.

Adrian Alonso (2):
gpu-viv-bin-mx6q: remove xlib undef macros
gpu-viv-bin-mx6q: group libs based on backend

Otavio Salvador (6):
gpu-viv-bin-mx6q: Upgrade to 1.1.0
gpu-viv-bin-mx6q: Remove GL headers as we should use 'mesa' ones
gpu-viv-bin-mx6q: Add a rdepends of 'libglslc-mx6' in libgles2-mx6
gpu-viv-bin-mx6q: Fix conflicting type definition in HAL header
gpu-viv-bin-mx6q: Remove DRI libraries
gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features

 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 93 +++++++++++++---------
 .../0001-change-header-path-to-HAL.patch           | 19 ++---
 .../fix-conflicting-TLS-definition.patch           | 31 ++++++++
 .../gc_hal_eglplatform-remove-xlib-undefs.patch    | 34 ++++++++
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb     | 14 ++++
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb  |  9 ---
 6 files changed, 143 insertions(+), 57 deletions(-)
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/fix-conflicting-TLS-definition.patch
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_hal_eglplatform-remove-xlib-undefs.patch
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb
 delete mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb
Signature · 1 line
1.8.1
#1 lore raw

PATCH 1/8 gpu-viv-bin-mx6q: Upgrade to 1.1.0

This drops the DirectFB files while we do not have support for it and ensure all packages need to choose the proper backend to link to as we remove the generic link pointing to a default backend.

Change-Id I57b79675ba9e8158d5c79c3455227dac164adc35
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 31 +++++++++++-----------
 .../0001-change-header-path-to-HAL.patch           | 19 ++++++-------
 ...-mx6q_12.09.01.bb => gpu-viv-bin-mx6q_1.1.0.bb} |  5 ++--
 3 files changed, 27 insertions(+), 28 deletions(-)
 rename recipes-graphics/gpu-viv-bin-mx6q/{gpu-viv-bin-mx6q_12.09.01.bb => gpu-viv-bin-mx6q_1.1.0.bb} (51%)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +16 -15
index c7e3eab..8239697 100644
@@ -4,7 +4,7 @@
 DESCRIPTION = "GPU driver and apps for imx6"
 SECTION = "libs"
 LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=092bc28e13d678ceaebe1a40559275fb"
+LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=c831981a5cbb2673318b77fb2f07014c"
 PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 libvivante-dri-mx6"
 
 INC_PR = "r2"
@@ -40,6 +40,7 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
 # FIXME: The provided binary doesn't provide soname. If in future BSP
 # release the libraries are fixed, we can drop this hack.
+REALSOLIBS := "${SOLIBS}"
 SOLIBS = "${SOLIBSDEV}"
 
 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
@@ -54,16 +55,22 @@ do_install () {
     install -d ${D}${libdir}/dri
     install -d ${D}${includedir}
 
-    cp ${S}/usr/lib/*.so ${D}${libdir}
-    cp -axr ${S}/usr/include/* ${D}${includedir}
-
-    cp -axr ${S}/opt ${D}
-
-    # Move DRI library to proper path
-    mv ${D}${libdir}/vivante_dri.so ${D}${libdir}/dri
+    cp -rP ${S}/usr/lib/* ${D}${libdir}
+    cp -rP ${S}/usr/include/* ${D}${includedir}
+    cp -rP ${S}/opt ${D}
 
     find ${D}${libdir} -type f -exec chmod 644 {} \;
     find ${D}${includedir} -type f -exec chmod 644 {} \;
+
+    # FIXME: Drop default library as we need to explicit link to one
+    #        of supported backends
+    rm ${D}${libdir}/libEGL.so \
+       ${D}${libdir}/libGAL.so \
+       ${D}${libdir}/libVIVANTE.so
+
+    # FIXME: Drop directfb backport as 1.4 version is not supported in Yocto
+    rm -r ${D}${libdir}/directfb-1.4-0 \
+          ${D}${libdir}/*-dfb.so
 }
 
 S = "${WORKDIR}/${PN}-${PV}"
@@ -77,9 +84,7 @@ FILES_libclc-mx6 = "${libdir}/libCLC${SOLIBS}"
 FILES_libclc-mx6-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
 FILES_libclc-mx6-dbg = "${libdir}/.debug/libCLC${SOLIBS}"
 
-FILES_libegl-common-mx6 = "${libdir}/libEGL${SOLIBS}"
 FILES_libegl-common-mx6-dev = "${includedir}/EGL ${libdir}/libEGL${SOLIBSDEV}"
-FILES_libegl-common-mx6-dbg = "${libdir}/.debug/libEGL${SOLIBS}"
 
 FILES_libegl-fb-mx6 = "${libdir}/libEGL-fb${SOLIBS}"
 FILES_libegl-fb-mx6-dev = "${libdir}/libEGL-fb${SOLIBSDEV}"
@@ -89,9 +94,7 @@ FILES_libegl-x11-mx6 = "${libdir}/libEGL-x11${SOLIBS}"
 FILES_libegl-x11-mx6-dev = "${libdir}/libEGL-x11${SOLIBSDEV}"
 FILES_libegl-x11-mx6-dbg = "${libdir}/.debug/libEGL-x11${SOLIBS}"
 
-FILES_libgal-common-mx6 = "${libdir}/libGAL${SOLIBS}"
 FILES_libgal-common-mx6-dev = "${includedir}/HAL ${libdir}/libGAL${SOLIBSDEV}"
-FILES_libgal-common-mx6-dbg = "${libdir}/.debug/libGAL${SOLIBS}"
 
 FILES_libgal-fb-mx6 = "${libdir}/libGAL-fb${SOLIBS}"
 FILES_libgal-fb-mx6-dev = "${libdir}/libGAL-fb${SOLIBSDEV}"
@@ -109,7 +112,7 @@ FILES_libgles2-mx6 = "${libdir}/libGLESv2${SOLIBS}"
 FILES_libgles2-mx6-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV}"
 FILES_libgles2-mx6-dbg = "${libdir}/.debug/libGLESv2${SOLIBS}"
 
-FILES_libgl-mx6 = "${libdir}/libGL${SOLIBS}"
+FILES_libgl-mx6 = "${libdir}/libGL${REALSOLIBS}"
 FILES_libgl-mx6-dev = "${includedir}/GL ${libdir}/libGL${SOLIBSDEV}"
 FILES_libgl-mx6-dbg = "${libdir}/.debug/libGL${SOLIBS}"
 
@@ -129,9 +132,7 @@ FILES_libvdk-mx6 = "${libdir}/libVDK${SOLIBS}"
 FILES_libvdk-mx6-dev = "${includedir}/*vdk.h ${libdir}/libVDK${SOLIBSDEV}"
 FILES_libvdk-mx6-dbg = "${libdir}/.debug/libVDK${SOLIBS}"
 
-FILES_libvivante-common-mx6 = "${libdir}/libVIVANTE${SOLIBS}"
 FILES_libvivante-common-mx6-dev = "${includedir}/HAL ${libdir}/libVIVANTE${SOLIBSDEV}"
-FILES_libvivante-common-mx6-dbg = "${libdir}/.debug/libVIVANTE${SOLIBS}"
 
 FILES_libvivante-fb-mx6 = "${libdir}/libVIVANTE-fb${SOLIBS}"
 FILES_libvivante-fb-mx6-dev = "${libdir}/libVIVANTE-fb${SOLIBSDEV}"
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/0001-change-header-path-to-HAL.patch +8 -11
index 31fad1e..dc91d7c 100644
@@ -15,19 +15,16 @@ Signed-off-by: Jeremy Stashluk <[email protected]>
  usr/include/gc_vdk_types.h |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/usr/include/gc_vdk_types.h b/usr/include/gc_vdk_types.h
-index 11514f9..8e3dfe4 100644
---- a/usr/include/gc_vdk_types.h
-+++ b/usr/include/gc_vdk_types.h
-@@ -26,7 +26,7 @@ extern "C" {
+Index: gpu-viv-bin-mx6q-1.1.0/usr/include/gc_vdk_types.h
+===================================================================
+--- gpu-viv-bin-mx6q-1.1.0.orig/usr/include/gc_vdk_types.h
++++ gpu-viv-bin-mx6q-1.1.0/usr/include/gc_vdk_types.h
+@@ -39,7 +39,7 @@ extern "C" {
  #endif
  
  #include <EGL/egl.h>
--#include "gc_hal_eglplatform.h"
-+#include <HAL/gc_hal_eglplatform.h>
+-#include "gc_hal_eglplatform_type.h"
++#include <HAL/gc_hal_eglplatform_type.h>
+ 
  
  /*******************************************************************************
- ** vdkPrivate. *****************************************************************
--- 
-1.7.9.5
-
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb renamed from recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb +3 -2
similarity index 51%
rename from recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb
rename to recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb
index c54ad19..3de9555 100644
@@ -2,8 +2,9 @@
 # Released under the MIT license (see COPYING.MIT for the terms)
 
 PR = "${INC_PR}.0"
+PE = "1"
 
 include gpu-viv-bin-mx6q.inc
 
-SRC_URI[md5sum] = "9f2c43b6eae468df6cc6fd75efd00bc5"
-SRC_URI[sha256sum] = "2cec10c1d69bce75a7c2a4482eb3ed29b171578c3b01c5b4ef2cc868ca327330"
+SRC_URI[md5sum] = "60f4ba65f557fc63fde6dacfeef205a8"
+SRC_URI[sha256sum] = "4238b72a6dad2d075d159bb1e86fb68bbed7c27894ce82c546a8e7c58ae5d683"
Signature · 1 line
1.8.1
#2 lore raw

PATCH 2/8 gpu-viv-bin-mx6q: remove xlib undef macros

In reply to Otavio Salvador

From: Adrian Alonso <[email protected]>

* Remove xlib udef macros
* Distrubuted header files rename some badly named X defines but this breaks compilation on programs that expect this macros.
* Bump PR

Change-Id Iaedbb4506be5f4a641411d9888aa5338b574b7a4
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          |  3 +-
 .../gc_hal_eglplatform-remove-xlib-undefs.patch    | 34 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_hal_eglplatform-remove-xlib-undefs.patch
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +2 -1
index 8239697..3105a60 100644
@@ -7,12 +7,13 @@ LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=c831981a5cbb2673318b77fb2f07014c"
 PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 libvivante-dri-mx6"
 
-INC_PR = "r2"
+INC_PR = "r3"
 
 inherit fsl-eula-unpack
 
 SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
            file://0001-change-header-path-to-HAL.patch \
+           file://gc_hal_eglplatform-remove-xlib-undefs.patch \
           "
 
 PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_hal_eglplatform-remove-xlib-undefs.patch new file +34 -0
new file mode 100644
index 0000000..732a073
@@ -0,0 +1,34 @@
+From c59f9640d185759208f9d55a93b6602936dcb5e8 Mon Sep 17 00:00:00 2001
+From: Adrian Alonso <[email protected]>
+Date: Sat, 26 Jan 2013 17:52:04 -0600
+Subject: [PATCH 2/2] gc_hal_eglplatform: remove xlib undefs
+
+* Remove header undefs for Always and Status definitions
+
+Signed-off-by: Adrian Alonso <[email protected]>
+---
+ usr/include/HAL/gc_hal_eglplatform.h | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/usr/include/HAL/gc_hal_eglplatform.h b/usr/include/HAL/gc_hal_eglplatform.h
+index a968fe7..e80c65a 100644
+--- a/usr/include/HAL/gc_hal_eglplatform.h
++++ b/usr/include/HAL/gc_hal_eglplatform.h
+@@ -341,14 +341,11 @@ typedef Pixmap      HALNativePixmapType;
+ /* Rename some badly named X defines. */
+ #ifdef Status
+ #   define XStatus      int
+-#   undef Status
+ #endif
+ #ifdef Always
+ #   define XAlways      2
+-#   undef Always
+ #endif
+ #ifdef CurrentTime
+-#   undef CurrentTime
+ #   define XCurrentTime 0
+ #endif
+ 
+-- 
+1.8.1
+
Signature · 1 line
1.8.1
#3 lore raw

PATCH 3/8 gpu-viv-bin-mx6q: group libs based on backend

In reply to Otavio Salvador

From: Adrian Alonso <[email protected]>

* Group GPU libs based on backend
* Add GPU libs to packages depending on DISTRO_FEATURES
* Bump PR

Change-Id I08aaee593cc18cb7cf6f3f0ef9a3aff046d87edd
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 71 ++++++++++++++--------
 1 file changed, 46 insertions(+), 25 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +46 -25
index 3105a60..7c52810 100644
@@ -5,9 +5,9 @@ DESCRIPTION = "GPU driver and apps for imx6"
 SECTION = "libs"
 LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=c831981a5cbb2673318b77fb2f07014c"
-PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 libvivante-dri-mx6"
+PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 virtual/dri"
 
-INC_PR = "r3"
+INC_PR = "r5"
 
 inherit fsl-eula-unpack
 
@@ -16,13 +16,18 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
            file://gc_hal_eglplatform-remove-xlib-undefs.patch \
           "
 
-PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
-	libegl-fb-mx6 libegl-fb-mx6-dev libegl-fb-mx6-dbg \
-	libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
-	libegl-common-mx6 libegl-common-mx6-dev libegl-common-mx6-dbg \
-	libgal-fb-mx6 libgal-fb-mx6-dev libgal-fb-mx6-dbg \
+GPU_XLIBS = "libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
 	libgal-x11-mx6 libgal-x11-mx6-dev libgal-x11-mx6-dbg \
-	libgal-common-mx6 libgal-common-mx6-dev libgal-common-mx6-dbg \
+	libvivante-x11-mx6 libvivante-x11-mx6-dev libvivante-x11-mx6-dbg \
+	libvivante-dri-mx6 libvivante-dri-mx6-dev libvivante-dri-mx6-dbg \
+	"
+
+GPU_DFBLIBS = "libegl-dfb-mx6 libegl-dfb-mx6-dev libegl-dfb-mx6-dbg \
+	libgal-dfb-mx6 libgal-dfb-mx6-dev libgal-dfb-mx6-dbg \
+	libvivante-dfb-mx6 libvivante-dfb-mx6-dev libvivante-dfb-mx6-dbg \
+	"
+
+PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libgles-mx6 libgles-mx6-dev libgles-mx6-dbg \
 	libgles2-mx6 libgles2-mx6-dev libgles2-mx6-dbg \
 	libgl-mx6 libgl-mx6-dev libgl-mx6-dbg \
@@ -30,12 +35,16 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libopencl-mx6 libopencl-mx6-dev libopencl-mx6-dbg \
 	libopenvg-mx6 libopenvg-mx6-dev libopenvg-mx6-dbg \
 	libvdk-mx6 libvdk-mx6-dev libvdk-mx6-dbg \
-	libvivante-x11-mx6 libvivante-x11-mx6-dev libvivante-x11-mx6-dbg \
+	libegl-fb-mx6 libegl-fb-mx6-dev libegl-fb-mx6-dbg \
+	libgal-fb-mx6 libgal-fb-mx6-dev libgal-fb-mx6-dbg \
 	libvivante-fb-mx6 libvivante-fb-mx6-dev libvivante-fb-mx6-dbg \
-	libvivante-dri-mx6 libvivante-dri-mx6-dev libvivante-dri-mx6-dbg \
-	libvivante-common-mx6 libvivante-common-mx6-dev libvivante-common-mx6-dbg \
+	${@base_contains("DISTRO_FEATURES", "x11", "${GPU_XLIBS}", "", d)} \
+	${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
 	"
 
+KEEP_XLIBS = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+KEEP_DFBLIBS = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
+
 # Inhibit warnings about files being stripped.
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
@@ -53,15 +62,22 @@ python __anonymous() {
 }
 
 do_install () {
-    install -d ${D}${libdir}/dri
+    install -d ${D}${libdir}
     install -d ${D}${includedir}
 
-    cp -rP ${S}/usr/lib/* ${D}${libdir}
-    cp -rP ${S}/usr/include/* ${D}${includedir}
-    cp -rP ${S}/opt ${D}
+    cp ${S}/usr/lib/*.so ${D}${libdir}
+    cp -axr ${S}/usr/include/* ${D}${includedir}
+    cp -axr ${S}/opt ${D}
 
-    find ${D}${libdir} -type f -exec chmod 644 {} \;
-    find ${D}${includedir} -type f -exec chmod 644 {} \;
+    if [ "${KEEP_XLIBS}" = "no" ]; then
+        rm ${D}${libdir}/*-x11.so
+    else
+        install -d ${D}${libdir}/dri
+        cp -ax ${S}/usr/lib/dri/* ${D}${libdir}/dri
+    fi
+    if [ "${KEEP_DFBLIBS}" = "no" ]; then
+        rm ${D}${libdir}/*-dfb.so
+    fi
 
     # FIXME: Drop default library as we need to explicit link to one
     #        of supported backends
@@ -69,9 +85,8 @@ do_install () {
        ${D}${libdir}/libGAL.so \
        ${D}${libdir}/libVIVANTE.so
 
-    # FIXME: Drop directfb backport as 1.4 version is not supported in Yocto
-    rm -r ${D}${libdir}/directfb-1.4-0 \
-          ${D}${libdir}/*-dfb.so
+    find ${D}${libdir} -type f -exec chmod 644 {} \;
+    find ${D}${includedir} -type f -exec chmod 644 {} \;
 }
 
 S = "${WORKDIR}/${PN}-${PV}"
@@ -85,8 +100,6 @@ FILES_libclc-mx6 = "${libdir}/libCLC${SOLIBS}"
 FILES_libclc-mx6-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
 FILES_libclc-mx6-dbg = "${libdir}/.debug/libCLC${SOLIBS}"
 
-FILES_libegl-common-mx6-dev = "${includedir}/EGL ${libdir}/libEGL${SOLIBSDEV}"
-
 FILES_libegl-fb-mx6 = "${libdir}/libEGL-fb${SOLIBS}"
 FILES_libegl-fb-mx6-dev = "${libdir}/libEGL-fb${SOLIBSDEV}"
 FILES_libegl-fb-mx6-dbg = "${libdir}/.debug/libEGL-fb${SOLIBS}"
@@ -95,7 +108,9 @@ FILES_libegl-x11-mx6 = "${libdir}/libEGL-x11${SOLIBS}"
 FILES_libegl-x11-mx6-dev = "${libdir}/libEGL-x11${SOLIBSDEV}"
 FILES_libegl-x11-mx6-dbg = "${libdir}/.debug/libEGL-x11${SOLIBS}"
 
-FILES_libgal-common-mx6-dev = "${includedir}/HAL ${libdir}/libGAL${SOLIBSDEV}"
+FILES_libegl-dfb-mx6 = "${libdir}/libEGL-dfb${SOLIBS}"
+FILES_libegl-dfb-mx6-dev = "${libdir}/libEGL-dfb${SOLIBSDEV}"
+FILES_libegl-dfb-mx6-dbg = "${libdir}/.debug/libEGL-dfb${SOLIBS}"
 
 FILES_libgal-fb-mx6 = "${libdir}/libGAL-fb${SOLIBS}"
 FILES_libgal-fb-mx6-dev = "${libdir}/libGAL-fb${SOLIBSDEV}"
@@ -105,6 +120,10 @@ FILES_libgal-x11-mx6 = "${libdir}/libGAL-x11${SOLIBS}"
 FILES_libgal-x11-mx6-dev = "${libdir}/libGAL-x11${SOLIBSDEV}"
 FILES_libgal-x11-mx6-dbg = "${libdir}/.debug/libGAL-x11${SOLIBS}"
 
+FILES_libgal-dfb-mx6 = "${libdir}/libGAL-dfb${SOLIBS}"
+FILES_libgal-dfb-mx6-dev = "${libdir}/libGAL-dfb${SOLIBSDEV}"
+FILES_libgal-dfb-mx6-dbg = "${libdir}/.debug/libGAL-dfb${SOLIBS}"
+
 FILES_libgles-mx6 = "${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBS}"
 FILES_libgles-mx6-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV}"
 FILES_libgles-mx6-dbg = "${libdir}/.debug/libGLESv1*${SOLIBS} ${libdir}/.debug/libGLES_*${SOLIBS}"
@@ -133,8 +152,6 @@ FILES_libvdk-mx6 = "${libdir}/libVDK${SOLIBS}"
 FILES_libvdk-mx6-dev = "${includedir}/*vdk.h ${libdir}/libVDK${SOLIBSDEV}"
 FILES_libvdk-mx6-dbg = "${libdir}/.debug/libVDK${SOLIBS}"
 
-FILES_libvivante-common-mx6-dev = "${includedir}/HAL ${libdir}/libVIVANTE${SOLIBSDEV}"
-
 FILES_libvivante-fb-mx6 = "${libdir}/libVIVANTE-fb${SOLIBS}"
 FILES_libvivante-fb-mx6-dev = "${libdir}/libVIVANTE-fb${SOLIBSDEV}"
 FILES_libvivante-fb-mx6-dbg = "${libdir}/.debug/libVIVANTE-fb${SOLIBS}"
@@ -143,6 +160,10 @@ FILES_libvivante-x11-mx6 = "${libdir}/libVIVANTE-x11${SOLIBS}"
 FILES_libvivante-x11-mx6-dev = "${libdir}/libVIVANTE-x11${SOLIBSDEV}"
 FILES_libvivante-x11-mx6-dbg = "${libdir}/.debug/libVIVANTE-x11${SOLIBS}"
 
+FILES_libvivante-dfb-mx6 = "${libdir}/libVIVANTE-dfb${SOLIBS}"
+FILES_libvivante-dfb-mx6-dev = "${libdir}/libVIVANTE-dfb${SOLIBSDEV}"
+FILES_libvivante-dfb-mx6-dbg = "${libdir}/.debug/libVIVANTE-dfb${SOLIBS}"
+
 FILES_libvivante-dri-mx6 = "${libdir}/dri/vivante_dri${SOLIBS}"
 FILES_libvivante-dri-mx6-dev = ""
 FILES_libvivante-dri-mx6-dbg = "${libdir}/dri/.debug/vivante_dri${SOLIBS}"
Signature · 1 line
1.8.1
#4 lore raw

PATCH 4/8 gpu-viv-bin-mx6q: Remove GL headers as we should use 'mesa' ones

In reply to Otavio Salvador

The Xorg GLX extension requires updated GL headers to be able to run so we won't ship the Vivante specific headers.

Change-Id I6e6c094ca120104f03a2c1f6195e68716f6a370d
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +1 -0
index 7c52810..fd420c3 100644
@@ -67,6 +67,7 @@ do_install () {
 
     cp ${S}/usr/lib/*.so ${D}${libdir}
     cp -axr ${S}/usr/include/* ${D}${includedir}
+    rm -r ${D}${includedir}/GL
     cp -axr ${S}/opt ${D}
 
     if [ "${KEEP_XLIBS}" = "no" ]; then
Signature · 1 line
1.8.1
#5 lore raw

PATCH 5/8 gpu-viv-bin-mx6q: Add a rdepends of 'libglslc-mx6' in libgles2-mx6

In reply to Otavio Salvador

This fixes runtime errors as:

,----

| VertexShader: chiclet.vert: comiple error
| FragmentShader: chiclet.frag: comiple error
| ShaderProgram: null vertex program
| Segmentation fault

`----

The rdepends needs to be explicitly add as the library is loaded at runtime so it is not possible to discovery that it is required automatically.

Change-Id I39c0c1c8019f9fd5c0561f9ebddeeb31f31c6e97
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +1 -0
index fd420c3..e0a8fb9 100644
@@ -132,6 +132,7 @@ FILES_libgles-mx6-dbg = "${libdir}/.debug/libGLESv1*${SOLIBS} ${libdir}/.debug/l
 FILES_libgles2-mx6 = "${libdir}/libGLESv2${SOLIBS}"
 FILES_libgles2-mx6-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV}"
 FILES_libgles2-mx6-dbg = "${libdir}/.debug/libGLESv2${SOLIBS}"
+RDEPENDS_libgles2-mx6 = "libglslc-mx6"
 
 FILES_libgl-mx6 = "${libdir}/libGL${REALSOLIBS}"
 FILES_libgl-mx6-dev = "${includedir}/GL ${libdir}/libGL${SOLIBSDEV}"
Signature · 1 line
1.8.1
#6 lore raw

PATCH 6/8 gpu-viv-bin-mx6q: Fix conflicting type definition in HAL header

In reply to Otavio Salvador
Change-Id I37567a888ee02bfb55a34f36fe623938f7a07c18
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          |  6 +----
 .../fix-conflicting-TLS-definition.patch           | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 5 deletions(-)
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/fix-conflicting-TLS-definition.patch
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +1 -5
index e0a8fb9..80ab5e4 100644
@@ -14,6 +14,7 @@ inherit fsl-eula-unpack
 SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
            file://0001-change-header-path-to-HAL.patch \
            file://gc_hal_eglplatform-remove-xlib-undefs.patch \
+           file://fix-conflicting-TLS-definition.patch \
           "
 
 GPU_XLIBS = "libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
@@ -30,7 +31,6 @@ GPU_DFBLIBS = "libegl-dfb-mx6 libegl-dfb-mx6-dev libegl-dfb-mx6-dbg \
 PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libgles-mx6 libgles-mx6-dev libgles-mx6-dbg \
 	libgles2-mx6 libgles2-mx6-dev libgles2-mx6-dbg \
-	libgl-mx6 libgl-mx6-dev libgl-mx6-dbg \
 	libglslc-mx6 libglslc-mx6-dev libglslc-mx6-dbg \
 	libopencl-mx6 libopencl-mx6-dev libopencl-mx6-dbg \
 	libopenvg-mx6 libopenvg-mx6-dev libopenvg-mx6-dbg \
@@ -134,10 +134,6 @@ FILES_libgles2-mx6-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV}"
 FILES_libgles2-mx6-dbg = "${libdir}/.debug/libGLESv2${SOLIBS}"
 RDEPENDS_libgles2-mx6 = "libglslc-mx6"
 
-FILES_libgl-mx6 = "${libdir}/libGL${REALSOLIBS}"
-FILES_libgl-mx6-dev = "${includedir}/GL ${libdir}/libGL${SOLIBSDEV}"
-FILES_libgl-mx6-dbg = "${libdir}/.debug/libGL${SOLIBS}"
-
 FILES_libglslc-mx6 = "${libdir}/libGLSLC${SOLIBS}"
 FILES_libglslc-mx6-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}"
 FILES_libglslc-mx6-dbg = "${libdir}/.debug/libGLSLC${SOLIBS}"
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/fix-conflicting-TLS-definition.patch new file +31 -0
new file mode 100644
index 0000000..3eac116
@@ -0,0 +1,31 @@
+Avoid conflicting types with Xorg newer code
+
+Upstream-Status: Pending
+Signed-off-by: Otavio Salvador <[email protected]>
+
+Index: gpu-viv-bin-mx6q-1.1.0/usr/include/HAL/gc_hal_base.h
+===================================================================
+--- gpu-viv-bin-mx6q-1.1.0.orig/usr/include/HAL/gc_hal_base.h
++++ gpu-viv-bin-mx6q-1.1.0/usr/include/HAL/gc_hal_base.h
+@@ -101,7 +101,7 @@ extern gcsPLS gcPLS;
+ typedef struct _gcsTLS * gcsTLS_PTR;
+ 
+ typedef void (* gctTLS_DESTRUCTOR) (
+-    gcsTLS_PTR TLS
++    gcsTLS_PTR pTLS
+     );
+ 
+ typedef struct _gcsTLS
+@@ -648,10 +648,10 @@ gcoOS_SetPLSValue(
+ /* Get access to the thread local storage. */
+ gceSTATUS
+ gcoOS_GetTLS(
+-    OUT gcsTLS_PTR * TLS
++    OUT gcsTLS_PTR * pTLS
+     );
+ 
+-    /* Copy the TLS from a source thread. */
++    /* Copy the pTLS from a source thread. */
+     gceSTATUS gcoOS_CopyTLS(IN gcsTLS_PTR Source);
+ 
+ /* Destroy the objects associated with the current thread. */
Signature · 1 line
1.8.1
#7 lore raw

PATCH 7/8 gpu-viv-bin-mx6q: Remove DRI libraries

In reply to Otavio Salvador

The DRI library is build so we should provide the same library here.

Change-Id I170e107f7a8fda5de565e8b39a8601422d44350d
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +2 -11
index 80ab5e4..ce23f2e 100644
@@ -5,7 +5,7 @@ DESCRIPTION = "GPU driver and apps for imx6"
 SECTION = "libs"
 LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=c831981a5cbb2673318b77fb2f07014c"
-PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 virtual/dri"
+PROVIDES += "virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2"
 
 INC_PR = "r5"
 
@@ -20,7 +20,6 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
 GPU_XLIBS = "libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
 	libgal-x11-mx6 libgal-x11-mx6-dev libgal-x11-mx6-dbg \
 	libvivante-x11-mx6 libvivante-x11-mx6-dev libvivante-x11-mx6-dbg \
-	libvivante-dri-mx6 libvivante-dri-mx6-dev libvivante-dri-mx6-dbg \
 	"
 
 GPU_DFBLIBS = "libegl-dfb-mx6 libegl-dfb-mx6-dev libegl-dfb-mx6-dbg \
@@ -72,9 +71,6 @@ do_install () {
 
     if [ "${KEEP_XLIBS}" = "no" ]; then
         rm ${D}${libdir}/*-x11.so
-    else
-        install -d ${D}${libdir}/dri
-        cp -ax ${S}/usr/lib/dri/* ${D}${libdir}/dri
     fi
     if [ "${KEEP_DFBLIBS}" = "no" ]; then
         rm ${D}${libdir}/*-dfb.so
@@ -94,8 +90,7 @@ S = "${WORKDIR}/${PN}-${PV}"
 
 FILES_${PN} += "/opt"
 FILES_${PN}-dev = "${includedir}"
-FILES_${PN}-dbg = "${libdir}/.debug ${libdir}/dri/.debug \
-                   /opt/viv_samples/*/*/.debug"
+FILES_${PN}-dbg = "${libdir}/.debug /opt/viv_samples/*/*/.debug"
 
 FILES_libclc-mx6 = "${libdir}/libCLC${SOLIBS}"
 FILES_libclc-mx6-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
@@ -162,9 +157,5 @@ FILES_libvivante-dfb-mx6 = "${libdir}/libVIVANTE-dfb${SOLIBS}"
 FILES_libvivante-dfb-mx6-dev = "${libdir}/libVIVANTE-dfb${SOLIBSDEV}"
 FILES_libvivante-dfb-mx6-dbg = "${libdir}/.debug/libVIVANTE-dfb${SOLIBS}"
 
-FILES_libvivante-dri-mx6 = "${libdir}/dri/vivante_dri${SOLIBS}"
-FILES_libvivante-dri-mx6-dev = ""
-FILES_libvivante-dri-mx6-dbg = "${libdir}/dri/.debug/vivante_dri${SOLIBS}"
-
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(mx6)"
Signature · 1 line
1.8.1
#8 lore raw

PATCH 8/8 gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features

In reply to Otavio Salvador

As we cannot allow concurrent build of applications targetting different backends we use the distro features to package the need libraries for the backend. Currently it does:

X11 support, if 'x11' feature is enabled
DirectFB support, if 'x11' is not enabled AND 'directfb is enabled FrameBuffer, fallback

As 1.1.0 version of the Vivante libraries are build against DirectFB 1.4 we cannot support it for now, so we explicitly disable it for this version so it is easy to add it back when new version, supporting newer DirectFB, is released.

Change-Id Ia8973b8107155b8a5f7fadc50d2290c1d5f28363
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 25 ++++++++++++++--------
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb     |  4 ++++
 2 files changed, 20 insertions(+), 9 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +16 -9
index ce23f2e..e8e491e 100644
@@ -41,8 +41,8 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
 	"
 
-KEEP_XLIBS = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-KEEP_DFBLIBS = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
+USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
 
 # Inhibit warnings about files being stripped.
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -69,19 +69,26 @@ do_install () {
     rm -r ${D}${includedir}/GL
     cp -axr ${S}/opt ${D}
 
-    if [ "${KEEP_XLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-x11.so
-    fi
-    if [ "${KEEP_DFBLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-dfb.so
-    fi
-
     # FIXME: Drop default library as we need to explicit link to one
     #        of supported backends
     rm ${D}${libdir}/libEGL.so \
        ${D}${libdir}/libGAL.so \
        ${D}${libdir}/libVIVANTE.so
 
+    if [ "${USE_X11}" = "yes" ]; then
+        find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+    else
+        if [ "${USE_DFB}" = "yes" ]; then
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+        else
+            # Regular framebuffer
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        fi
+    fi
+
     find ${D}${libdir} -type f -exec chmod 644 {} \;
     find ${D}${includedir} -type f -exec chmod 644 {} \;
 }
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb +4 -0
index 3de9555..994c11c 100644
@@ -8,3 +8,7 @@ include gpu-viv-bin-mx6q.inc
 
 SRC_URI[md5sum] = "60f4ba65f557fc63fde6dacfeef205a8"
 SRC_URI[sha256sum] = "4238b72a6dad2d075d159bb1e86fb68bbed7c27894ce82c546a8e7c58ae5d683"
+
+# FIXME: 1.1.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so
+# disable it for now
+USE_DFB = "no"
Signature · 1 line
1.8.1
#11 lore raw
In reply to Otavio Salvador

Hi,

I have done some testing with these patches today, and to me they look good. I use them to build an image using qt5 with EGLFS platform plugin (so no X11) which runs nicely, and the shader lib (libglsl*) is deployed correctly into the image.

Cheers,
Erik Botö

Quoted 39 lines · Otavio Salvador

This is the GPU support part, still not including X11 drivers, for review and merging. I have built and tested it in 'x11' and 'non-x11' distros and using buildhistory to compare the image additions/removals.

All seems fine but a second look would be great. Please give it a good review. I tried to keep the patches in single and logical changes but any advice and refactoring suggestion is appreciated.

Adrian Alonso (2):
gpu-viv-bin-mx6q: remove xlib undef macros
gpu-viv-bin-mx6q: group libs based on backend

Otavio Salvador (6):
gpu-viv-bin-mx6q: Upgrade to 1.1.0
gpu-viv-bin-mx6q: Remove GL headers as we should use 'mesa' ones
gpu-viv-bin-mx6q: Add a rdepends of 'libglslc-mx6' in libgles2-mx6
gpu-viv-bin-mx6q: Fix conflicting type definition in HAL header
gpu-viv-bin-mx6q: Remove DRI libraries
gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features

 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 93 +++++++++++++---------
 .../0001-change-header-path-to-HAL.patch           | 19 ++---
 .../fix-conflicting-TLS-definition.patch           | 31 ++++++++
 .../gc_hal_eglplatform-remove-xlib-undefs.patch    | 34 ++++++++
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb     | 14 ++++
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb  |  9 ---
 6 files changed, 143 insertions(+), 57 deletions(-)
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/fix-conflicting-TLS-definition.patch
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_hal_eglplatform-remove-xlib-undefs.patch
 create mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb
 delete mode 100644 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_12.09.01.bb

--
1.8.1

_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

#12 lore raw
Quoted 6 lines · Erik Botö

Hi,

I have done some testing with these patches today, and to me they look good. I use them to build an image using qt5 with EGLFS platform plugin (so no X11) which runs nicely, and the shader lib (libglsl*) is deployed correctly into the image.

\m/

Thanks by letting us know :-D

I will wait some more time and see if someone else can report a test status and push them.

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

#13 lore raw
In reply to Otavio Salvador
Quoted 7 lines · Otavio Salvador

This is the GPU support part, still not including X11 drivers, for review and merging. I have built and tested it in 'x11' and 'non-x11' distros and using buildhistory to compare the image additions/removals.

All seems fine but a second look would be great. Please give it a good review. I tried to keep the patches in single and logical changes but any advice and refactoring suggestion is appreciated.

Merged onto master.

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

#9 lore raw

Re: [meta-fsl-arm][PATCH 8/8] gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features

In reply to Otavio Salvador

Otavio,

Should this change cause an error when building fsl-image-test?

I'm getting the following error:

| Computing transaction...error: Can't install gpu-viv-bin-mx6q-1:1.1.0-r5.0@wandboard_dual: no package provides libgal-fb-mx6 >= 12.09.01
|
| Saving cache...
|
| ERROR: Function failed: do_rootfs (see /mnt/YOCTOFSL/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/fsl-image-test/1.0-r0/temp/log.do_rootfs.12739 for further information)

ERROR: Task 7 (/mnt/YOCTOFSL/fsl-community-bsp/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-test.bb, do_rootfs) failed with exit code '1'

Thanks,
John

Quoted 82 lines · Otavio Salvador

As we cannot allow concurrent build of applications targetting different backends we use the distro features to package the need libraries for the backend. Currently it does:

X11 support, if 'x11' feature is enabled
DirectFB support, if 'x11' is not enabled AND 'directfb is enabled FrameBuffer, fallback

As 1.1.0 version of the Vivante libraries are build against DirectFB 1.4 we cannot support it for now, so we explicitly disable it for this version so it is easy to add it back when new version, supporting newer DirectFB, is released.

Change-Id Ia8973b8107155b8a5f7fadc50d2290c1d5f28363
---
  .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 25 ++++++++++++++--------
  .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb     |  4 ++++
  2 files changed, 20 insertions(+), 9 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +16 -9
index ce23f2e..e8e491e 100644
@@ -41,8 +41,8 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
  	${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
  	"
 
-KEEP_XLIBS = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-KEEP_DFBLIBS = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
+USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
 
  # Inhibit warnings about files being stripped.
  INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -69,19 +69,26 @@ do_install () {
      rm -r ${D}${includedir}/GL
      cp -axr ${S}/opt ${D}
 
-    if [ "${KEEP_XLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-x11.so
-    fi
-    if [ "${KEEP_DFBLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-dfb.so
-    fi
-
      # FIXME: Drop default library as we need to explicit link to one
      #        of supported backends
      rm ${D}${libdir}/libEGL.so \
         ${D}${libdir}/libGAL.so \
         ${D}${libdir}/libVIVANTE.so
 
+    if [ "${USE_X11}" = "yes" ]; then
+        find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+    else
+        if [ "${USE_DFB}" = "yes" ]; then
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+        else
+            # Regular framebuffer
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        fi
+    fi
+
      find ${D}${libdir} -type f -exec chmod 644 {} \;
      find ${D}${includedir} -type f -exec chmod 644 {} \;
  }
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb +4 -0
index 3de9555..994c11c 100644
@@ -8,3 +8,7 @@ include gpu-viv-bin-mx6q.inc
 
  SRC_URI[md5sum] = "60f4ba65f557fc63fde6dacfeef205a8"
  SRC_URI[sha256sum] = "4238b72a6dad2d075d159bb1e86fb68bbed7c27894ce82c546a8e7c58ae5d683"
+
+# FIXME: 1.1.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so
+# disable it for now
+USE_DFB = "no"
#10 lore raw

Re: [meta-fsl-arm][PATCH 8/8] gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features

I'm sure this isn't the right solution, but to narrow down the error, I've confirmed that changing the following line in meta-fsl-arm/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb that the build of fsl-image-test completes.

# FIXME: 1.1.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so

# disable it for now
- USE_DFB = "no"
+ USE_DFB = "yes"
Quoted 109 lines · John Weber

Otavio,

Should this change cause an error when building fsl-image-test?

I'm getting the following error:

| Computing transaction...error: Can't install gpu-viv-bin-mx6q-1:1.1.0-r5.0@wandboard_dual: no package provides libgal-fb-mx6

Quoted 1 line

= 12.09.01

|
| Saving cache...
|
| ERROR: Function failed: do_rootfs (see

/mnt/YOCTOFSL/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/fsl-image-test/1.0-r0/temp/log.do_rootfs.12739 for further information)
ERROR: Task 7 (/mnt/YOCTOFSL/fsl-community-bsp/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-test.bb,
do_rootfs) failed with exit code '1'

Thanks,
John

Quoted 86 lines · Otavio Salvador

As we cannot allow concurrent build of applications targetting different backends we use the distro features to package the need libraries for the backend. Currently it does:

X11 support, if 'x11' feature is enabled
DirectFB support, if 'x11' is not enabled AND 'directfb is enabled FrameBuffer, fallback

As 1.1.0 version of the Vivante libraries are build against DirectFB 1.4 we cannot support it for now, so we explicitly disable it for this version so it is easy to add it back when new version, supporting newer DirectFB, is released.

Change-Id Ia8973b8107155b8a5f7fadc50d2290c1d5f28363
---
  .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 25 ++++++++++++++--------
  .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb     |  4 ++++
  2 files changed, 20 insertions(+), 9 deletions(-)
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +0 -2
index ce23f2e..e8e491e 100644
@@ -41,8 +41,8 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
      ${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
      "
 
-KEEP_XLIBS = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-KEEP_DFBLIBS = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no",

d)}"

recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc +16 -7
+USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
 
  # Inhibit warnings about files being stripped.
  INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -69,19 +69,26 @@ do_install () {
      rm -r ${D}${includedir}/GL
      cp -axr ${S}/opt ${D}
 
-    if [ "${KEEP_XLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-x11.so
-    fi
-    if [ "${KEEP_DFBLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-dfb.so
-    fi
-
      # FIXME: Drop default library as we need to explicit link to one
      #        of supported backends
      rm ${D}${libdir}/libEGL.so \
         ${D}${libdir}/libGAL.so \
         ${D}${libdir}/libVIVANTE.so
 
+    if [ "${USE_X11}" = "yes" ]; then
+        find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+    else
+        if [ "${USE_DFB}" = "yes" ]; then
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+        else
+            # Regular framebuffer
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        fi
+    fi
+
      find ${D}${libdir} -type f -exec chmod 644 {} \;
      find ${D}${includedir} -type f -exec chmod 644 {} \;
  }
recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb +0 -0
index 3de9555..994c11c 100644
@@ -8,3 +8,7 @@ include gpu-viv-bin-mx6q.inc
 
  SRC_URI[md5sum] = "60f4ba65f557fc63fde6dacfeef205a8"
  SRC_URI[sha256sum] =

"4238b72a6dad2d075d159bb1e86fb68bbed7c27894ce82c546a8e7c58ae5d683"

recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb +4 -0
+
+# FIXME: 1.1.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so
+# disable it for now
+USE_DFB = "no"