Hi all, Correct me if I am wrong, but these are generic mali userpace binaries ? meta-rockchip is a bsp meta layer, it should only contains files and recipes to make rockchip board working or things specific to the rockchip board. For me these recipes are completly generic and might be re-used for another platform with another SoC.
I don't want this in meta-rockchip. There is no a layer called meta-mali or something ? @Trevor: Feel free to comment, the point of view of the second maintainer is always welcome Thanks, Romain 2017-01-19 15:04 GMT+01:00 Jacob Chen <[email protected]>: > Add support for mali userspace which are binaries that can be run > with weston and X11. > > Signed-off-by: Jacob Chen <[email protected]> > --- > recipes-graphics/mali-userspace/mali-userspace.inc | 57 > ++++++++++++++++++++++ > .../mali-userspace/mali-userspace_t76x.bb | 18 +++++++ > recipes-graphics/mesa/mesa_%.bbappend | 9 ++++ > 3 files changed, 84 insertions(+) > create mode 100644 recipes-graphics/mali-userspace/mali-userspace.inc > create mode 100644 recipes-graphics/mali-userspace/mali-userspace_t76x.bb > create mode 100644 recipes-graphics/mesa/mesa_%.bbappend > > diff --git a/recipes-graphics/mali-userspace/mali-userspace.inc > b/recipes-graphics/mali-userspace/mali-userspace.inc > new file mode 100644 > index 0000000..d40f583 > --- /dev/null > +++ b/recipes-graphics/mali-userspace/mali-userspace.inc > @@ -0,0 +1,57 @@ > +SUMMARY = "Userspace mali driver for Midgard-T76x" > +DESCRIPTION = "Userspace mali driver for Midgard-T76x" > +LICENSE = "CLOSED" > +SECTION = "libs" > + > +DEPENDS = "libdrm" > +DEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " mesa", > " ", d)}" > + > +PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 > virtual/libopencl libgbm" > +PROVIDES += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", " > virtual/libwayland-egl", " ", d)}" > + > +S = "${WORKDIR}" > + > +SRC_URI = "git://github.com/rockchip-linux/libmali.git;branch=rockchip;" > +SRCREV_pn-${PN} = "${AUTOREV}" > + > +INSANE_SKIP_${PN} = "already-stripped ldflags dev-so" > + > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" > +INHIBIT_PACKAGE_STRIP = "1" > + > +USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", > d)}" > +USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", > "no", d)}" > + > +do_configure[noexec] = "1" > +do_compile[noexec] = "1" > + > +do_install () { > + # Create MALI manifest > + install -m 755 -d ${D}/${libdir} > + if [ "${USE_X11}" = "yes" ]; then > + install ${S}/x11/libmali.so ${D}/${libdir} > + elif [ "${USE_WL}" = "yes" ]; then > + install ${S}/wayland/libmali.so ${D}/${libdir} > + fi > + > + ln -sf libmali.so ${D}/${libdir}/libEGL.so > + ln -sf libmali.so ${D}/${libdir}/libGLESv1_CM.so > + ln -sf libmali.so ${D}/${libdir}/libGLESv2.so > + ln -sf libmali.so ${D}/${libdir}/libOpenCL.so > + ln -sf libmali.so ${D}/${libdir}/libgbm.so > + > + if [ "${USE_WL}" = "yes" ]; then > + ln -sf libmali.so ${D}/${libdir}/libwayland-egl.so > + fi > +} > + > +PACKAGES = "${PN}" > +FILES_${PN} += "${libdir}/*.so" > + > +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" > + > +# Workaround: libmali.so provided by rk having no SONAME field in it > +# so add it to fix rdepends problems > +RPROVIDES_${PN} += "libwayland-egl.so libgbm.so libGLESv1_CM.so > libGLESv2.so libEGL.so libOpenCL.so" > diff --git a/recipes-graphics/mali-userspace/mali-userspace_t76x.bb > b/recipes-graphics/mali-userspace/mali-userspace_t76x.bb > new file mode 100644 > index 0000000..3281ac0 > --- /dev/null > +++ b/recipes-graphics/mali-userspace/mali-userspace_t76x.bb > @@ -0,0 +1,18 @@ > +require mali-userspace.inc > + > +TYPE = "midgard" > +SW_VER = "r13p0" > +HW_VER = "r0p0" > + > +LIB_PATH = "arm-linux-gnueabihf" > + > +MALI_X11 = "libmali-${TYPE}-${SW_VER}-${HW_VER}.so" > +MALI_WAYLAND = "libmali-${TYPE}-${SW_VER}-${HW_VER}-wayland.so" > + > +do_install_prepend () { > + mkdir -p x11 > + cp git/lib/${LIB_PATH}/${MALI_X11} x11/libmali.so > + > + mkdir -p wayland > + cp git/lib/${LIB_PATH}/${MALI_WAYLAND} wayland/libmali.so > +} > diff --git a/recipes-graphics/mesa/mesa_%.bbappend > b/recipes-graphics/mesa/mesa_%.bbappend > new file mode 100644 > index 0000000..d9cab75 > --- /dev/null > +++ b/recipes-graphics/mesa/mesa_%.bbappend > @@ -0,0 +1,9 @@ > +PROVIDES_remove = "virtual/libgles1 virtual/libgles2 virtual/egl > virtual/libwayland-egl" > + > +do_install_append () { > + rm -f ${D}/${libdir}/libEGL* > + rm -f ${D}/${libdir}/libGLESv1_CM.* > + rm -f ${D}/${libdir}/libGLESv2.* > + rm -f ${D}/${libdir}/libgbm* > + rm -f ${D}/${libdir}/libwayland-egl* > +} > -- > 2.7.4 > >
-- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
