aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMadhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>2018-12-11 07:40:18 -0800
committerManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2019-01-01 20:03:46 -0800
commitb070d521bb108b2c84ca3875e40f69b964b651f3 (patch)
treeed222f50712d22809cdc12bbca9839cae6af8597
parent55175036a45e4a590baca71fa4d29cdbab04b5ac (diff)
downloadmeta-xilinx-b070d521bb108b2c84ca3875e40f69b964b651f3.tar.gz
meta-xilinx-b070d521bb108b2c84ca3875e40f69b964b651f3.tar.bz2
meta-xilinx-b070d521bb108b2c84ca3875e40f69b964b651f3.zip
libmali-xlnx.bb: Add support for wayland in libMali
Along with X11 and fbdev, MALI will now have wayland support as well. Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
-rw-r--r--meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc12
-rw-r--r--meta-xilinx-bsp/recipes-graphics/libgles/files/wayland-egl.pc12
-rw-r--r--meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb52
3 files changed, 62 insertions, 14 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc b/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc
new file mode 100644
index 0000000..02ea94e
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-graphics/libgles/files/gbm.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: gbm
+Description: MALI gbm library
+Requires.private:
+Version: r8p0
+Libs: -L${libdir} -lgbm
+Libs.private: -lm -lpthread -ldl
+Cflags: -I${includedir}
diff --git a/meta-xilinx-bsp/recipes-graphics/libgles/files/wayland-egl.pc b/meta-xilinx-bsp/recipes-graphics/libgles/files/wayland-egl.pc
new file mode 100644
index 0000000..719fb3e
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-graphics/libgles/files/wayland-egl.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: wayland-egl
+Description: MALI wayland-egl library
+Requires.private:
+Version: r8p0
+Libs: -L${libdir} -lwayland-egl
+Libs.private: -lm -lpthread -ldl
+Cflags: -I${includedir}
diff --git a/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb b/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
index 3e675d9..8c6ab3e 100644
--- a/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
+++ b/meta-xilinx-bsp/recipes-graphics/libgles/libmali-xlnx.bb
@@ -9,7 +9,7 @@ inherit xilinx-fetch-restricted
ANY_OF_DISTRO_FEATURES = "fbdev x11"
-PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl"
+PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm"
FILESEXTRAPATHS_append := " \
${THISDIR}/files: \
@@ -26,10 +26,12 @@ SRC_URI = " \
file://glesv1_cm.pc \
file://glesv1.pc \
file://glesv2.pc \
+ file://wayland-egl.pc \
+ file://gbm.pc \
"
-SRC_URI[md5sum] = "e75b147c8b4ee96616e24572cdc9c21f"
-SRC_URI[sha256sum] = "7b179ec2df54ee05a886cca1535c0bdc6cba77a646e22742adedc79bfc2b3017"
+SRC_URI[md5sum] = "4fd3456564ef8c818e21432221c9e1b7"
+SRC_URI[sha256sum] = "26d473ae77c36104a215710beca55a22a712850dc26547dde950c7398210602c"
COMPATIBLE_MACHINE = "^$"
COMPATIBLE_MACHINE_zynqmpeg = "zynqmpeg"
@@ -50,14 +52,16 @@ RDEPENDS_${PN} = " \
DEPENDS = "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland libdrm', '', d)} \
"
-EGL_TYPE = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
- bb.utils.contains('DISTRO_FEATURES', 'fbdev', 'fbdev', '', d), d)}"
+USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_FB = "${@bb.utils.contains("DISTRO_FEATURES", "fbdev", "yes", "no", d)}"
+USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
do_compile() {
# Extract the MALI binaries into workdir
- tar -xf ${WORKDIR}/mali/rel-v2018.1/r8p0-01rel0.tar -C ${S}
+ tar -xf ${WORKDIR}/mali/rel-v2018.3/r8p0-01rel0.tar -C ${S}
}
do_install() {
@@ -71,13 +75,13 @@ do_install() {
# install headers
install -d -m 0655 ${D}${includedir}/EGL
- install -m 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/${EGL_TYPE}/usr/include/EGL/*.h ${D}${includedir}/EGL/
+ install -m 0644 ${S}/${PV}/glesHeaders/EGL/*.h ${D}${includedir}/EGL/
install -d -m 0655 ${D}${includedir}/GLES
- install -m 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/${EGL_TYPE}/usr/include/GLES/*.h ${D}${includedir}/GLES/
+ install -m 0644 ${S}/${PV}/glesHeaders/GLES/*.h ${D}${includedir}/GLES/
install -d -m 0655 ${D}${includedir}/GLES2
- install -m 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/${EGL_TYPE}/usr/include/GLES2/*.h ${D}${includedir}/GLES2/
+ install -m 0644 ${S}/${PV}/glesHeaders/GLES2/*.h ${D}${includedir}/GLES2/
install -d -m 0655 ${D}${includedir}/KHR
- install -m 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/${EGL_TYPE}/usr/include/KHR/*.h ${D}${includedir}/KHR/
+ install -m 0644 ${S}/${PV}/glesHeaders/KHR/*.h ${D}${includedir}/KHR/
install -d ${D}${libdir}/pkgconfig
install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/egl.pc
@@ -86,7 +90,26 @@ do_install() {
install -m 0644 ${WORKDIR}/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
install -d ${D}${libdir}
- cp -a --no-preserve=ownership ${S}/${PV}/${ARCH_PLATFORM_DIR}/${EGL_TYPE}/usr/lib/*.so* ${D}${libdir}
+ install -d ${D}${includedir}
+
+ cp -a --no-preserve=ownership ${S}/${PV}/${ARCH_PLATFORM_DIR}/common/*.so* ${D}${libdir}
+
+ if [ "${USE_WL}" = "yes" ]; then
+ install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/
+ install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc
+ install -m 0644 ${WORKDIR}/wayland-egl.pc ${D}${libdir}/pkgconfig/wayland-egl.pc
+ install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/libMali.so.8.0 ${D}${libdir}/wayland/libMali.so.8.0
+ ln -snf wayland/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
+ elif [ "${USE_X11}" = "yes" ]; then
+ install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/x11/libMali.so.8.0 ${D}${libdir}/x11/libMali.so.8.0
+ ln -snf x11/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
+ elif [ "${USE_FB}" = "yes" ]; then
+ install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/libMali.so.8.0 ${D}${libdir}/fbdev/libMali.so.8.0
+ ln -snf fbdev/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
+ else
+ install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/libMali.so.8.0 ${D}${libdir}/headless/libMali.so.8.0
+ ln -snf headless/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
+ fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if (1)/' ${D}${includedir}/EGL/eglplatform.h
@@ -99,10 +122,11 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
-RREPLACES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2"
-RPROVIDES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2"
-RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2"
+RREPLACES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+RPROVIDES_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
+RCONFLICTS_${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm"
# These libraries shouldn't get installed in world builds unless something
# explicitly depends upon them.
EXCLUDE_FROM_WORLD = "1"
+FILES_${PN} += "${libdir}/*"