From: Zoltan Kuscsik zoltan.kuscsik@linaro.org
--- .../mali-userland/mali450-userland-drm_binary.bb | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 recipes-graphics/mali-userland/mali450-userland-drm_binary.bb
diff --git a/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb b/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb new file mode 100644 index 0000000..3b1c438 --- /dev/null +++ b/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb @@ -0,0 +1,75 @@ +SUMMARY = "Mali400 libraries (drm backend)" +DESCRIPTION = "Mali400 libraries (opengles, egl...)" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=6b6d38be6224fa5948bf814d28cc2197" + +PROVIDES = "mali450-userland virtual/egl virtual/libgles1 virtual/libgles2" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "libdrm mesa" + +PV_MALI="r6p0" +PR_MALI="01rel0" + +PR="${PR_MALI}.binary" + +BACKEND="drm" + +MALI_DIRECTORY="mali450-userland-${BACKEND}-${PV_MALI}-${PR_MALI}-release" +SRC_URI = "file://${MALI_DIRECTORY}.tgz" + +S = "${WORKDIR}/${MALI_DIRECTORY}" + +#action stubbed +do_configure[noexec] = "1" +do_compile[noexec] = "1" + + +do_install() { + install -m 755 -d ${D}/usr/ + cp -aR ${S}/usr ${D}/ +} + +PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-test " + +INSANE_SKIP_${PN} = "dev-so" +FILES_SOLIBSDEV = "" + +FILES_${PN} += "${libdir}/libMali.so* ${libdir}/*.so" +FILES_${PN}-dev += "${includedir} ${libdir}/pkgconfig/" +FILES_${PN}-dbg += "${libdir}/.debug/ ${bindir}/.debug/ " + +FILES_${PN}-test = "${exec_prefix}/share/gles2_test/ ${exec_prefix}/share/egl_test " +FILES_${PN}-test += "${exec_prefix}/bin/platform_test_suite" +FILES_${PN}-test += "${exec_prefix}/bin/egl_api_main_suite_20" +FILES_${PN}-test += "${exec_prefix}/bin/gles2_api_suite" + +RREPLACES_${PN} = "libglesv2-2 " +RPROVIDES_${PN} = "libglesv2-2 " +RCONFLICTS_${PN} = "libglesv2-2 " + + +# For the packages that make up the OpenGL interfaces, inject variables so that +# they don't get Debian-renamed (which would remove the -mali450 suffix), and +# RPROVIDEs/RCONFLICTs on the generic libgl name. +python __anonymous() { + pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() + for p in (("libegl"), ("libegl1"), + ("gles"), ("libgles1"), ("libglesv1-cm1"), + ("libgles2"), ("mali450-userland")): + fullp = "mali450-userland" + pkgs = " " + p + " " + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) + + # For -dev, the first element is both the Debian and original name + fullp += "mali450-userland-dev" + pkgs = " " + p + "-dev " + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) +} +
The previous patch was the older version (which used a local copy of the binaries instead of downloading them from malideveloper.arm.com).
On 7 June 2016 at 10:11, Koen Kooi koen.kooi@linaro.org wrote:
From: Zoltan Kuscsik zoltan.kuscsik@linaro.org
.../mali-userland/mali450-userland-drm_binary.bb | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 recipes-graphics/mali-userland/mali450-userland-drm_binary.bb
diff --git a/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb b/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb new file mode 100644 index 0000000..3b1c438 --- /dev/null +++ b/recipes-graphics/mali-userland/mali450-userland-drm_binary.bb @@ -0,0 +1,75 @@ +SUMMARY = "Mali400 libraries (drm backend)" +DESCRIPTION = "Mali400 libraries (opengles, egl...)"
Description needs to either be more verbose or dropped completely.
Insert blank line between the summray and license blocks.
+LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=6b6d38be6224fa5948bf814d28cc2197"
+PROVIDES = "mali450-userland virtual/egl virtual/libgles1 virtual/libgles2"
This needs a comment why 'mali450-userland' is being PROVIDED
+PACKAGE_ARCH = "${MACHINE_ARCH}"
This needs to go below do_install. And is it really machine specific? These binaries tend to be GPU specific, what happens when hisilicon respins their SoC and adds an updated mali450 IP block?
+DEPENDS = "libdrm mesa"
+PV_MALI="r6p0" +PR_MALI="01rel0"
Remove the underscore, they are an operator and will break is someone defines 'MALI' globally.
+PR="${PR_MALI}.binary"
This needs a comment or get deleted.
+BACKEND="drm"
+MALI_DIRECTORY="mali450-userland-${BACKEND}-${PV_MALI}-${PR_MALI}-release" +SRC_URI = "file://${MALI_DIRECTORY}.tgz"
Andrey sent an update for this already, but: needs to fetch for ARM
+S = "${WORKDIR}/${MALI_DIRECTORY}"
+#action stubbed +do_configure[noexec] = "1" +do_compile[noexec] = "1"
Needs a better comment or dropped, the overhead isn't that high
+do_install() {
- install -m 755 -d ${D}/usr/
- cp -aR ${S}/usr ${D}/
${prefix} and use install, not cp
+}
+PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-test "
Needs a comment why you redefine PACKAGES or deleted.
+INSANE_SKIP_${PN} = "dev-so" +FILES_SOLIBSDEV = ""
Again, needs a comment.
+FILES_${PN} += "${libdir}/libMali.so* ${libdir}/*.so"
+FILES_${PN}-dev += "${includedir} ${libdir}/pkgconfig/" +FILES_${PN}-dbg += "${libdir}/.debug/ ${bindir}/.debug/ "
Basically the default, delete or provide comment.
+FILES_${PN}-test = "${exec_prefix}/share/gles2_test/ ${exec_prefix}/share/egl_test " +FILES_${PN}-test += "${exec_prefix}/bin/platform_test_suite" +FILES_${PN}-test += "${exec_prefix}/bin/egl_api_main_suite_20" +FILES_${PN}-test += "${exec_prefix}/bin/gles2_api_suite"
Don't use += instead of , += is a heavy bitbake operation.
+RREPLACES_${PN} = "libglesv2-2 " +RPROVIDES_${PN} = "libglesv2-2 " +RCONFLICTS_${PN} = "libglesv2-2 "
Comment
+# For the packages that make up the OpenGL interfaces, inject variables so that +# they don't get Debian-renamed (which would remove the -mali450 suffix), and +# RPROVIDEs/RCONFLICTs on the generic libgl name.
Yay! An actual comment! Woohoo!
+python __anonymous() {
- pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
- for p in (("libegl"), ("libegl1"),
("gles"), ("libgles1"), ("libglesv1-cm1"),
("libgles2"), ("mali450-userland")):
fullp = "mali450-userland"
pkgs = " " + p + " "
d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
d.appendVar("RREPLACES_" + fullp, pkgs)
d.appendVar("RPROVIDES_" + fullp, pkgs)
d.appendVar("RCONFLICTS_" + fullp, pkgs)
# For -dev, the first element is both the Debian and original name
fullp += "mali450-userland-dev"
pkgs = " " + p + "-dev "
d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
d.appendVar("RREPLACES_" + fullp, pkgs)
d.appendVar("RPROVIDES_" + fullp, pkgs)
d.appendVar("RCONFLICTS_" + fullp, pkgs)
+}
-- 2.4.3