[yocto] [meta-rockchip][PATCH v2] recipes-graphics: mali-userspace: add

Romain Perier romain.perier at gmail.com
Fri Mar 10 08:02:10 PST 2017


Hey,

Could you :
1/ change your short commit message to something like "recipes-graphics:
Add recipe for mali-userspace". Just "add" does not make sense to me.
2/ Improve your long commit message.
3/ Add the license to your recipe :)
4/ Change the name of the recipe, call it... rockchip-mali (like in
meta-sunxi) or something different, because mali_userspace is not user
friendly really. What is userspace ?
5/ Fix description and summary => that's mali GL and/or GLES libraries for
Rockchip SoCs for a family of Mali GPU

Thanks !

2017-03-07 4:34 GMT+01:00 Jacob Chen <jacob-chen at iotwrt.com>:

> Do some modifying according to meta-sunxi
>
> * add COMPATIBLE_MACHINE statement
> * detect hard-float
> * combine to one bb file
>
> The difference is it depend on mesa to provide dev-package rather than
> offer it
> by itself, which can save some time to solve the compile errors.
>
> Change-Id: If81c363d4cfb11ade08b6c7cfcbfbe56e9d8824b
> ---
>  .../mali-userspace/mali-userspace_git.bb           | 83
> ++++++++++++++++++++++
>  1 file changed, 83 insertions(+)
>  create mode 100644 recipes-graphics/mali-userspace/mali-userspace_git.bb
>
> diff --git a/recipes-graphics/mali-userspace/mali-userspace_git.bb
> b/recipes-graphics/mali-userspace/mali-userspace_git.bb
> new file mode 100644
> index 0000000..787f79d
> --- /dev/null
> +++ b/recipes-graphics/mali-userspace/mali-userspace_git.bb
> @@ -0,0 +1,83 @@
> +SUMMARY = "Userspace mali driver"
> +DESCRIPTION = "Userspace mali driver"
> +LICENSE = "CLOSED"
> +SECTION = "libs"
> +
> +COMPATIBLE_MACHINE = "(rk3036|rk3288|rk3399)"
> +
> +# There's only hardfp version available
> +python __anonymous() {
> +    tunes = d.getVar("TUNE_FEATURES", True)
> +    if not tunes:
> +        return
> +    if "callconvention-hard" not in tunes:
> +        pkgn = d.getVar("PN", True)
> +        pkgv = d.getVar("PV", True)
> +        raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for
> now" % (pkgn, pkgv))
> +}
> +
> +DEPENDS = "libdrm mesa"
> +
> +PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2
> virtual/libopencl libgbm"
> +PROVIDES += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "
> virtual/libwayland-egl", " ", d)}"
> +
> +S = "${WORKDIR}/git"
> +
> +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)}"
> +
> +MALI_X11_rk3288 = "arm-linux-gnueabihf/libmali-midgard-r13p0-r0p0.so"
> +MALI_WAYLAND_rk3288 = "arm-linux-gnueabihf/libmali-midgard-r13p0-r0p0-wayland.so
> "
> +MALI_GBM_rk3288 = "arm-linux-gnueabihf/libmali-midgard-r13p0-r0p0-gbm.so
> "
> +
> +MALI_X11_rk3036 = "arm-linux-gnueabihf/libmali-utgard-r6p0.so"
> +
> +MALI_X11_rk3399 = "aarch64-linux-gnu/libmali-midgard-4th-r9p0.so"
> +
> +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}/lib/${MALI_X11} ${D}/${libdir}/libmali.so
> +       elif [ "${USE_WL}" = "yes" ]; then
> +               install ${S}/lib/${MALI_WAYLAND} ${D}/${libdir}/libmali.so
> +       else
> +               install ${S}/lib/${MALI_GBM} ${D}/${libdir}/libmali.so
> +       fi
> +
> +       ln -sf libmali.so ${D}/${libdir}/libEGL.so
> +       ln -sf libmali.so ${D}/${libdir}/libEGL.so.1
> +       ln -sf libmali.so ${D}/${libdir}/libGLESv1_CM.so
> +       ln -sf libmali.so ${D}/${libdir}/libGLESv1_CM.so.1
> +       ln -sf libmali.so ${D}/${libdir}/libGLESv2.so
> +       ln -sf libmali.so ${D}/${libdir}/libGLESv2.so.2
> +       ln -sf libmali.so ${D}/${libdir}/libOpenCL.so
> +       ln -sf libmali.so ${D}/${libdir}/libOpenCL.so.1
> +       ln -sf libmali.so ${D}/${libdir}/libgbm.so
> +       ln -sf libmali.so ${D}/${libdir}/libgbm.so.1
> +
> +       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"
> +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"
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170310/2fd4f8a1/attachment.html>


More information about the yocto mailing list