aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
authorPhilip Craig <phil@blackmoth.com.au>2013-06-27 12:42:19 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2013-07-02 12:14:37 -0300
commitc39839a2cf85e8ee616364c70426dca13bf5a229 (patch)
treebb7ce92a897ce3cb6e248cba25cd5fa47d798791 /recipes-graphics
parentd48e4022824a13206f2a893759cf332a174e6d7d (diff)
downloadmeta-fsl-arm-c39839a2cf85e8ee616364c70426dca13bf5a229.tar.gz
meta-fsl-arm-c39839a2cf85e8ee616364c70426dca13bf5a229.tar.bz2
meta-fsl-arm-c39839a2cf85e8ee616364c70426dca13bf5a229.zip
gpu-viv-bin-mx6q.inc: fix libEGL and libGLESv2 installation
Previously, we were only packaging libEGL.so and libGLESv2.so. This worked at runtime because ldconfig installed symlinks for the soname of these libraries (libEGL.so.1 and libGLESv2.so.2). However, there are situations where we need the soname version of these libraries at build time. Specifically, if these libraries are indirectly referenced by another library, then the linker looks them up using the soname. This patch changes the installation of these libraries to the normal way of installing. That is, we install them as the soname, and create symlinks for libEGL.so and libGLESv2.so.2. This also matches the way that these libraries are provided in the source. The one catch with that is libEGL.so also tries to load libGLESv2.so directly at runtime, rather than using the soname, so we need to install the libGLESv2.so symlink to the rootfs also, and we need to disable a QA error to allow this. libGL and libGLESv1 are fixed in a similar manner, but I haven't tested them. This fixes the following errors when building qtgstreamer: oe-core/build/tmp-eglibc/sysroots/i686-linux/usr/libexec/armv7a-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2/ld: warning: libGLESv2.so.2, needed by oe-core/build/tmp-eglibc/sysroots/imx6qsabrelite/usr/lib/libQt5Gui.so.5.0.2, not found (try using -rpath or -rpath-link) oe-core/build/tmp-eglibc/sysroots/i686-linux/usr/libexec/armv7a-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2/ld: warning: libEGL.so.1, needed by oe-core/build/tmp-eglibc/sysroots/imx6qsabrelite/usr/lib/libQt5Gui.so.5.0.2, not found (try using -rpath or -rpath-link) Change-Id: I8e0a2175b6d6bd1a6972c79c8532061edd8dca0d Signed-off-by: Philip Craig <phil@blackmoth.com.au>
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc45
1 files changed, 20 insertions, 25 deletions
diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
index cbcceba..b007079 100644
--- a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
+++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
@@ -55,14 +55,14 @@ SOLIBS = "${SOLIBSDEV}"
python __anonymous() {
packages = d.getVar('PACKAGES', True).split()
for p in packages:
- d.setVar("INSANE_SKIP_%s" % p, "ldflags")
+ d.appendVar("INSANE_SKIP_%s" % p, " ldflags")
}
do_install () {
install -d ${D}${libdir}
install -d ${D}${includedir}
- cp ${S}/usr/lib/*.so ${D}${libdir}
+ cp -a ${S}/usr/lib/*.so* ${D}${libdir}
cp -axr ${S}/usr/include/* ${D}${includedir}
cp -axr ${S}/opt ${D}
@@ -71,12 +71,11 @@ do_install () {
# FIXME: Remove Wayland contents
rm -r ${D}${includedir}/wayland-viv
find ${D}${libdir} -name '*-wl.so' -exec rm '{}' ';'
- rm ${D}${libdir}/*wayland*.so
+ rm ${D}${libdir}/*wayland*.so*
if [ "${USE_X11}" = "yes" ]; then
cp -r ${S}/usr/lib/dri ${D}${libdir}
- find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
- find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+ backend=x11
install -m 0644 ${WORKDIR}/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc
install -m 0644 ${WORKDIR}/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
@@ -87,31 +86,22 @@ do_install () {
install -m 0644 ${WORKDIR}/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
if [ "${USE_DFB}" = "yes" ]; then
- find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
- find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+ backend=dfb
else
# Regular framebuffer
- find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
- find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+ backend=fb
fi
fi
# We'll only have one backend here so we rename it to generic name
# and avoid rework in other packages, when possible
- rm ${D}${libdir}/libEGL.so ${D}${libdir}/libGAL.so \
- ${D}${libdir}/libVIVANTE.so
+ mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1
+ ln -sf libEGL.so.1 ${D}${libdir}/libEGL.so
+ mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so
+ mv ${D}${libdir}/libVIVANTE-${backend}.so ${D}${libdir}/libVIVANTE.so
- renamed=
for backend in x11 fb dfb; do
- for f in $(find ${D}${libdir} -name "*-$backend.so"); do
- if [ -n "$renamed" ] && [ "$renamed" != "$backend" ]; then
- bberror "More than one GPU backend is installed ($backend and $renamed)."
- exit 1
- fi
-
- renamed=$backend
- mv $f $(echo $f | sed "s,-$backend\.so,.so,g")
- done
+ find ${D}${libdir} -name "*-$backend.so" -exec rm '{}' ';'
done
find ${D}${libdir} -type f -exec chmod 644 {} \;
@@ -128,7 +118,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-mx6 = "${libdir}/libEGL${SOLIBS}"
+FILES_libegl-mx6 = "${libdir}/libEGL${REALSOLIBS}"
FILES_libegl-mx6-dev = "${libdir}/libEGL${SOLIBSDEV} ${libdir}/pkgconfig/egl.pc"
FILES_libegl-mx6-dbg = "${libdir}/.debug/libEGL${SOLIBS}"
@@ -136,14 +126,19 @@ FILES_libgal-mx6 = "${libdir}/libGAL${SOLIBS}"
FILES_libgal-mx6-dev = "${libdir}/libGAL${SOLIBSDEV}"
FILES_libgal-mx6-dbg = "${libdir}/.debug/libGAL${SOLIBS}"
-FILES_libgl-mx6 = "${libdir}/libGL${SOLIBS}"
+FILES_libgl-mx6 = "${libdir}/libGL${REALSOLIBS}"
+FILES_libgl-mx6-dev = "${libdir}/libGL${SOLIBSDEV}"
FILES_libgl-mx6-dbg = "${libdir}/.debug/libGL.${SOLIBS}"
-FILES_libgles-mx6 = "${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBS}"
+# libEGL needs to open libGLESv1.so
+INSANE_SKIP_libgles-mx6 += "dev-so"
+FILES_libgles-mx6 = "${libdir}/libGLESv1*${REALSOLIBS} ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBS}"
FILES_libgles-mx6-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV} ${libdir}/pkgconfig/glesv1_cm.pc"
FILES_libgles-mx6-dbg = "${libdir}/.debug/libGLESv1*${SOLIBS} ${libdir}/.debug/libGLES_*${SOLIBS}"
-FILES_libgles2-mx6 = "${libdir}/libGLESv2${SOLIBS}"
+# libEGL needs to open libGLESv2.so
+INSANE_SKIP_libgles2-mx6 += "dev-so"
+FILES_libgles2-mx6 = "${libdir}/libGLESv2${REALSOLIBS} ${libdir}/libGLESv2${SOLIBS}"
FILES_libgles2-mx6-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV} ${libdir}/pkgconfig/glesv2.pc"
FILES_libgles2-mx6-dbg = "${libdir}/.debug/libGLESv2${SOLIBS}"
RDEPENDS_libgles2-mx6 = "libglslc-mx6"