diff options
Diffstat (limited to 'recipes-graphics')
103 files changed, 1744 insertions, 1865 deletions
diff --git a/recipes-graphics/cairo/cairo_%.bbappend b/recipes-graphics/cairo/cairo_%.bbappend index 5b1562ab..bf8c38fc 100644 --- a/recipes-graphics/cairo/cairo_%.bbappend +++ b/recipes-graphics/cairo/cairo_%.bbappend @@ -1,2 +1,5 @@ -PACKAGECONFIG_append_imxgpu3d = " egl glesv2" -PACKAGECONFIG_remove_imxgpu3d = "opengl" +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" diff --git a/recipes-graphics/clutter/clutter-1.0_%.bbappend b/recipes-graphics/clutter/clutter-1.0_%.bbappend deleted file mode 100644 index 0b4c4861..00000000 --- a/recipes-graphics/clutter/clutter-1.0_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGECONFIG_imxgpu3d ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', \ - '', d), d)} \ -" diff --git a/recipes-graphics/cogl/cogl-1.0_%.bbappend b/recipes-graphics/cogl/cogl-1.0_%.bbappend deleted file mode 100644 index afbaee43..00000000 --- a/recipes-graphics/cogl/cogl-1.0_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -PACKAGECONFIG_imxgpu3d ??= " \ - cogl-pango gles2 \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'egl-x11', \ - '', d), d)}" diff --git a/recipes-graphics/drm/libdrm-armada_git.bb b/recipes-graphics/drm/libdrm-armada_git.bb deleted file mode 100644 index 0a14e371..00000000 --- a/recipes-graphics/drm/libdrm-armada_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Userspace interface to kernel DRM services" -SECTION = "x11/base" -LICENSE = "GPLv2 & BSD" - -LIC_FILES_CHKSUM = "file://libdrm_lists.h;beginline=1;endline=25;md5=2af1df1026ba1d24c8e7c370e68ed198" - -DEPENDS = "libdrm" - -SRCREV = "6b461c163b0bd02c76b65d94cc2fb3767167bda8" -PV = "0.1+git${SRCPV}" -SRC_URI = "git://git.armlinux.org.uk/~rmk/libdrm-armada.git" - -inherit autotools pkgconfig - -S = "${WORKDIR}/git" - -COMPATIBLE_MACHINE ?= "(imx)" diff --git a/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch deleted file mode 100644 index fa7b218e..00000000 --- a/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 9be904a70e6b7e6b3cc4e1b270bca02d14a4179b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Mon, 5 Sep 2016 14:41:37 +0300 -Subject: [PATCH] configure.ac: Allow explicit enabling of cunit tests - -Add --with-cunit to make it easier to do reproducible builds. Default -is still to probe cunit and build opportunistically. - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> -Upstream-Status: Submitted [mailing list] - ---- - configure.ac | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1341f51..bef46e0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -168,6 +168,12 @@ AC_ARG_ENABLE(install-test-programs, - [Install test programs (default: no)]), - [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no]) - -+AC_ARG_WITH([cunit], -+ [AS_HELP_STRING([--with-cunit], -+ [Build tests that use cunit (default: auto)])], -+ [], -+ [with_cunit=auto]) -+ - dnl =========================================================================== - dnl check compiler flags - AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ -@@ -416,7 +422,7 @@ else - AC_DEFINE(HAVE_RADEON, 0) - fi - --if test "x$AMDGPU" != xno; then -+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then - # Detect cunit library - PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) - # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We -@@ -441,7 +447,11 @@ if test "x$AMDGPU" = xyes; then - AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support]) - - if test "x$have_cunit" = "xno"; then -- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ if test "x$with_cunit" = "xyes"; then -+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given]) -+ elif test "x$with_cunit" = "xauto"; then -+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ fi - fi - else - AC_DEFINE(HAVE_AMDGPU, 0) diff --git a/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch deleted file mode 100644 index 4708bf1e..00000000 --- a/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch +++ /dev/null @@ -1,24 +0,0 @@ -drmdevice.c: define _GNU_SOURCE - -Include config.h to fix this build error with uclibc: - -libdrm-2.4.66/tests/drmdevice.c: In function 'main': -libdrm-2.4.66/tests/drmdevice.c:96:60: error: -'O_CLOEXEC' undeclared (first use in this function) -fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0); - -Upstream-Status: Pending - -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- -diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c ---- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200 -+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200 -@@ -21,6 +21,7 @@ - * - */ - -+#include <config.h> - #include <errno.h> - #include <stdio.h> - #include <stdlib.h> diff --git a/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch b/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch deleted file mode 100644 index 1160cd10..00000000 --- a/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch +++ /dev/null @@ -1,35 +0,0 @@ -Add ARM support into xf86arm.h. This provides support for Xorg interface. -Without this the vivante samples will hang during close requiring a reboot - -Upstream-Status: Pending - -Signed-off-by: Lauren Post <lauren.post@freescale.com> -Signed-off-by: Evan Kotara <evan.kotara@freescale.com> - -diff --git a/xf86drm.h b/xf86drm.h ---- a/xf86drm.h -+++ b/xf86drm.h -@@ -461,6 +461,23 @@ do { register unsigned int __old __asm(" - : "cr0", "memory"); \ - } while (0) - -+#elif defined(__arm__) -+ #undef DRM_DEV_MODE -+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -+ -+ #define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ __asm__ __volatile__ ( \ -+ "1: ldrex %0, [%1]\n" \ -+ " teq %0, %2\n" \ -+ " ite eq\n" \ -+ " strexeq %0, %3, [%1]\n" \ -+ " movne %0, #1\n" \ -+ : "=&r" (__ret) \ -+ : "r" (lock), "r" (old), "r" (new) \ -+ : "cc","memory"); \ -+ } while (0) -+ - #endif /* architecture */ - #endif /* __GNUC__ >= 2 */ - diff --git a/recipes-graphics/drm/libdrm/installtests.patch b/recipes-graphics/drm/libdrm/installtests.patch deleted file mode 100644 index ec1fb023..00000000 --- a/recipes-graphics/drm/libdrm/installtests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Tue, 21 Feb 2017 14:37:52 +0200 -Subject: [PATCH] tests: also install test apps - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Yu Ke <ke.yu@intel.com> -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0355a92..b4882cd 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -45,3 +45,4 @@ TESTS = \ - check_PROGRAMS = \ - $(TESTS) \ - drmdevice -+bin_PROGRAMS = $(check_PROGRAMS) --- -2.1.4 - diff --git a/recipes-graphics/drm/libdrm_%.bbappend b/recipes-graphics/drm/libdrm_%.bbappend deleted file mode 100644 index 97b6df92..00000000 --- a/recipes-graphics/drm/libdrm_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_imxgpu2d = " file://drm-update-arm.patch" - -PACKAGE_ARCH_imxgpu2d = "${MACHINE_SOCARCH}" diff --git a/recipes-graphics/drm/libdrm_2.4.116.imx.bb b/recipes-graphics/drm/libdrm_2.4.116.imx.bb new file mode 100644 index 00000000..ff23f35f --- /dev/null +++ b/recipes-graphics/drm/libdrm_2.4.116.imx.bb @@ -0,0 +1,73 @@ +SUMMARY = "Userspace interface to the kernel DRM services" +DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ +stands for \"Direct Rendering Manager\", which is the kernel portion of the \ +\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ +accelerated OpenGL drivers." +HOMEPAGE = "http://dri.freedesktop.org" +SECTION = "x11/base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9eb1f4831351ab42d762c40b3ebb7add \ + file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" +PROVIDES = "drm" +DEPENDS = "libpthread-stubs" + +SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}" +IMX_LIBDRM_SRC ?= "git://github.com/nxp-imx/libdrm-imx.git;protocol=https" +SRCBRANCH = "libdrm-imx-2.4.116" +SRCREV = "2f1797674f94572ae8c365c8cbffb0263337ed57" + +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE = "-1" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +inherit meson pkgconfig manpages + +PACKAGECONFIG ??= "intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv tests install-test-programs" +PACKAGECONFIG[intel] = "-Dintel=enabled,-Dintel=disabled,libpciaccess" +PACKAGECONFIG[radeon] = "-Dradeon=enabled,-Dradeon=disabled" +PACKAGECONFIG[amdgpu] = "-Damdgpu=enabled,-Damdgpu=disabled" +PACKAGECONFIG[nouveau] = "-Dnouveau=enabled,-Dnouveau=disabled" +PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=enabled,-Dvmwgfx=disabled" +PACKAGECONFIG[omap] = "-Domap=enabled,-Domap=disabled" +PACKAGECONFIG[exynos] = "-Dexynos=enabled,-Dexynos=disabled" +PACKAGECONFIG[freedreno] = "-Dfreedreno=enabled,-Dfreedreno=disabled" +PACKAGECONFIG[tegra] = "-Dtegra=enabled,-Dtegra=disabled" +PACKAGECONFIG[vc4] = "-Dvc4=enabled,-Dvc4=disabled" +PACKAGECONFIG[etnaviv] = "-Detnaviv=enabled,-Detnaviv=disabled" +PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false" +PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind" +PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false" +PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=enabled,-Dcairo-tests=disabled" +PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false" +PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev" +PACKAGECONFIG[manpages] = "-Dman-pages=enabled,-Dman-pages=disabled,libxslt-native xmlto-native python3-docutils-native" + +ALLOW_EMPTY:${PN}-drivers = "1" +PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ + ${PN}-intel ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ + ${PN}-etnaviv" + +RRECOMMENDS:${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ + ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ + ${PN}-etnaviv" + +FILES:${PN}-tests = "${bindir}/*" +FILES:${PN}-radeon = "${libdir}/libdrm_radeon.so.*" +FILES:${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" +FILES:${PN}-omap = "${libdir}/libdrm_omap.so.*" +FILES:${PN}-intel = "${libdir}/libdrm_intel.so.*" +FILES:${PN}-exynos = "${libdir}/libdrm_exynos.so.*" +FILES:${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" +FILES:${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids" +FILES:${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES:prepend:imxgpu = "${PN}-vivante " +RRECOMMENDS:${PN}-drivers:append:imxgpu = " ${PN}-vivante" +FILES:${PN}-vivante = "${libdir}/libdrm_vivante.so.*" +PACKAGECONFIG:append:imxgpu = " vivante" +PACKAGECONFIG[vivante] = "-Dvivante=true,-Dvivante=false" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/recipes-graphics/drm/libdrm_2.4.91.imx.bb b/recipes-graphics/drm/libdrm_2.4.91.imx.bb deleted file mode 100644 index 31f24d32..00000000 --- a/recipes-graphics/drm/libdrm_2.4.91.imx.bb +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "Userspace interface to the kernel DRM services" -DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ -stands for \"Direct Rendering Manager\", which is the kernel portion of the \ -\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ -accelerated OpenGL drivers." -HOMEPAGE = "http://dri.freedesktop.org" -SECTION = "x11/base" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" -PROVIDES = "drm" -DEPENDS = "libpthread-stubs libpciaccess" - -IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" -IMX_LIBDRM_BRANCH = "libdrm-imx-2.4.91" -SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \ - file://installtests.patch \ - file://fix_O_CLOEXEC_undeclared.patch \ - file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \ - " -SRC_URI_remove = "file://drm-update-arm.patch" -SRCREV = "e8e9cf8a66be11508c39f1cc31b8a5e7eb758875" -S = "${WORKDIR}/git" - -DEFAULT_PREFERENCE = "-1" - -inherit autotools pkgconfig manpages - -EXTRA_OECONF += "--disable-cairo-tests \ - --without-cunit \ - --enable-omap-experimental-api \ - --enable-etnaviv-experimental-api \ - --enable-install-test-programs \ - --disable-valgrind \ - " -PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" - -ALLOW_EMPTY_${PN}-drivers = "1" -PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ - ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ - ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -FILES_${PN}-tests = "${bindir}/*" -FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" -FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" -FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" -FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" -FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" -FILES_${PN}-kms = "${libdir}/libkms*.so.*" -FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" -FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" -FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" - -EXTRA_OECONF_append_imxgpu = " --enable-vivante-experimental-api" - -PACKAGES_prepend_imxgpu = "${PN}-vivante " - -RRECOMMENDS_${PN}-drivers_append_imxgpu = " ${PN}-vivante" - -FILES_${PN}-vivante = "${libdir}/libdrm_vivante.so.*" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch b/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch deleted file mode 100644 index 7c315c83..00000000 --- a/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fdb3add3dfd53c539c3c79e4fbf9eedb1dc1e440 Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com> -Date: Fri, 26 Feb 2016 11:29:54 -0600 -Subject: [PATCH] Use generic eglplatform.h rather than vendor specifc - (eglvivante.h) EGL headers. - -Upstream-Status: Pending - ---- - wscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wscript b/wscript -index 195e247..d08bc29 100644 ---- a/wscript -+++ b/wscript -@@ -219,7 +219,7 @@ def check_vivante_egl(conf, egl_extra_defines): - extra_defines += egl_extra_defines - extra_cxxflags = map(lambda x: conf.env['DEFINES_ST'] % x, extra_defines) - conf.env['CXXFLAGS'] += extra_cxxflags -- conf.check_cxx(mandatory = 1, header_name = 'EGL/eglvivante.h', uselib_store = 'EGL') -+ conf.check_cxx(mandatory = 1, header_name = 'EGL/eglplatform.h', uselib_store = 'EGL') - conf.check_cxx(mandatory = 1, header_name = 'EGL/egl.h', uselib_store = 'EGL') - conf.env['CXXFLAGS_EGL'] += extra_cxxflags - conf.env['CXXFLAGS'] = old_cxxflags --- -2.7.0 - diff --git a/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend b/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend deleted file mode 100644 index f130d23c..00000000 --- a/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_imxgpu3d = " \ - file://0001-Replace-vendor-specific-header-with-generic.patch \ -" - -# Set i.MX specific dependencies and device type -EGLINFO_DEVICE_imxgpu3d = "imx6" diff --git a/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend b/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend deleted file mode 100644 index 7aa0e50f..00000000 --- a/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Set i.MX specific dependencies and device type -EGLINFO_DEVICE_imxgpu3d = "imx6" diff --git a/recipes-graphics/glew/glew_%.bbappend b/recipes-graphics/glew/glew_%.bbappend new file mode 100644 index 00000000..95da4790 --- /dev/null +++ b/recipes-graphics/glew/glew_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:imxgpu = "egl-gles2" diff --git a/recipes-graphics/gtk+/gtk+3_%.bbappend b/recipes-graphics/gtk+/gtk+3_%.bbappend index be2bac75..6bc01807 100644 --- a/recipes-graphics/gtk+/gtk+3_%.bbappend +++ b/recipes-graphics/gtk+/gtk+3_%.bbappend @@ -1,5 +1 @@ -DEPENDS_append_imxgpu2d = " virtual/egl" - -PACKAGECONFIG_remove_imxgpu2d = " \ - ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "x11", "", d)} \ -" +DEPENDS:append:imxgpu2d = " virtual/egl" diff --git a/recipes-graphics/harfbuzz/harfbuzz_%.bbappend b/recipes-graphics/harfbuzz/harfbuzz_%.bbappend new file mode 100644 index 00000000..bf8c38fc --- /dev/null +++ b/recipes-graphics/harfbuzz/harfbuzz_%.bbappend @@ -0,0 +1,5 @@ +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" diff --git a/recipes-graphics/images/core-image-weston.bbappend b/recipes-graphics/images/core-image-weston.bbappend index 2a3cde69..0d4a0c6f 100644 --- a/recipes-graphics/images/core-image-weston.bbappend +++ b/recipes-graphics/images/core-image-weston.bbappend @@ -1,3 +1,3 @@ # FIXME: i.MX6SL cannot use mesa for Graphics and it lacks GL support, # so for now we skip it. -CORE_IMAGE_BASE_INSTALL_remove_mx6sl = "clutter-1.0-examples" +CORE_IMAGE_BASE_INSTALL:remove:mx6sl-nxp-bsp = "clutter-1.0-examples" diff --git a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb b/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb deleted file mode 100644 index 1e204b00..00000000 --- a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -RDEPENDS_${PN} = "libgal-imx libdrm" - -PROVIDES += "virtual/libg2d" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" - -S="${WORKDIR}/${PN}-${PV}" - -inherit fsl-eula-unpack - -SRC_URI[md5sum] = "5a14e335d329dbc33edb89f675821d5a" -SRC_URI[sha256sum] = "e8f27247b068f4f31e235e98f0eacf11eb0bb25cc6b710e5ca7f8f96d323004f" - -do_install () { - - install -d ${D}${libdir} - install -d ${D}${includedir} - - cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -INSANE_SKIP_${PN} += "ldflags" - -FILES_${PN} = "${libdir}/libg2d* /opt" -FILES_${PN}-dev = "${libdir}/libg2d${SOLIBSDEV} ${includedir}" - -COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/recipes-graphics/imx-g2d/imx-dpu-g2d_2.1.12.bb b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.1.12.bb new file mode 100644 index 00000000..b10cd997 --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.1.12.bb @@ -0,0 +1,45 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2024 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "G2D library using i.MX DPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" + +DEPENDS = "libdrm ${LIBGAL_IMX}" +LIBGAL_IMX = "libgal-imx" +LIBGAL_IMX:mx95-nxp-bsp = "" + +PROVIDES += "virtual/libg2d" + +SRC_URI = "${FSL_MIRROR}/${IMX_BIN_NAME}.bin;fsl-eula=true;name=${IMX_SRC_URI_NAME}" +IMX_BIN_NAME = "${BPN}-${IMX_SRC_URI_NAME}-${PV}-${IMX_SRCREV_ABBREV}" + +IMX_SRCREV_ABBREV = "ee47ef7" +IMX_SRC_URI_NAME = "v1" +SRC_URI[v1.md5sum] = "4150f09e27178101fdccb792b7cbc526" +SRC_URI[v1.sha256sum] = "bd7849376564f7e2eb55210f156afae00b49451de6de80cfbc5fbda15be6a2b0" + +IMX_SRCREV_ABBREV:mx95-nxp-bsp = "ee47ef7" +IMX_SRC_URI_NAME:mx95-nxp-bsp = "v2" +SRC_URI[v2.md5sum] = "031396e175c432eb6c84aad8e0a6fc7d" +SRC_URI[v2.sha256sum] = "0646d8cc8e53f22fc15a61f0b78cd5f73460520f91949bc1d29c10ecbf77307b" + +S = "${WORKDIR}/${IMX_BIN_NAME}" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp -d ${S}/g2d/usr/lib/*.so* ${D}${libdir} + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} +} + +# The packaged binaries have been stripped of debug info, so disable +# operations accordingly. +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/recipes-graphics/imx-g2d/imx-g2d-samples_git.bb b/recipes-graphics/imx-g2d/imx-g2d-samples_git.bb new file mode 100644 index 00000000..55f88da3 --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-g2d-samples_git.bb @@ -0,0 +1,76 @@ +SUMMARY = "i.MX G2D Samples" +DESCRIPTION = "Set of sample applications for i.MX G2D" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0858ec9c7a80c4a2cf16e4f825a2cc91" + +DEPENDS = "cairo" + +PV = "2.1+git${SRCPV}" + +SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}" +GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxp-imx/g2d-samples.git;protocol=https" +SRCBRANCH = "imx_2.1" +SRCREV = "bec2f3839737b0e83b68b1c976373d9a78e5762f" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +PACKAGECONFIG ??= "${PACKAGECONFIG_IMPLEMENTATION}" +PACKAGECONFIG_IMPLEMENTATION = "" +PACKAGECONFIG_IMPLEMENTATION:imxgpu2d:imxdpu = "dpu" +PACKAGECONFIG_IMPLEMENTATION:mx95-nxp-bsp = "dpu95" +PACKAGECONFIG_IMPLEMENTATION:imxgpu2d = "gpu-drm" +PACKAGECONFIG_IMPLEMENTATION:imxgpu2d:imxfbdev = "gpu-fbdev" +PACKAGECONFIG_IMPLEMENTATION:mx93-nxp-bsp = "pxp" + +PACKAGECONFIG[dpu] = " \ + BUILD_IMPLEMENTATION=dpu, \ + , \ + imx-dpu-g2d wayland-native wayland wayland-protocols, \ + , \ + , \ + dpu95 gpu-drm gpu-fbdev pxp" +PACKAGECONFIG[dpu95] = " \ + BUILD_IMPLEMENTATION=dpu95, \ + , \ + imx-dpu-g2d wayland-native wayland wayland-protocols, \ + , \ + , \ + dpu gpu-drm gpu-fbdev pxp" +PACKAGECONFIG[gpu-drm] = " \ + BUILD_IMPLEMENTATION=gpu-drm, \ + , \ + imx-gpu-g2d wayland-native wayland wayland-protocols, \ + , \ + , \ + dpu dpu95 gpu-fbdev pxp" +PACKAGECONFIG[gpu-fbdev] = " \ + BUILD_IMPLEMENTATION=gpu-fbdev, \ + , \ + imx-gpu-g2d, \ + , \ + , \ + dpu dpu95 gpu-drm pxp" +PACKAGECONFIG[pxp] = " \ + BUILD_IMPLEMENTATION=pxp, \ + , \ + imx-pxp-g2d wayland-native wayland wayland-protocols, \ + , \ + , \ + dpu dpu95 gpu-drm gpu-fbdev" + +EXTRA_OEMAKE += " \ + SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ + ${PACKAGECONFIG_CONFARGS} \ +" + +do_install() { + oe_runmake install DESTDIR=${D} +} + +FILES:${PN} += "/opt" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + +COMPATIBLE_MACHINE = "(imxgpu2d|mx93-nxp-bsp|mx95-nxp-bsp)" diff --git a/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.11.p2.4.bb b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.11.p2.4.bb new file mode 100644 index 00000000..3ebb8f88 --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.11.p2.4.bb @@ -0,0 +1,44 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2024 NXP +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "G2D library using i.MX GPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" +DEPENDS = "libgal-imx" +PROVIDES = "virtual/libg2d" + +SRC_URI = "${FSL_MIRROR}/${IMX_BIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" +IMX_BIN_NAME = "${BP}-${TARGET_ARCH}-${IMX_SRCREV_ABBREV}" +IMX_SRCREV_ABBREV = "b07999b" +SRC_URI[aarch64.md5sum] = "fa30ce75803697d5131d707b300258ee" +SRC_URI[aarch64.sha256sum] = "2dff0279ead132ec5fa61dbe9b2b1969135e8ce9fe7487957371327357d70ac7" +SRC_URI[arm.md5sum] = "c81be7c93b60c7d3f3eb5b7bfeda42a4" +SRC_URI[arm.sha256sum] = "e17ac373193622ec0c9aa490ef1b93551d22a2e88ee9f1098ed984e62f02a06c" + +S = "${WORKDIR}/${IMX_BIN_NAME}" + +inherit fsl-eula-unpack + +SOC_INSTALL_DIR = "SOC_INSTALL_DIR_NOT_SET" +SOC_INSTALL_DIR:mx8mm-nxp-bsp = "mx8mm" + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp -d ${S}/g2d/usr/lib/*.so* ${D}${libdir} + if [ -d ${S}/g2d/usr/lib/${SOC_INSTALL_DIR} ]; then + cp -d ${S}/g2d/usr/lib/${SOC_INSTALL_DIR}/*.so* ${D}${libdir} + fi + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} +} + +# The packaged binaries have been stripped of debug info, so disable +# operations accordingly. +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/recipes-graphics/imx-g2d/imx-pxp-g2d_git.bb b/recipes-graphics/imx-g2d/imx-pxp-g2d_git.bb new file mode 100644 index 00000000..50c37a2c --- /dev/null +++ b/recipes-graphics/imx-g2d/imx-pxp-g2d_git.bb @@ -0,0 +1,28 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2023 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "G2D library using i.MX PXP" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=44a8052c384584ba09077e85a3d1654f" + +PROVIDES += "virtual/libg2d" + +PV = "2.1.0+git${SRCPV}" + +SRC_URI = "${IMX_PXP_G2D_SRC};branch=${SRCBRANCH}" +IMX_PXP_G2D_SRC ?= "git://github.com/nxp-imx/imx-g2d-pxp.git;protocol=https" +SRCBRANCH = "imx_2.1" +SRCREV = "9f9f41fa0e86757f856e1ec7824f56022fe94586" + +S = "${WORKDIR}/git" + +inherit use-imx-headers + +EXTRA_OEMAKE = "PLATFORM=IMX93 INCLUDE='-I${STAGING_INCDIR_IMX}' DEST_DIR=${D}" + +do_install() { + oe_runmake install +} + +COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch new file mode 100644 index 00000000..2ed5587f --- /dev/null +++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-dlsym-workaround-glibc-2.34-build-failure.patch @@ -0,0 +1,30 @@ +From d11884c88eac803c174f759414d0162154450b6a Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Thu, 2 Sep 2021 09:43:33 +0000 +Subject: [PATCH] dlsym: workaround glibc 2.34 build failure + +As suggested in [1], upstream component does not have a solution for the +issue, and therefore for glibc version >= 2.34 dlsym wrappers should be +skipped. + +Link: [1]: https://github.com/apitrace/apitrace/issues/756 + +Upstream-Status: Pending +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + wrappers/dlsym.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/wrappers/dlsym.cpp +=================================================================== +--- git.orig/wrappers/dlsym.cpp ++++ git/wrappers/dlsym.cpp +@@ -34,7 +34,7 @@ + #include "os.hpp" + + +-#if defined(__GLIBC__) && !defined(__UCLIBC__) ++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !(__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) + + + #include <dlfcn.h> diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb new file mode 100644 index 00000000..7d97f475 --- /dev/null +++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_10.0.0.bb @@ -0,0 +1,57 @@ +# Copyright 2018 (C) O.S. Systems Software LTDA. +SUMMARY = "Samples for OpenGL ES" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50" +DEPENDS = "zlib libpng procps" + +SRC_URI = "git://github.com/nxp-imx/apitrace-imx.git;protocol=https;branch=imx_10.0 \ + file://0001-dlsym-workaround-glibc-2.34-build-failure.patch \ +" +SRCREV = "522cb2981289b7ba20d6dd4b4bf75097e079815b" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig perlnative python3native + +PACKAGECONFIG_BACKEND:mx6-nxp-bsp = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'waffle', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ + '', d), d)} \ +" +PACKAGECONFIG_BACKEND:mx7-nxp-bsp = "${PACKAGECONFIG_BACKEND:mx6-nxp-bsp}" +PACKAGECONFIG_BACKEND:mx8-nxp-bsp = "waffle" +PACKAGECONFIG_BACKEND:mx95-nxp-bsp = "waffle" + +PACKAGECONFIG_GPU2D = "" +PACKAGECONFIG_GPU2D:imxgpu2d = "vivante" +PACKAGECONFIG_GPU2D:mx95-nxp-bsp = "" + +PACKAGECONFIG ??= " \ + egl \ + ${PACKAGECONFIG_BACKEND} \ + ${PACKAGECONFIG_GPU2D} \ +" + +PACKAGECONFIG[egl] = "-DENABLE_EGL=ON,-DENABLE_EGL=OFF,virtual/egl" +PACKAGECONFIG[gui] = "-DENABLE_GUI=ON,-DENABLE_GUI=OFF" +PACKAGECONFIG[multiarch] = "-DENABLE_MULTIARCH=ON,-DENABLE_MULTIARCH=OFF" +PACKAGECONFIG[waffle] = "-DENABLE_WAFFLE=ON,-DENABLE_WAFFLE=OFF,waffle" +PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF" +PACKAGECONFIG[vivante] = "-DENABLE_VIVANTE=ON,-DENABLE_VIVANTE=OFF,virtual/libg2d" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" +FILES:${PN} += " \ + ${libdir}/apitrace/scripts/* \ + ${libdir}/apitrace/wrappers/* \ +" +EXTRA_OECMAKE += "\ + -DENABLE_GUI=OFF \ + -DENABLE_STATIC_LIBGCC=OFF \ + -DENABLE_STATIC_LIBSTDCXX=OFF \ + -DPython3_ROOT_DIR=/usr/bin/python3-native \ +" +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxgpu)" +SECURITY_CFLAGS:toolchain-clang = "" + diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb deleted file mode 100644 index a5a9cdfe..00000000 --- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2018 (C) O.S. Systems Software LTDA. -SUMMARY = "Samples for OpenGL ES" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50" -DEPENDS = "imx-gpu-viv zlib libpng procps" - -SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_7.1" -SRCREV = "438c29f7b43c8dd82275f2bac00075f77b9e9699" - -S = "${WORKDIR}/git" - -inherit cmake lib_package pkgconfig perlnative pythonnative - -PACKAGECONFIG ??= "" -PACKAGECONFIG_append = \ - "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', \ - '', d), d)}" -PACKAGECONFIG_append_imxgpu2d = " vivante" -# For 8M, which has 3D but no 2D, eglretrace is not available -# on Wayland except through X11 and waffle. -PACKAGECONFIG_IMXGPU3D = \ - "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', ' waffle x11 x11-egl', '', d)}" -PACKAGECONFIG_IMXGPU3D_imxgpu2d = "" -PACKAGECONFIG_append_imxgpu3d = "${PACKAGECONFIG_IMXGPU3D}" - -PACKAGECONFIG[multiarch] = "-DENABLE_MULTIARCH=ON,-DENABLE_MULTIARCH=OFF" -PACKAGECONFIG[waffle] = "-DENABLE_WAFFLE=ON,-DENABLE_WAFFLE=OFF,waffle" -PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF" -PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=ON,-Dwaffle_has_x11_egl=OFF" -PACKAGECONFIG[vivante] = "-DENABLE_VIVANTE=ON,-DENABLE_VIVANTE=OFF,virtual/libg2d" - -FILES_${PN} = "${bindir} ${libdir}" -FILES_${PN}-dbg += "${libdir}/*/*/.debug" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxgpu)" diff --git a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb deleted file mode 100644 index ab712377..00000000 --- a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and no DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -DEPENDS += "libgal-imx" -PROVIDES += "virtual/libg2d" - -# FIXME: arm packages are mis-labeled with aarch32 suffix -FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" -FSLBIN_NAME_arm = "${PN}-${PV}-aarch32" - -SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" -SRC_URI[arm.md5sum] = "ab7e43c997d3a84764fc3cc72d3b397c" -SRC_URI[arm.sha256sum] = "88b3af3dd109e7c9c457d19441dbb668e7c395d29340d724db3cc42dc04ae87b" -SRC_URI[aarch64.md5sum] = "287f2de4bd407b2eb484d332ae6de157" -SRC_URI[aarch64.sha256sum] = "77f191135f2be6052eabc8cca50b4ea7b5eaec015488cc108fb3f9656a3a1367" - -S = "${WORKDIR}/${FSLBIN_NAME}" - -inherit fsl-eula-unpack - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir} - cp ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -FILES_${PN} = "${libdir}/libg2d* /opt" -FILES_${PN}-dev = "${includedir}" -INSANE_SKIP_${PN} = "ldflags" - -RDEPENDS_${PN} = "libgal-imx" - -COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index b33780d2..2d02d7ab 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc @@ -1,12 +1,12 @@ # Copyright (C) 2012-2016 Freescale Semiconductor # Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP +# Copyright 2017-2024 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "GPU driver and apps for i.MX" SECTION = "libs" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479" DEPENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -17,82 +17,116 @@ DEPENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxcb libxshmfence libxxf86vm', \ '', d)} \ " -DEPENDS_append_imxdrm = " libdrm wayland" +DEPENDS:append:imxdrm = " libdrm wayland" +DEPENDS:append:mx8-nxp-bsp = " patchelf-native" -# imx-gpu-viv does not provide everything it needs to for virtual/libgl -# on x11 backend or on Wayland backend with XWayland support. -# We depend on mesa to fill in what is missing. -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" +DEPENDS:append:libc-musl = " gcompat" -EXTRA_PROVIDES = "" -EXTRA_PROVIDES_append_imxgpu3d = " \ - virtual/libgl \ +PROVIDES += " \ + imx-gpu-viv \ + libgal-imx \ + virtual/egl \ + virtual/libopenvg \ + ${EXTRA_PROVIDES} \ +" +EXTRA_PROVIDES = " \ + ${PROVIDES_OPENCL} \ + ${PROVIDES_OPENGLES3} \ + ${PROVIDES_OPENVX} \ +" +EXTRA_PROVIDES:append:imxgpu3d = " \ virtual/libgles1 \ virtual/libgles2 \ " -EXTRA_PROVIDES_append_mx8 = " \ +EXTRA_PROVIDES:append:mx8-nxp-bsp = " \ virtual/libgbm \ " -EXTRA_PROVIDES_append_mx8qm = " \ - virtual/libopenvx \ -" -PROVIDES += " \ - imx-gpu-viv \ - libgal-imx \ + +PROVIDES_OPENCL = " \ opencl-headers \ - virtual/egl \ - virtual/libopenvg \ - virtual/opencl-headers \ + opencl-clhpp \ + opencl-icd-loader \ virtual/opencl-icd \ - ${EXTRA_PROVIDES} \ " +PROVIDES_OPENCL:mx7-nxp-bsp = "" +PROVIDES_OPENCL:mx8mm-nxp-bsp = "" -RPROVIDES_${PN}_imxgpu3d += "imx-gpu-viv" +PROVIDES_OPENGLES3 = "" +PROVIDES_OPENGLES3:mx8-nxp-bsp = "virtual/libgles3" + +# Note: OpenVX is fully supported on i.MX 8 QuadMax and 8 QuadPlus. +# However, only limited support is provided on other i.MX 8 machines +# as needed for i.MX machine learning packages. +PROVIDES_OPENVX = "" +PROVIDES_OPENVX:mx8-nxp-bsp = "virtual/libopenvx" +PROVIDES_OPENVX:mx8mm-nxp-bsp = "" + +RPROVIDES:${PN}:imxgpu3d += "imx-gpu-viv" PE = "1" -inherit fsl-eula-unpack distro_features_check +inherit fsl-eula-unpack + +FILESEXTRAPATHS:append := "${THISDIR}/imx-gpu-viv:" +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true \ + file://imx_icd.json" + +S = "${WORKDIR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}" -REQUIRED_DISTRO_FEATURES_mx8 = "wayland" +PACKAGECONFIG ?= "" -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" +# Enables valgrind annotations for libgal-imx +PACKAGECONFIG[valgrind] = "" # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below -IMX_PACKAGES_GBM = "" -IMX_PACKAGES_GBM_mx8 = "libgbm-imx libgbm-imx-dev" -PACKAGES =+ "libclc-imx libclc-imx-dev \ - libgl-imx libgl-imx-dev \ - libgles-imx libgles-imx-dev \ +PACKAGES =+ " \ + libgles1-imx libgles1-imx-dev \ libgles2-imx libgles2-imx-dev \ libgles3-imx-dev \ libglslc-imx libglslc-imx-dev \ - libopencl-imx libopencl-imx-dev \ + ${PACKAGES_OPENCL} \ libopenvg-imx libopenvg-imx-dev \ libvdk-imx libvdk-imx-dev \ libegl-imx libegl-imx-dev \ libgal-imx libgal-imx-dev \ - libvivante-dri-imx \ libvsc-imx \ - ${IMX_PACKAGES_GBM} \ - libwayland-viv-imx libwayland-viv-imx-dev \ - libgc-wayland-protocol-imx libgc-wayland-protocol-imx-dev \ + ${PACKAGES_GBM} \ imx-gpu-viv-tools \ imx-gpu-viv-demos \ - libvulkan-imx libvulkan-imx-dev \ - libopenvx-imx libopenvx-imx-dev \ + ${PACKAGES_VULKAN} \ + ${PACKAGES_OPENVX} \ + libnn-imx \ + libspirv-imx \ " + +PACKAGES_GBM = "" +PACKAGES_GBM:mx8-nxp-bsp = "libgbm-imx libgbm-imx-dev" + +PACKAGES_OPENCL = "libclc-imx libopencl-imx libopencl-imx-dev" +PACKAGES_OPENCL:mx7-nxp-bsp = "" +PACKAGES_OPENCL:mx8mm-nxp-bsp = "" + +PACKAGES_OPENVX = \ + "${@bb.utils.contains("PROVIDES_OPENVX", "virtual/libopenvx", \ + "libopenvx-imx libopenvx-imx-dev", "", d)}" + +PACKAGES_VULKAN = "" +PACKAGES_VULKAN:imxvulkan = "libvulkan-imx libvulkan-imx-dev" +PACKAGES_VULKAN:mx8mm-nxp-bsp = "libvulkan-imx libvulkan-imx-dev" + python __anonymous () { has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT') or '0') if has_vivante_kernel_driver_support != '1': raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.') } -USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" -USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" +BACKEND = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "fb", d)}" -# Inhibit warnings about files being stripped. -INHIBIT_PACKAGE_STRIP = "1" +# The packaged binaries have been stripped of debug info, so disable +# operations accordingly. INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" # FIXME: The provided binary doesn't provide soname. If in future BSP # release the libraries are fixed, we can drop this hack. @@ -104,44 +138,50 @@ python __anonymous() { # the source we cannot fix it. Disable the insane check for now. packages = d.getVar('PACKAGES').split() for p in packages: - d.appendVar("INSANE_SKIP_%s" % p, " ldflags") + d.appendVar("INSANE_SKIP:%s" % p, " ldflags") # For the packages that make up the OpenGL interfaces, inject variables so that # they don't get Debian-renamed (which would remove the -imx suffix). - for p in (("libegl", "libegl1"), ("libgl", "libgl1"), + for p in (("libegl", "libegl1"), ("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"), - ("libgles3",) , ("libvulkan",)): + ("libgles3",), ("libgbm",)): fullp = p[0] + "-imx" - pkgs = " ".join(p) - d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") - d.appendVar("RREPLACES_" + fullp, pkgs) - d.appendVar("RPROVIDES_" + fullp, pkgs) - d.appendVar("RCONFLICTS_" + fullp, pkgs) + pkgs = "".join(' %s' % i for i in 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 += "-dev" pkgs = p[0] + "-dev" - d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") - d.appendVar("RREPLACES_" + fullp, pkgs) - d.appendVar("RPROVIDES_" + fullp, pkgs) - d.appendVar("RCONFLICTS_" + fullp, pkgs) + d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") + d.appendVar("RREPLACES:" + fullp, pkgs) + d.appendVar("RPROVIDES:" + fullp, pkgs) + d.appendVar("RCONFLICTS:" + fullp, pkgs) } IS_MX6SL = "0" -IS_MX6SL_mx6sl = "1" +IS_MX6SL:mx6sl-nxp-bsp = "1" IS_MX8 = "0" -IS_MX8_mx8 = "1" +IS_MX8:mx8-nxp-bsp = "1" PACKAGE_FP_TYPE = "hardfp" HAS_GBM = "false" -HAS_GBM_mx8 = "true" +HAS_GBM:mx8-nxp-bsp = "true" + +IMX_SOC = "IMX_SOC_NOT_SET" +IMX_SOC:mx8qm-nxp-bsp = "mx8qm" +IMX_SOC:mx8qxp-nxp-bsp = "mx8qxp" +IMX_SOC:mx8dx-nxp-bsp = "mx8qxp" +IMX_SOC:mx8mp-nxp-bsp = "mx8mp" +IMX_SOC:mx8mq-nxp-bsp = "mx8mq" +IMX_SOC:mx8mn-nxp-bsp = "mx8mn" +IMX_SOC:mx8ulp-nxp-bsp = "mx8ulp" -GLES3_HEADER_REMOVALS = "gl31.h gl32.h" -GLES3_HEADER_REMOVALS_mx8mq = "gl32.h" -GLES3_HEADER_REMOVALS_mx8qxp = "gl32.h" -GLES3_HEADER_REMOVALS_mx8qm = "" +LIBVULKAN_API_VERSION = "1.3.239" do_install () { install -d ${D}${libdir} @@ -153,114 +193,97 @@ do_install () { cp -r ${S}/gpu-demos/opt ${D} cp -r ${S}/gpu-tools/gmem-info/usr/bin/* ${D}${bindir} - # Use vulkan header from vulkan recipe to support vkmark + # Use vulkan header from vulkan-headers recipe to support vkmark rm -rf ${D}${includedir}/vulkan/ + # Install SOC-specific drivers + if [ -d ${S}/gpu-core/usr/lib/${IMX_SOC} ]; then + cp -r ${S}/gpu-core/usr/lib/${IMX_SOC}/* ${D}${libdir} + fi + install -d ${D}${libdir}/pkgconfig if ${HAS_GBM}; then install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc fi - # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb - if [ "${USE_WL}" = "yes" ]; then - - backend=wl + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc + # Install backend-specific drivers + if [ "${BACKEND}" = "wayland" ]; then + # Wayland backend + if ! ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gl.pc ${D}${libdir}/pkgconfig/gl.pc + fi install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc - - if [ "${USE_X11}" = "yes" ]; then - - cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} - - fi - - elif [ "${USE_X11}" = "yes" ]; then - - cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} - - backend=x11 - - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gl_x11.pc ${D}${libdir}/pkgconfig/gl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc - - else - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc - - # Regular framebuffer + cp -r ${S}/gpu-core/usr/lib/wayland/* ${D}${libdir} + elif [ "${IS_MX8}" != "1" ]; then + # Framebuffer backend for i.MX 6 and 7 install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_linuxfb.pc ${D}${libdir}/pkgconfig/egl.pc - - backend=fb - + cp -r ${S}/gpu-core/usr/lib/fb/* ${D}${libdir} + else + # Framebuffer backend for i.MX 8 and beyond + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/egl.pc + cp -r ${S}/gpu-core/usr/lib/wayland/* ${D}${libdir} + set -f + for f in ${FILES:libvdk-imx} ${FILES:libvdk-imx-dev}; do + set +f + rm -rf ${D}/$f + done + rm -rf \ + ${D}/opt/viv_samples/es20 \ + ${D}/opt/viv_samples/tiger \ + ${D}/opt/viv_samples/vdk fi - - # Install Vendor ICDs for OpenCL's installable client driver loader (ICDs Loader) - install -d ${D}${sysconfdir}/OpenCL/vendors/ - install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd - - # We'll only have one backend here so we rename it to generic name - # and avoid rework in other packages, when possible - mv ${D}${libdir}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2.0 - ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2 - ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1 - ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so - mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1.0 - ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so.1 - ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so - mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so - if [ "${USE_WL}" = "yes" ]; then + if [ "${BACKEND}" = "wayland" ] && [ "${IS_MX8}" != "1" ]; then # Special case for libVDK on Wayland backend, deliver fb library as well. - # Need to rename the libraries to avoid the code below that will remove - # *-fb.so and *-wl.so - mv ${D}${libdir}/libVDK-fb.so ${D}${libdir}/libVDK-framebuffer.so - mv ${D}${libdir}/libVDK-wl.so ${D}${libdir}/libVDK-wayland.so - ln -sf libVDK-wayland.so ${D}${libdir}/libVDK.so - else - mv ${D}${libdir}/libVDK-${backend}.so ${D}${libdir}/libVDK.so + cp ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 ${D}${libdir}/libVDK-fb.so.1.2.0 fi - # update libglesv2 as backend dependent - rm -rf ${D}${libdir}/libGLESv2* - cp ${S}/gpu-core/usr/lib/libGLESv2-${backend}.so ${D}${libdir}/libGLESv2.so.2.0.0 - ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so.2 - ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so + if [ -z "${PACKAGES_OPENCL}" ]; then + set -f + for f in ${FILES:libopencl-imx} ${FILES:libopencl-imx-dev} ${FILES:libclc-imx}; do + set +f + rm -rf ${D}$f + done + rm -rf ${D}/opt/viv_samples/cl11 + else + # Install Vendor ICDs for OpenCL's installable client driver loader (ICDs Loader) + install -d ${D}${sysconfdir}/OpenCL/vendors/ + install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd - if [ "${IS_MX8}" = "1" ]; then - # Install the vulkan driver in a sub-folder. When installed in the same - # folder as the vulkan loader layer library, an incorrect linkage is - # created from libvulkan.so.1 to our library instead of the loader - # layer library. - install -d ${D}${libdir}/vulkan - mv ${D}${libdir}/libvulkan-${backend}.so ${D}${libdir}/vulkan/libvulkan_VSI.so + if [ "${OPENCL_VX_INTRINSIC_EXTENSION_PACKAGES}" = "" ]; then + rm -f ${D}${includedir}/CL/cl_viv_vx_ext.h + fi fi - for header in ${GLES3_HEADER_REMOVALS}; do - rm -f ${D}${includedir}/GLES3/${header} - done - # skip packaging wayland libraries if no support is requested - if [ "${USE_WL}" = "no" ]; then - find ${D}${libdir} -name "libgc_wayland_protocol.*" -exec rm '{}' ';' - find ${D}${libdir} -name "libwayland-viv.*" -exec rm '{}' ';' + if [ -z "${PACKAGES_OPENVX}" ]; then + set -f + for f in ${FILES:libopenvx-imx} ${FILES:libopenvx-imx-dev}; do + set +f + rm -rf ${D}$f + done fi - for i in wl x11 fb dri; do - find ${D}${libdir} -name "*-$i.so" -exec rm '{}' ';' - find ${D}${libdir} -name "*.$i.so" -exec rm '{}' ';' - done + if [ "${IS_MX8}" = "1" ]; then + if [ -z "${PACKAGES_VULKAN}" ]; then + set -f + for f in ${FILES:libvulkan-imx} ${FILES:libvulkan-imx-dev}; do + set +f + rm -rf ${D}$f + done + else + install -Dm 0644 ${UNPACKDIR}/imx_icd.json ${D}${sysconfdir}/vulkan/icd.d/imx_icd.json + sed -i "s,%libdir%,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/imx_icd.json + sed -i "s,%api_version%,${LIBVULKAN_API_VERSION}," ${D}${sysconfdir}/vulkan/icd.d/imx_icd.json + fi + fi # FIXME: MX6SL does not have 3D support; hack it for now if [ "${IS_MX6SL}" = "1" ]; then rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \ \ - ${D}${libdir}/libGL* ${D}${includedir}/GL* ${D}${libdir}/pkgconfig/gl.pc \ - \ ${D}${libdir}/libGLES* ${D}${libdir}/pkgconfig/gles*.pc \ \ ${D}${libdir}/libOpenCL* ${D}${includedir}/CL \ @@ -281,90 +304,113 @@ do_install () { chown -R root:root "${D}" } -ALLOW_EMPTY_${PN} = "1" +do_install:append:libc-musl() { + # libs + for f in `find ${D}${libdir} -name '*.so*' -type f` + do + patchelf --add-needed libgcompat.so.0 $f + done + # binaries + for f in `find ${D}/opt ${D}${bindir} -name '*' -type f -executable` + do + # prune scripts + if `patchelf --print-interpreter $f 2>&1 > /dev/null` + then + patchelf --set-interpreter ${root_prefix}`patchelf --print-interpreter $f` $f + patchelf --add-needed libgcompat.so.0 $f + fi + done +} -# FIXME: Remove the following lines after adding libopenvx package -INSANE_SKIP_imx-gpu-viv-dev += "dev-elf" -INSANE_SKIP_libclc-imx += "dev-deps" +ALLOW_EMPTY:${PN} = "1" -FILES_libclc-imx = "${libdir}/libCLC${SOLIBS}" -FILES_libclc-imx-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}" +FILES:libclc-imx = "${libdir}/libCLC${SOLIBS}" +FILES:libegl-imx = "${libdir}/libEGL${REALSOLIBS} ${libdir}/libEGL${SOLIBS} " +FILES:libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" # libEGL.so is used by some demo apps from Freescale -INSANE_SKIP_libegl-imx += "dev-so" -FILES_libegl-imx = "${libdir}/libEGL${REALSOLIBS} ${libdir}/libEGL${SOLIBSDEV} " -FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" - -FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}" -FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL" -RDEPENDS_libgal-imx += "kernel-module-imx-gpu-viv" -RPROVIDES_libgal-imx += "libgal-imx" -INSANE_SKIP_libgal-imx += "build-deps" - -FILES_libvsc-imx = "${libdir}/libVSC${SOLIBS}" - -FILES_libgbm-imx_mx8 = "${libdir}/libgbm${SOLIBS} ${libdir}/gbm_viv${SOLIBS}" -FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}" -RDEPENDS_libgbm-imx_append_mx8 = " libdrm" +INSANE_SKIP:libegl-imx += "dev-so" -FILES_libvulkan-imx = "${libdir}/vulkan/libvulkan_VSI${SOLIBS}" -FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/vulkan/libvulkan_VSI${SOLIBSDEV}" -INSANE_SKIP_libvulkan-imx += "dev-deps dev-so" +FILES:libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}" +FILES:libgal-imx-dev = "${includedir}/HAL" +RDEPENDS:libgal-imx += "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'valgrind', '', d)}" +RPROVIDES:libgal-imx += "libgal-imx" +RRECOMMENDS:libgal-imx += "kernel-module-imx-gpu-viv" +INSANE_SKIP:libgal-imx += "build-deps" -FILES_libopenvx-imx = "${libdir}/libOpenVX${SOLIBS} ${libdir}/libOpenVXC${SOLIBS} ${libdir}/libOpenVXU${SOLIBS}" -FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libopenVX${SOLIBSDEV}" +FILES:libvsc-imx = "${libdir}/libVSC${SOLIBS}" -FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}" -FILES_libgl-imx-dev = "${libdir}/libGL${SOLIBSDEV} ${includedir}/GL" +FILES:libgbm-imx = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBS} ${libdir}/libgbm_viv${SOLIBS}" +FILES:libgbm-imx-dev = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" +RDEPENDS:libgbm-imx:append = " libdrm" +INSANE_SKIP:libgbm-imx += "dev-so" -# libEGL needs to open libGLESv1.so -INSANE_SKIP_libgles-imx += "dev-so" -FILES_libgles-imx = "${libdir}/libGLESv1*${REALSOLIBS} ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${REALSOLIBS} ${libdir}/libGLES_*${SOLIBS}" -FILES_libgles-imx-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV} ${libdir}/pkgconfig/glesv1_cm.pc" +FILES:libvulkan-imx = "\ + ${libdir}/libvulkan_VSI${REALSOLIBS} \ + ${sysconfdir}/vulkan" +FILES:libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}" -# libEGL needs to open libGLESv2.so -INSANE_SKIP_libgles2-imx += "dev-so" -FILES_libgles2-imx = "${libdir}/libGLESv2${REALSOLIBS} ${libdir}/libGLESv2${SOLIBS}" -FILES_libgles2-imx-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV} ${libdir}/pkgconfig/glesv2.pc" -RDEPENDS_libgles2-imx = "libglslc-imx" +FILES:libspirv-imx = " \ + ${libdir}/libSPIRV_viv${SOLIBS} \ +" -FILES_libgles3-imx-dev = "${includedir}/GLES3" +FILES:libopenvx-imx = " \ + ${libdir}/libOpenVX${REALSOLIBS} \ + ${libdir}/libOpenVXC${SOLIBS} \ + ${libdir}/libOpenVXU${SOLIBS} \ + ${libdir}/libOvx*${SOLIBS} \ + ${libdir}/libArchModelSw${SOLIBS} \ +" +FILES:libopenvx-imx-dev = "${includedir}/VX ${libdir}/libOpenVX${SOLIBSDEV}" +RDEPENDS:libopenvx-imx = "libnn-imx ${OPENCL_VX_INTRINSIC_EXTENSION_PACKAGES}" +OPENCL_VX_INTRINSIC_EXTENSION_PACKAGES = "" +OPENCL_VX_INTRINSIC_EXTENSION_PACKAGES:mx8qm-nxp-bsp = "libclc-imx libopencl-imx-dev" +OPENCL_VX_INTRINSIC_EXTENSION_PACKAGES:mx8mp-nxp-bsp = "libclc-imx libopencl-imx-dev" +INSANE_SKIP:libopenvx-imx += "dev-deps" + +FILES:libgles1-imx = "${libdir}/libGLESv1*${REALSOLIBS} ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${REALSOLIBS} ${libdir}/libGLES_*${SOLIBS}" +FILES:libgles1-imx-dev = "${includedir}/GLES ${libdir}/pkgconfig/glesv1_cm.pc" +RPROVIDES:libgles1-imx = "libgles-imx" +RPROVIDES:libgles1-imx-dev = "libgles-imx-dev" +# libEGL does dlopen of libGLESv1.so +INSANE_SKIP:libgles1-imx += "dev-so" + +FILES:libgles2-imx = "${libdir}/libGLESv2${REALSOLIBS} ${libdir}/libGLESv2${SOLIBS}" +FILES:libgles2-imx-dev = "${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" +RDEPENDS:libgles2-imx = "libglslc-imx" +# libEGL does dlopen of libGLESv2.so +INSANE_SKIP:libgles2-imx += "dev-so" + +FILES:libgles3-imx-dev = "${includedir}/GLES3" # as long as there is no libgles3: ship libgles3-dev along with # libgles2-dev - otherwise GLES3 headers have to be added manually -RDEPENDS_libgles2-imx-dev += "libgles3-imx-dev" +RDEPENDS:libgles2-imx-dev += "libgles3-imx-dev" -FILES_libglslc-imx = "${libdir}/libGLSLC${SOLIBS}" -FILES_libglslc-imx-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}" +FILES:libglslc-imx = "${libdir}/libGLSLC${SOLIBS}" -FILES_libopencl-imx = "${libdir}/libOpenCL${SOLIBS} \ +FILES:libopencl-imx = "${libdir}/libOpenCL${REALSOLIBS} \ ${libdir}/libVivanteOpenCL${SOLIBS} \ + ${libdir}/libLLVM_viv${SOLIBS} \ ${sysconfdir}/OpenCL/vendors/Vivante.icd" -FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}" -RDEPENDS_libopencl-imx= "libclc-imx" - -INSANE_SKIP_libopenvg-imx += "dev-so" -FILES_libopenvg-imx = "${libdir}/libOpenVG*${SOLIBS}" -FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc" +FILES:libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}" +RDEPENDS:libopencl-imx= "libclc-imx" -FILES_libvdk-imx = "${libdir}/libVDK*${SOLIBS}" -FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" -INSANE_SKIP_libvdk-imx += "dev-so" +FILES:libopenvg-imx = "${libdir}/libOpenVG*${REALSOLIBS} ${libdir}/libOpenVG*${SOLIBS}" +FILES:libopenvg-imx-dev = "${includedir}/VG ${libdir}/pkgconfig/vg.pc" +# libEGL does dlopen of libOpenVG.so +INSANE_SKIP:libopenvg-imx += "dev-so" -FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so" -RDEPENDS_libvivante-dri-imx = "libdrm" +FILES:libvdk-imx = "${libdir}/libVDK*${REALSOLIBS}" +FILES:libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" -INSANE_SKIP_libwayland-viv-imx += "dev-so" -FILES_libwayland-viv-imx = "${libdir}/libwayland-viv${REALSOLIBS} ${libdir}/libwayland-viv${SOLIBS}" -FILES_libwayland-viv-imx-dev = "${includedir}/wayland-viv ${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc" -RPROVIDES_libwayland-viv-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xf86-video-imx-vivante', '', d)}" +FILES:imx-gpu-viv-tools = "${bindir}/gmem_info" -INSANE_SKIP_libgc-wayland-protocol-imx += "dev-so" -FILES_libgc-wayland-protocol-imx = "${libdir}/libgc_wayland_protocol${REALSOLIBS} ${libdir}/libgc_wayland_protocol${SOLIBS}" -FILES_libgc-wayland-protocol-imx-dev = "${libdir}/libgc_wayland_protocol${SOLIBSDEV} ${libdir}/pkgconfig/gc_wayland_protocol.pc" +FILES:imx-gpu-viv-demos = "/opt" +INSANE_SKIP:imx-gpu-viv-demos += "rpaths dev-deps" -FILES_imx-gpu-viv-tools = "${bindir}/gmem_info" +FILES:libnn-imx = "${libdir}/libNN*${SOLIBS}" -FILES_imx-gpu-viv-demos = "/opt" -INSANE_SKIP_imx-gpu-viv-demos += "rpaths dev-deps" +# It will use gcompat at runtime therefore checking for these at compile time wont be useful as +# they dont match musl/gcompat but it should run fine +INSANE_SKIP:append:libc-musl = " file-rdeps" -# COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx8)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv/imx_icd.json b/recipes-graphics/imx-gpu-viv/imx-gpu-viv/imx_icd.json new file mode 100644 index 00000000..21d83f94 --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv/imx_icd.json @@ -0,0 +1,7 @@ +{ + "file_format_version": "1.0.0", + "ICD": { + "library_path": "%libdir%/libvulkan_VSI.so.1", + "api_version": "%api_version%" + } +} diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb deleted file mode 100644 index 3564aab0..00000000 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc -SRC_URI[md5sum] = "ef9e0b5fcb140c72b63dcf8b8da0be6b" -SRC_URI[sha256sum] = "7c31d1c7b45309ff7ca667b4d69b7c3b5fa320dcdcd90f2eb895f66f826f422b" - -PACKAGE_FP_TYPE = "hardfp" - -COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb deleted file mode 100644 index 004cdcb2..00000000 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb +++ /dev/null @@ -1,6 +0,0 @@ -require imx-gpu-viv-6.inc - -SRC_URI[md5sum] = "89cd1ad71128bc1b200c18a5a8db95b0" -SRC_URI[sha256sum] = "bf27b753b45777e90a158819d80d91f5226b34d71dc4ec4eea40f2c10c46159a" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch32.bb new file mode 100644 index 00000000..2b172466 --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch32.bb @@ -0,0 +1,10 @@ +require imx-gpu-viv-6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" + +IMX_SRCREV_ABBREV = "b07999b" + +SRC_URI[md5sum] = "eae60321ac971293d3213c88b9198ca0" +SRC_URI[sha256sum] = "ef9be89d3dd3b6448c720e061a8b81bdd26f7a5ff70de1786a5feef2e4836474" + +COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch64.bb new file mode 100644 index 00000000..b3c39736 --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.11.p2.4-aarch64.bb @@ -0,0 +1,10 @@ +require imx-gpu-viv-6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" + +IMX_SRCREV_ABBREV = "b07999b" + +SRC_URI[md5sum] = "142d9b9ef6f440b8e307569873bdb6b5" +SRC_URI[sha256sum] = "ba86656c357c5d9793058695f320e4cf650d4693e84321870bad392f2a622807" + +COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" diff --git a/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend b/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend index 5b82b3f4..71baa53d 100644 --- a/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend +++ b/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend @@ -1,5 +1,5 @@ # Append EGL_CFLAGS to CFLAGS -CFLAGS_append_imxgpu = " \ +CFLAGS:append:imxgpu = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_API_FB', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DWL_EGL_PLATFORM', '', d)} \ " diff --git a/recipes-graphics/libsdl2/libsdl2_%.bbappend b/recipes-graphics/libsdl2/libsdl2_%.bbappend index 303ea63a..3b2655ce 100644 --- a/recipes-graphics/libsdl2/libsdl2_%.bbappend +++ b/recipes-graphics/libsdl2/libsdl2_%.bbappend @@ -1,8 +1,8 @@ # what vivante driver does libsdl2 mean? Anyway it fails with missing functions as # VIVANTE_Create VIVANTE_GLES_GetProcAddress VIVANTE_GLES_UnloadLibrary ... -EXTRA_OECONF_append_imxgpu2d = " --disable-video-vivante" +EXTRA_OECMAKE:append:imxgpu = " -DSDL_VIVANTE=OFF" -CFLAGS_append_imxgpu = " -DLINUX \ +CFLAGS:append:imxgpu = " -DLINUX \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_API_FB', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DWL_EGL_PLATFORM', '', d)} \ " diff --git a/recipes-graphics/libva/libva_%.bbappend b/recipes-graphics/libva/libva_%.bbappend new file mode 100644 index 00000000..080052f8 --- /dev/null +++ b/recipes-graphics/libva/libva_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:remove:imxgpu = "glx" diff --git a/recipes-graphics/mesa/libglu_%.bbappend b/recipes-graphics/mesa/libglu_%.bbappend new file mode 100644 index 00000000..96745dd8 --- /dev/null +++ b/recipes-graphics/mesa/libglu_%.bbappend @@ -0,0 +1 @@ +REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" diff --git a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch deleted file mode 100644 index 19bcca98..00000000 --- a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> -Date: Thu, 9 Apr 2015 15:47:21 -0500 -Subject: [PATCH] Add OpenVG demos to support wayland. - -Upstream-Status: Pending - -Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> ---- - src/egl/Makefile.am | 6 +++--- - src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++---- - 2 files changed, 32 insertions(+), 7 deletions(-) - -Index: mesa-demos-8.2.0/src/egl/Makefile.am -=================================================================== ---- mesa-demos-8.2.0.orig/src/egl/Makefile.am 2016-05-09 11:45:51.479100180 -0500 -+++ mesa-demos-8.2.0/src/egl/Makefile.am 2016-05-09 11:45:51.475100160 -0500 -@@ -26,10 +26,10 @@ - eglut \ - opengles1 \ - opengles2 \ -- oes_vg -+ oes_vg \ -+ openvg - - if HAVE_GLU - SUBDIRS += \ -- opengl \ -- openvg -+ opengl - endif -Index: mesa-demos-8.2.0/src/egl/openvg/Makefile.am -=================================================================== ---- mesa-demos-8.2.0.orig/src/egl/openvg/Makefile.am 2016-05-09 11:45:51.479100180 -0500 -+++ mesa-demos-8.2.0/src/egl/openvg/Makefile.am 2016-05-09 12:39:30.000000000 -0500 -@@ -47,13 +47,26 @@ - endif - endif - -+if HAVE_WAYLAND -+EGL_WL_DEMOS = \ -+ lion_wayland \ -+ sp_wayland -+ -+if HAVE_FREETYPE2 -+EGL_WL_DEMOS += \ -+ vgtext_wayland -+endif -+endif -+ - if HAVE_EGL - if HAVE_VG - bin_PROGRAMS = \ -- $(EGL_X11_DEMOS) -+ $(EGL_X11_DEMOS) \ -+ $(EGL_WL_DEMOS) - endif - endif - -+if HAVE_X11 - lion_x11_SOURCES = lion.c lion-render.c lion-render.h - sp_x11_SOURCES = sp.c - -@@ -63,6 +76,20 @@ - text_SOURCES = text.c - text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ - text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la -+endif -+ -+if HAVE_WAYLAND -+lion_wayland_SOURCES = lion.c lion-render.c lion-render.h -+lion_wayland_LDADD = ../eglut/libeglut_wayland.la -+ -+sp_wayland_SOURCES = sp.c -+sp_wayland_LDADD = ../eglut/libeglut_wayland.la -+ -+vgtext_wayland_SOURCES = text.c -+vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ -+vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la -+ -+endif - - SUBDIRS = \ - trivial diff --git a/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch b/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch deleted file mode 100644 index 180a9d84..00000000 --- a/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> -Date: Tue, 7 Apr 2015 17:58:45 -0500 -Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling - -Upstream Status: Pending - -Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> ---- - src/egl/eglut/eglut_wayland.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c -index 968b33f..5664d35 100644 ---- a/src/egl/eglut/eglut_wayland.c -+++ b/src/egl/eglut/eglut_wayland.c -@@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time) - - if (win->display_cb) - win->display_cb(); -- eglSwapBuffers(_eglut->dpy, win->surface); -+ /*eglSwapBuffers(_eglut->dpy, win->surface);*/ - - if (callback) - wl_callback_destroy(callback); --- -2.3.5 - diff --git a/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch b/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch index d899540f..8401793c 100644 --- a/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch +++ b/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i Vivante libGL does not provide the glWindowPos2iARB symbol, but glWindowPos2i. Use this instead. -Upstream-Status: Inapropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] Reported-by: Jeremy Stashluk <jstashluk@dekaresearch.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> diff --git a/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch b/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch index eb541d65..459a6ebd 100644 --- a/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch +++ b/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch @@ -1,7 +1,8 @@ mesa-demos: Add extension header to fix build break now that gl1 is removed -Upstream Status: Pending +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> diff --git a/src/egl/opengles1/clear.c b/src/egl/opengles1/clear.c index 9fe1b5291e1905fd6fe572063ed707d59ce45a81..ca9954a21b5f475709dbdef07f90b900962fcbc7 100644 --- a/src/egl/opengles1/clear.c diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend index 94db4157..ff5d71ae 100644 --- a/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -1,22 +1,23 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_imxgpu = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ - file://fix-clear-build-break.patch \ - file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \ - file://Add-OpenVG-demos-to-support-wayland.patch" +SRC_URI:append:imxgpu = " \ + file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ + file://fix-clear-build-break.patch" -PACKAGECONFIG_IMX_TO_REMOVE_GLES = "" -PACKAGECONFIG_IMX_TO_REMOVE_GLES_imxgpu2d = "gles1 gles2" -PACKAGECONFIG_IMX_TO_REMOVE_GLES_imxgpu3d = "" -PACKAGECONFIG_IMX_TO_REMOVE = "${PACKAGECONFIG_IMX_TO_REMOVE_GLES}" -PACKAGECONFIG_IMX_TO_REMOVE_append_imxgpu = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'glu x11', '', d)} \ -" -PACKAGECONFIG_remove = "${PACKAGECONFIG_IMX_TO_REMOVE}" +REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" -PACKAGECONFIG_IMX_TO_APPEND = "" -PACKAGECONFIG_IMX_TO_APPEND_append_imxgpu = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glut', '', d)} \ -" -PACKAGECONFIG_append = "${PACKAGECONFIG_IMX_TO_APPEND}" +PACKAGECONFIG:remove = " \ + ${PACKAGECONFIG_REMOVE_IF_2D_ONLY} \ + ${PACKAGECONFIG_REMOVE_IF_GPU}" +PACKAGECONFIG_REMOVE_IF_2D_ONLY = "" +PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu2d = "gles1 gles2" +PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu3d = "" +PACKAGECONFIG_REMOVE_IF_GPU = "" +PACKAGECONFIG_REMOVE_IF_GPU:imxgpu = "x11" + +PACKAGECONFIG:append = " \ + ${PACKAGECONFIG_APPEND_IF_GPU}" +PACKAGECONFIG_APPEND_IF_GPU = "" +PACKAGECONFIG_APPEND_IF_GPU:imxgpu = "glu" + +PACKAGECONFIG[glu] = ",,libglu" diff --git a/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf b/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf new file mode 100644 index 00000000..db4f8740 --- /dev/null +++ b/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf @@ -0,0 +1,3 @@ +[Manager] +DefaultEnvironment=MESA_GL_VERSION_OVERRIDE=2.1 ETNA_MESA_DEBUG=nir + diff --git a/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.sh b/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.sh new file mode 100644 index 00000000..8854a877 --- /dev/null +++ b/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.sh @@ -0,0 +1,2 @@ +export MESA_GL_VERSION_OVERRIDE=2.1 +export ETNA_MESA_DEBUG=nir diff --git a/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb b/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb new file mode 100644 index 00000000..658b28de --- /dev/null +++ b/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb @@ -0,0 +1,31 @@ +SUMMARY = "Mesa environment variables for etnaviv on xserver" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "\ + file://mesa-etnaviv.conf \ + file://mesa-etnaviv.sh \ +" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install:use-mainline-bsp() { + # MESA global envirronment variables + + # systemd + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -D -m 644 ${UNPACKDIR}/mesa-etnaviv.conf \ + ${D}${sysconfdir}/systemd/system.conf.d/mesa-etnaviv.conf + fi + + # sysvinit + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -D -m 644 ${UNPACKDIR}/mesa-etnaviv.sh \ + ${D}${sysconfdir}/profile.d/mesa-etnaviv.sh + fi +} + +ALLOW_EMPTY:${PN} = "1" diff --git a/recipes-graphics/mesa/mesa-gl_%.bbappend b/recipes-graphics/mesa/mesa-gl_%.bbappend index 465c8932..6545571f 100644 --- a/recipes-graphics/mesa/mesa-gl_%.bbappend +++ b/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -1 +1,8 @@ -COMPATIBLE_MACHINE_imxgpu2d = "(-)" +DEPENDS:append:imxgpu = " virtual/egl" + +do_install:append:imxgpu() { + # imx-gpu-viv and mali-imx both provide /usr/include/KHR, so drop the mesa-gl one + rm -rf ${D}${includedir}/KHR +} + +COMPATIBLE_MACHINE:imxgpu = "(imxgpu)" diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index 9f183db9..acddfbc6 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -1,8 +1,8 @@ -PROVIDES_remove_imxgpu = "virtual/egl" -PROVIDES_remove_imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" +PROVIDES:remove:imxgpu = "virtual/egl" +PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" -PACKAGECONFIG_remove_imxgpu = "egl gbm" -PACKAGECONFIG_remove_imxgpu3d = "gles" +PACKAGECONFIG:remove:imxgpu = "egl gbm" +PACKAGECONFIG:remove:imxgpu3d = "gles" # FIXME: mesa should support 'x11-no-tls' option python () { @@ -14,10 +14,14 @@ python () { d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx")) } -# Enable Etnaviv support -PACKAGECONFIG_append_use-mainline-bsp = " gallium" -GALLIUMDRIVERS_append_use-mainline-bsp_armv7a = ",etnaviv,kmsro,vc4" -GALLIUMDRIVERS_append_use-mainline-bsp_armv7ve = ",etnaviv,kmsro,vc4" +# Enable Etnaviv and Freedreno support +PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv kmsro freedreno" + +# For NXP BSP, GPU drivers don't support dri +PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri" + +# mainline/etnaviv: +RRECOMMENDS:${PN}-megadriver:append:use-mainline-bsp = " libdrm-etnaviv mesa-etnaviv-env" BACKEND = \ "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -25,9 +29,10 @@ BACKEND = \ 'fb', d), d)}" # FIXME: Dirty hack to allow use of Vivante GPU libGL binary -do_install_append_imxgpu3d () { +do_install:append:imxgpu3d () { rm -f ${D}${libdir}/libGL.* \ ${D}${includedir}/GL/gl.h \ + ${D}${includedir}/GL/glcorearb.h \ ${D}${includedir}/GL/glext.h \ ${D}${includedir}/GL/glx.h \ ${D}${includedir}/GL/glxext.h @@ -36,6 +41,6 @@ do_install_append_imxgpu3d () { fi } -do_install_append_imxgpu () { +do_install:append:imxgpu () { rm -rf ${D}${includedir}/KHR } diff --git a/recipes-graphics/pango/pango_%.bbappend b/recipes-graphics/pango/pango_%.bbappend new file mode 100644 index 00000000..bf8c38fc --- /dev/null +++ b/recipes-graphics/pango/pango_%.bbappend @@ -0,0 +1,5 @@ +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" diff --git a/recipes-graphics/piglit/piglit_%.bbappend b/recipes-graphics/piglit/piglit_%.bbappend new file mode 100644 index 00000000..fe2a0bc2 --- /dev/null +++ b/recipes-graphics/piglit/piglit_%.bbappend @@ -0,0 +1,6 @@ +PACKAGECONFIG:remove:imxgpu = "glx" + +PACKAGECONFIG:append:mx8-nxp-bsp = " opencl" +PACKAGECONFIG:append:mx9-nxp-bsp = " opencl" + +CFLAGS:append:imxgpu:toolchain-clang = " -Wno-error=int-conversion" diff --git a/recipes-graphics/vulkan/vulkan-loader_1.3.261.1.imx.bbappend b/recipes-graphics/vulkan/vulkan-loader_1.3.261.1.imx.bbappend new file mode 100644 index 00000000..c1a9902b --- /dev/null +++ b/recipes-graphics/vulkan/vulkan-loader_1.3.261.1.imx.bbappend @@ -0,0 +1,9 @@ +# libvulkan.so is loaded dynamically, so put it in the main package +SOLIBS = ".so*" +FILES_SOLIBSDEV = "" +INSANE_SKIP:${PN} += "dev-so" + +# Override default mesa drivers with i.MX GPU drivers +RRECOMMENDS:${PN}:imxvulkan = "libvulkan-imx" +# Override default mesa drivers with i.MX GPU drivers +RRECOMMENDS:${PN}:mx95-nxp-bsp = "mali-imx-libvulkan" diff --git a/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch b/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch new file mode 100644 index 00000000..01849d92 --- /dev/null +++ b/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch @@ -0,0 +1,47 @@ +From 87fc7761cff5931a58984c7f7e78f421a0660e0e Mon Sep 17 00:00:00 2001 +From: Tom Hochstein <tom.hochstein@nxp.com> +Date: Wed, 22 Apr 2020 13:40:04 -0500 +Subject: [PATCH] meson: Add missing wayland dependency on EGL + +The build was not finding egl.pc due to this +missing dependency. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> + +--- + meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: git/meson.build +=================================================================== +--- git.orig/meson.build ++++ git/meson.build +@@ -64,6 +64,7 @@ dep_drm = _dep_null + dep_egl = _dep_null + dep_wayland_client = _dep_null + dep_wayland_egl = _dep_null ++dep_wayland_wayland_egl = _dep_null + dep_wayland_scanner = _dep_null + dep_wayland_proto = _dep_null + dep_x11_xcb = _dep_null +@@ -104,7 +105,8 @@ else + dep_wayland_client = dependency( + 'wayland-client', version : '>= 1.10', required : get_option('wayland'), + ) +- dep_wayland_egl = dependency( ++ dep_wayland_egl = dependency('egl', required : get_option('wayland')) ++ dep_wayland_wayland_egl = dependency( + 'wayland-egl', version : '>= 9.1', required : get_option('wayland'), + ) + dep_wayland_scanner = dependency( +@@ -122,7 +124,7 @@ else + wayland_xdg_shell_xml = join_paths(dep_wayland_proto.get_variable(pkgconfig: 'pkgdatadir'), + 'stable/xdg-shell/xdg-shell.xml') + endif +- build_wayland = dep_egl.found() and dep_wayland_client.found() and dep_wayland_egl.found() and dep_wayland_scanner.found() and dep_wayland_proto.found() ++ build_wayland = dep_egl.found() and dep_wayland_client.found() and dep_wayland_egl.found() and dep_wayland_scanner.found() and dep_wayland_proto.found() and dep_wayland_wayland_egl.found() + + # We're interested only in the headers provided + # FINISHME: make x11_xcb compile-only dependency diff --git a/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch new file mode 100644 index 00000000..01b2b040 --- /dev/null +++ b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch @@ -0,0 +1,38 @@ +From 12ac4372cc6a66e83b61f8510bdaa4f11c72113d Mon Sep 17 00:00:00 2001 +From: Tom Hochstein <tom.hochstein@nxp.com> +Date: Wed, 22 Apr 2020 14:08:36 -0500 +Subject: [PATCH] meson: Separate surfaceless option from x11 + +Allow surfaceless build separate from the x11 option. +Also require gbm for surfaceless build. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> + +--- + meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: git/meson.build +=================================================================== +--- git.orig/meson.build ++++ git/meson.build +@@ -72,6 +72,7 @@ dep_gbm = _dep_null + dep_cocoa = _dep_null + dep_core_foundation = _dep_null + dep_gl_headers = _dep_null ++dep_surfaceless = _dep_null + + # Get dependencies + if build_wgl +@@ -99,7 +100,8 @@ else + build_gbm = dep_drm.found() and dep_egl.found() and dep_gbm.found() + + dep_egl = dependency('egl', required : get_option('surfaceless_egl')) +- build_surfaceless = dep_egl.found() ++ dep_gbm = dependency('gbm', required : get_option('surfaceless_egl')) ++ build_surfaceless = dep_egl.found() and dep_gbm.found() + + dep_egl = dependency('egl', required : get_option('wayland')) + dep_wayland_client = dependency( diff --git a/recipes-graphics/waffle/waffle_%.bbappend b/recipes-graphics/waffle/waffle_%.bbappend index 9a9de0ed..e88f558d 100644 --- a/recipes-graphics/waffle/waffle_%.bbappend +++ b/recipes-graphics/waffle/waffle_%.bbappend @@ -1,7 +1,18 @@ -PACKAGECONFIG_X11 = "" -PACKAGECONFIG_X11_append_imxgpu3d = " x11-egl glx" -PACKAGECONFIG_imxgpu = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'gbm', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_X11}', \ - '', d), d)} \ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-meson-Add-missing-wayland-dependency-on-EGL.patch \ + file://0002-meson-Separate-surfaceless-option-from-x11.patch \ +" + +PACKAGECONFIG_IMXGPU_X11 = "" +PACKAGECONFIG_IMXGPU_X11:imxgpu3d = "x11-egl glx" +PACKAGECONFIG_IMXGPU_GBM = "gbm" +PACKAGECONFIG_IMXGPU_GBM:mx6-nxp-bsp = "" +PACKAGECONFIG_IMXGPU_GBM:mx7-nxp-bsp = "" +PACKAGECONFIG:imxgpu = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_IMXGPU_X11}', \ + '', d), d)} \ + ${PACKAGECONFIG_IMXGPU_GBM} \ " diff --git a/recipes-graphics/wayland/required-distro-features.inc b/recipes-graphics/wayland/required-distro-features.inc new file mode 100644 index 00000000..bb4a0e8e --- /dev/null +++ b/recipes-graphics/wayland/required-distro-features.inc @@ -0,0 +1,8 @@ +# distro features required by weston recipes + +inherit features_check + +# requires pam enabled if started via systemd +# +REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" + diff --git a/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch b/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch deleted file mode 100644 index 55f4cb8f..00000000 --- a/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch +++ /dev/null @@ -1,195 +0,0 @@ -From b4be5e338be2301f83f4dfdc0cbb740f0a783464 Mon Sep 17 00:00:00 2001 -From: Haihua Hu <jared.hu@nxp.com> -Date: Thu, 14 Jun 2018 13:54:08 +0800 -Subject: [PATCH 1/2] unstable: Add alpha-compositing protocol - -It's based on the Chromium Wayland protocol of the same name ([1]) -and Alexandros's modified version ([2])with a few changes -made to the blending_equation enumeration. - -Add one more blending_equation "src_alpha / src_alpha" - -[1] https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -[2] https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.html - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu <jared.hu@nxp.com> ---- - Makefile.am | 1 + - unstable/alpha-compositing/README | 6 + - .../alpha-compositing-unstable-v1.xml | 136 +++++++++++++++++++++ - 3 files changed, 143 insertions(+) - create mode 100644 unstable/alpha-compositing/README - create mode 100644 unstable/alpha-compositing/alpha-compositing-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index 4b9a901..e6c44ec 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -23,6 +23,7 @@ unstable_protocols = \ - unstable/xdg-decoration/xdg-decoration-unstable-v1.xml \ - unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml \ - unstable/primary-selection/primary-selection-unstable-v1.xml \ -+ unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/alpha-compositing/README b/unstable/alpha-compositing/README -new file mode 100644 -index 0000000..d874156 ---- /dev/null -+++ b/unstable/alpha-compositing/README -@@ -0,0 +1,6 @@ -+Alpha compositing protocol -+ -+Maintainers: -+David Reveman <reveman at chromium.org> -+Alexandros Frantzis <alexandros.frantzis at collabora.com> -+Jared Hu <Jared Hu at nxp.com> -diff --git a/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -new file mode 100644 -index 0000000..0844b3f ---- /dev/null -+++ b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -@@ -0,0 +1,136 @@ -+<?xml version="1.0" encoding="UTF-8"?> -+<protocol name="alpha_compositing_unstable_v1"> -+ -+ <copyright> -+ Copyright 2016 The Chromium Authors. -+ Copyright 2017 Collabora Ltd -+ Copyright 2018 NXP -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+ </copyright> -+ -+ <description summary="Protocol for more advanced compositing and blending"> -+ This protocol specifies a set of interfaces used to control the alpha -+ compositing and blending of surface contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ </description> -+ -+ <interface name="zwp_alpha_compositing_v1" version="1"> -+ <description summary="alpha_compositing"> -+ The global interface exposing compositing and blending capabilities is -+ used to instantiate an interface extension for a wl_surface object. -+ This extended interface will then allow the client to specify the -+ blending equation and alpha value used for compositing the wl_surface. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="unbind from the blending interface"> -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects, -+ blending objects included. -+ </description> -+ </request> -+ -+ <enum name="error"> -+ <entry name="blending_exists" value="0" -+ summary="the surface already has a blending object associated"/> -+ </enum> -+ -+ <request name="get_blending"> -+ <description summary="extend surface interface for blending"> -+ Instantiate an interface extension for the given wl_surface to -+ provide surface blending. If the given wl_surface already has -+ a blending object associated, the blending_exists protocol error -+ is raised. -+ </description> -+ -+ <arg name="id" type="new_id" interface="zwp_blending_v1" -+ summary="the new blending interface id"/> -+ <arg name="surface" type="object" interface="wl_surface" -+ summary="the surface"/> -+ </request> -+ </interface> -+ -+ <interface name="zwp_blending_v1" version="1"> -+ <description summary="blending interface to a wl_surface"> -+ An additional interface to a wl_surface object, which allows the -+ client to specify the blending equation used for compositing and -+ an alpha value applied to the whole surface. -+ -+ When the blending object is created its blending equation is -+ 'none' and its alpha is 1.0, i.e., it's inactive by default. Clients -+ can activate it by setting the blending equation and alpha value. -+ -+ If the wl_surface associated with the blending object is destroyed, -+ the blending object becomes inert. -+ -+ If the blending object is destroyed, the blending state is removed -+ from the wl_surface. The change will be applied on the next -+ wl_surface.commit. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="remove blending from the surface"> -+ The associated wl_surface's blending state is removed. -+ The change is applied on the next wl_surface.commit. -+ </description> -+ </request> -+ -+ <enum name="blending_equation"> -+ <description summary="different blending equations for compositing"> -+ Blending equations that can be used when compositing a surface. -+ </description> -+ <entry name="none" value="0" summary="blending object is inactive"/> -+ <entry name="opaque" value="1" summary="(one, zero)"/> -+ <entry name="premultiplied" value="2" summary="(one, one_minus_src_alpha)"/> -+ <entry name="straight" value="3" summary="(src_alpha, one_minus_src_alpha)" /> -+ <entry name="fromsource" value="4" summary="(src_alpha, src_alpha)" /> -+ </enum> -+ -+ <request name="set_blending"> -+ <description summary="set the blending equation"> -+ Set the blending equation for compositing the wl_surface. -+ -+ The blending equation state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ </description> -+ <arg name="equation" type="uint" summary="the new blending equation"/> -+ </request> -+ -+ <request name="set_alpha"> -+ <description summary="set the alpha value"> -+ Set the alpha value applied to the whole surface for compositing. -+ -+ The alpha value state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ </description> -+ <arg name="value" type="fixed" summary="the new alpha value"/> -+ </request> -+ </interface> -+ -+</protocol> -\ No newline at end of file --- -2.7.4 - diff --git a/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch b/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch deleted file mode 100644 index 01cac46e..00000000 --- a/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 54e847c10a75ec7bd6fbb8fbdd700d085145cdce Mon Sep 17 00:00:00 2001 -From: Haihua Hu <jared.hu@nxp.com> -Date: Tue, 26 Jun 2018 15:30:18 +0800 -Subject: [PATCH 2/2] unstable: Add hdr10-metadata protocol - -this protocol is used to support hdr10 video playback. -HDR10 metadata is passed to compositor via this interface - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu <jared.hu@nxp.com> ---- - Makefile.am | 1 + - unstable/hdr10-metadata/README | 4 ++ - .../hdr10-metadata/hdr10-metadata-unstable-v1.xml | 84 ++++++++++++++++++++++ - 3 files changed, 89 insertions(+) - create mode 100644 unstable/hdr10-metadata/README - create mode 100644 unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index e6c44ec..b8206c7 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -24,6 +24,7 @@ unstable_protocols = \ - unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml \ - unstable/primary-selection/primary-selection-unstable-v1.xml \ - unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ -+ unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/hdr10-metadata/README b/unstable/hdr10-metadata/README -new file mode 100644 -index 0000000..58a82f8 ---- /dev/null -+++ b/unstable/hdr10-metadata/README -@@ -0,0 +1,4 @@ -+hdr10 metadata protocol -+ -+Maintainers: -+Jared Hu <Jared Hu at nxp.com> -diff --git a/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -new file mode 100644 -index 0000000..5b1bac4 ---- /dev/null -+++ b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -@@ -0,0 +1,84 @@ -+<?xml version="1.0" encoding="UTF-8"?> -+<protocol name="hdr10_metadata_unstable_v1"> -+ -+ <copyright> -+ Copyright 2018 NXP -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+ </copyright> -+ -+ <description summary="Protocol for sending hdr10 metadata to compositor"> -+ This protocol specifies a set of interfaces used to set and control -+ hdr10 metadata of video contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ </description> -+ -+ <interface name="zwp_hdr10_metadata_v1" version="1"> -+ <description summary="hdr10_metadata"> -+ The global interface exposing hdr10 metadata capabilities is -+ used to instantiate an interface extension for compositor. -+ This extended interface will then allow the client to pass hdr10 metadata -+ to compositor and send to display driver if supported. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="unbind from the hdr10 metadata interface"> -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects. -+ </description> -+ </request> -+ -+ <enum name="error"> -+ <entry name="sending_meta_error" value="0" -+ summary="error occurs when compositor handle metadata"/> -+ </enum> -+ -+ <request name="set_metadata"> -+ <description summary="interface of setting and controling hdr10 metadata"> -+ client can use this interface pass hdr10 metadata to server. Server need -+ use the recived metadata to enable hdr mode. -+ </description> -+ -+ <arg name="eotf" type="uint" summary="supported eotf"/> -+ <arg name="type" type="uint" summary="supported type"/> -+ <arg name="display_primaries_red" type="uint" -+ summary="display primaries of red, high 16bits for x, and low 16bits for y"/> -+ <arg name="display_primaries_green" type="uint" -+ summary="display primaries of green, high 16bits for x, and low 16bits for y"/> -+ <arg name="display_primaries_blue" type="uint" -+ summary="display primaries of blue, high 16bits for x, and low 16bits for y"/> -+ <arg name="white_point" type="uint" -+ summary="white point, high 16bits for x, and low 16bits for blue"/> -+ <arg name="mastering_display_luminance" type="uint" -+ summary="max and min mastering display luminance, high 16 bits for max, and low 16 bits for min"/> -+ <arg name="max_cll" type="uint" summary="max content light level"/> -+ <arg name="max_fall" type="uint" summary="max frame average light level"/> -+ </request> -+ </interface> -+ -+</protocol> --- -2.7.4 - diff --git a/recipes-graphics/wayland/wayland-protocols_1.17.imx.bb b/recipes-graphics/wayland/wayland-protocols_1.32.imx.bb index d070f03f..6b2a7091 100644 --- a/recipes-graphics/wayland/wayland-protocols_1.17.imx.bb +++ b/recipes-graphics/wayland/wayland-protocols_1.32.imx.bb @@ -6,23 +6,26 @@ protocol either in Wayland core, or some other protocol in \ wayland-protocols." HOMEPAGE = "http://wayland.freedesktop.org" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ +LIC_FILES_CHKSUM = "file://LICENSE;md5=c7b12b6702da38ca028ace54aae3d484 \ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" -ARCHIVE_NAME = "${BPN}-1.17" -SRC_URI = "https://wayland.freedesktop.org/releases/${ARCHIVE_NAME}.tar.xz \ - file://0001-unstable-Add-alpha-compositing-protocol.patch \ - file://0002-unstable-Add-hdr10-metadata-protocol.patch" -SRC_URI[md5sum] = "55ddd5fdb02b73b9de9559aaec267315" -SRC_URI[sha256sum] = "df1319cf9705643aea9fd16f9056f4e5b2471bd10c0cc3713d4a4cdc23d6812f" -S = "${WORKDIR}/${ARCHIVE_NAME}" +SRC_URI = "git://github.com/nxp-imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-${@oe.utils.trim_version("${PV}", 2)}" +SRCREV = "7ece577d467f8afb2f5a2f7fff3761a1e0ee9dad" + +S = "${WORKDIR}/git" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit autotools pkgconfig +# NOTE: For i.MX drop allarch since the recipe is SOCARCH +#inherit meson pkgconfig allarch +inherit meson pkgconfig + +EXTRA_OEMESON += "-Dtests=false" PACKAGES = "${PN}" -FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" +FILES:${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" + +BBCLASSEXTEND = "native nativesdk" PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" +COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..59f2a4b6 --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.5.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch @@ -0,0 +1,41 @@ +From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Mon, 11 Jul 2022 19:38:19 +0000 +Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto + toolchain" + +This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a. + +With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0") +package config seems no longer to provide the path to the native +weston scanner. + +Thus the build fails with: + +| Run-time dependency wayland-scanner found: YES 1.21.0 +| Program /usr/bin/wayland-scanner found: NO +| +| ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable + +Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found +wayland-scanner with Yocto toolchain") fixes the issue. + +Upstream-Status: Inappropriate [Cross-compile Specific] +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + protocol/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/protocol/meson.build b/protocol/meson.build +index bdd322ac..e50b23bb 100644 +--- a/protocol/meson.build ++++ b/protocol/meson.build +@@ -1,4 +1,4 @@ +-dep_scanner = dependency('wayland-scanner', native: false) ++dep_scanner = dependency('wayland-scanner', native: true) + prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) + + dep_wp = dependency('wayland-protocols', version: '>= 1.24') +-- +2.17.1 + diff --git a/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch new file mode 100644 index 00000000..b9cb31fb --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.5.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch @@ -0,0 +1,34 @@ +From 4afe9b2f9ef24ce0c9bf1cd41f94ca45afa4f445 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 12 Sep 2022 20:58:14 -0700 +Subject: [PATCH] g2d-renderer.c: Include sys/stat.h + +This is needed for getting stat() prototype, its flagged with clang-15 +as error. + +| ../git/libweston/renderer-g2d/g2d-renderer.c:2057:6: error: call to undeclared function 'stat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +| if (stat(gr->drm_device, &dev_stat) != 0) { +| ^ +| 1 error generated. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libweston/renderer-g2d/g2d-renderer.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c +index f59fc4ee..36a458fc 100644 +--- a/libweston/renderer-g2d/g2d-renderer.c ++++ b/libweston/renderer-g2d/g2d-renderer.c +@@ -41,6 +41,7 @@ + #include <drm_fourcc.h> + #include <poll.h> + #include <errno.h> ++#include <sys/stat.h> /* stat() */ + + #include <libweston/libweston.h> + #include "g2d-renderer.h" +-- +2.37.3 + diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 76aadf94..07a4ea86 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -1,25 +1,93 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" # OpenGL is not required for parts with GPU support for 2D but not 3D IMX_REQUIRED_DISTRO_FEATURES_REMOVE = "" -IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl" -IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = "" -REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" - -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}" - -HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" -HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" - -do_install_append() { - if ${HAS_SYSTEMD}; then - sed -i \ - -e 's,/usr/bin,${bindir},g' \ - -e 's,/etc,${sysconfdir},g' \ - -e 's,/var,${localstatedir},g' \ - ${D}${systemd_system_unitdir}/weston.service - if ${HAS_XWAYLAND}; then - install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston - fi +IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu2d = "opengl" +IMX_REQUIRED_DISTRO_FEATURES_REMOVE:imxgpu3d = "" +REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" + +SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" + +PACKAGECONFIG ??= " \ + no-idle-timeout \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)} \ + ${PACKAGECONFIG_GBM_FORMAT} \ + ${PACKAGECONFIG_REPAINT_WINDOW} \ + ${PACKAGECONFIG_SIZE} \ + ${PACKAGECONFIG_USE_G2D} \ +" + +# Mainline BSPs dont support xwayland +PACKAGECONFIG:remove:use-mainline-bsp = "xwayland" + +PACKAGECONFIG_GBM_FORMAT ?= "" +PACKAGECONFIG_GBM_FORMAT:mx8mq-nxp-bsp ?= "gbm-format" +PACKAGECONFIG_GBM_FORMAT:mx93-nxp-bsp ?= "gbm-format" + +GBM_FORMAT_VALUE:mx8mq-nxp-bsp = "argb8888" +GBM_FORMAT_VALUE:mx93-nxp-bsp = "argb8888" + +PACKAGECONFIG_REPAINT_WINDOW ?= "" +PACKAGECONFIG_REPAINT_WINDOW:mx8-nxp-bsp ?= "repaint-window" +PACKAGECONFIG_REPAINT_WINDOW:mx9-nxp-bsp ?= "repaint-window" + +PACKAGECONFIG_SIZE ?= "" +PACKAGECONFIG_SIZE:mx8mq-nxp-bsp ?= "size" + +SIZE_VALUE:mx8mq-nxp-bsp = "1920x1080" + +HAS_G2D = "false" +HAS_G2D:imxgpu2d = "true" + +PACKAGECONFIG_USE_G2D ?= "" +PACKAGECONFIG_USE_G2D:imxgpu2d ?= "use-g2d" +PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx93-nxp-bsp ?= "use-g2d" + +USE_G2D_VALUE = "true" +USE_G2D_VALUE:mx6-nxp-bsp = "1" +USE_G2D_VALUE:mx7-nxp-bsp = "1" + +PACKAGECONFIG[gbm-format] = ",," +PACKAGECONFIG[rdp] = ",," +PACKAGECONFIG[repaint-window] = ",," +PACKAGECONFIG[size] = ",," +PACKAGECONFIG[use-g2d] = ",," +PACKAGECONFIG[xwayland] = ",," + +do_install:append() { + if [ -f "${UNPACKDIR}/weston.config" ]; then + install -Dm0755 ${UNPACKDIR}/weston.config ${D}${sysconfdir}/default/weston fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'gbm-format', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a gbm-format=${GBM_FORMAT_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'rdp', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "s|^command=${bindir}/weston .*|& --rdp-tls-cert=${sysconfdir}/freerdp/keys/server.crt --rdp-tls-key=${sysconfdir}/freerdp/keys/server.key|" ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i -e "/^\[core\]/a modules=screen-share.so" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'repaint-window', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a repaint-window=16" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'size', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[shell\]/a size=${SIZE_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-g2d', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + elif ${HAS_G2D}; then + sed -i -e "/^\[core\]/a #use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "no" ]; then + sed -i -e "s/^xwayland=true/#xwayland=true/g" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini } diff --git a/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini new file mode 100644 index 00000000..19e6ad24 --- /dev/null +++ b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini @@ -0,0 +1,25 @@ +[core] +#enable-overlay-view=1 + +[shell] + +[libinput] +touchscreen_calibrator=true + +#[output] +#name=HDMI-A-1 +#mode=1920x1080@60 +#transform=rotate-90 + +#[output] +#name=HDMI-A-2 +#mode=off +# WIDTHxHEIGHT Resolution size width and height in pixels +# off Disables the output +# preferred Uses the preferred mode +# current Uses the current crt controller mode +#transform=rotate-90 + +[screen-share] +command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +#start-on-startup=true diff --git a/recipes-graphics/wayland/weston-init/imxdrm/weston.config b/recipes-graphics/wayland/weston-init/imxdrm/weston.config deleted file mode 100644 index 5693d6cb..00000000 --- a/recipes-graphics/wayland/weston-init/imxdrm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config new file mode 100755 index 00000000..6456cd24 --- /dev/null +++ b/recipes-graphics/wayland/weston-init/mx6sl-nxp-bsp/weston.config @@ -0,0 +1 @@ +FB_MULTI_BUFFER=1 diff --git a/recipes-graphics/wayland/weston-init/mx8mm/weston.config b/recipes-graphics/wayland/weston-init/mx8mm/weston.config deleted file mode 100644 index eb990e40..00000000 --- a/recipes-graphics/wayland/weston-init/mx8mm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland --use-g2d=1" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/recipes-graphics/wayland/weston-init/weston.config b/recipes-graphics/wayland/weston-init/weston.config deleted file mode 100644 index 7c92cf11..00000000 --- a/recipes-graphics/wayland/weston-init/weston.config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" diff --git a/recipes-graphics/wayland/weston-init/weston.service b/recipes-graphics/wayland/weston-init/weston.service deleted file mode 100644 index 44c5a82f..00000000 --- a/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,38 +0,0 @@ -[Unit] -Description=Weston Wayland Compositor (on tty7) -RequiresMountsFor=/run -Conflicts=getty@tty7.service plymouth-quit.service -After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service - -[Service] -User=root -PermissionsStartOnly=true - -# Log us in via PAM so we get our XDG & co. environment and -# are treated as logged in so we can use the tty: -PAMName=login - -# Grab tty7 -UtmpIdentifier=tty7 -TTYPath=/dev/tty7 -TTYReset=yes -TTYVHangup=yes -TTYVTDisallocate=yes - -# stderr to journal so our logging doesn't get thrown into /dev/null -StandardOutput=tty -StandardInput=tty -StandardError=journal - -EnvironmentFile=-/etc/default/weston - -# Weston does not successfully change VT, nor does systemd place us on -# the VT it just activated for us. Switch manually: -ExecStartPre=/usr/bin/chvt 7 -ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS - -IgnoreSIGPIPE=no - -[Install] -WantedBy=multi-user.target - diff --git a/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..4d2a333a --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch @@ -0,0 +1,38 @@ +From 3aa4024ac4107e68552be4dfe5fce511900629c9 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Mon, 11 Jul 2022 19:38:19 +0000 +Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto + toolchain" + +This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a. + +With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0") +package config seems no longer to provide the path to the native +weston scanner. + +Thus the build fails with: + +| Run-time dependency wayland-scanner found: YES 1.21.0 +| Program /usr/bin/wayland-scanner found: NO +| +| ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable + +Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found +wayland-scanner with Yocto toolchain") fixes the issue. + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + protocol/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/protocol/meson.build +=================================================================== +--- git.orig/protocol/meson.build ++++ git/protocol/meson.build +@@ -1,4 +1,4 @@ +-dep_scanner = dependency('wayland-scanner', native: false) ++dep_scanner = dependency('wayland-scanner', native: true) + prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner')) + + dep_wp = dependency('wayland-protocols', version: '>= 1.31', diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch deleted file mode 100644 index 6f676048..00000000 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <tom.hochstein@nxp.com> -Date: Mon, 29 Oct 2018 21:40:32 +0000 -Subject: [PATCH] g2d-renderer: Fix open function build break - -| from ../git/libweston/g2d-renderer.c:40: -| In function 'open', -| inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2: -| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe- sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit h O_CREAT or O_TMPFILE in second argument needs 3 arguments -| __open_missing_mode (); -| ^~~~~~~~~~~~~~~~~~~~~~ -| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed - -Upstream-Status: Inappropriate [i.MX-specific] - -Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> ---- - libweston/g2d-renderer.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/libweston/g2d-renderer.c -=================================================================== ---- git.orig/libweston/g2d-renderer.c -+++ git/libweston/g2d-renderer.c -@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compos - path = malloc(strlen(dir) + 40); - strcpy(path, dir); - strcat(path, "/use-g2d-renderer"); -- close(open(path, O_CREAT | O_RDWR)); -+ close(open(path, O_CREAT | O_RDWR, 0600)); - free(path); - - return 0; diff --git a/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted file mode 100644 index 09ec1559..00000000 --- a/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 29 May 2015 20:56:00 -0700 -Subject: [PATCH] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/configure.ac b/configure.ac -index 7aebbdb..dc9c802 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include <time.h>]]) - AC_CHECK_HEADERS([execinfo.h]) - -+AC_CHECK_HEADERS([error.h]) -+ - AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - - # check for libdrm as a build-time dependency only -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/weston-error.h -@@ -0,0 +1,20 @@ -+#ifndef _WESTON_ERROR_H -+#define _WESTON_ERROR_H -+ -+#if defined(HAVE_ERROR_H) -+#include <error.h> -+#else -+#include <err.h> -+#include <string.h> -+#define _weston_error(S, E, F, ...) do { \ -+ if (E) \ -+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ -+ else \ -+ err(S, F, ##__VA_ARGS__); \ -+} while(0) -+ -+#define error _weston_error -+#endif -+ -+#endif -+ -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 1adcf21..166bf3b 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include <poll.h> - #include <errno.h> - --#include <error.h> - #include <getopt.h> - - #include <sys/types.h> -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index d648538b..00000000 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null @@ -1,173 +0,0 @@ -From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <tom.hochstein@nxp.com> -Date: Wed, 22 Feb 2017 15:53:30 +0200 -Subject: [PATCH] weston-launch: Provide a default version that doesn't require PAM - -weston-launch requires PAM for starting weston as a non-root user. - -Since starting weston as root is a valid use case by itself, if -PAM is not available, provide a default version of weston-launch -without non-root-user support. - -Upstream-Status: Pending - -Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> -Signed-off-by: Denys Dmytriyenko <denys@ti.com> - ---- - configure.ac | 9 +++++++-- - libweston/weston-launch.c | 20 ++++++++++++++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index dc9c802..48cf5cb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, - AS_IF([test "x$enable_resize_optimization" = "xyes"], - [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) - -+AC_ARG_WITH(pam, -+ AS_HELP_STRING([--with-pam], [Use PAM]), -+ [use_pam=$withval], [use_pam=yes]) - AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) - AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) --if test x$enable_weston_launch = xyes; then -+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then - WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) - if test x$have_pam = xno; then -- AC_ERROR([weston-launch requires pam]) -+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) - fi -+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) - fi - - AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -702,6 +706,7 @@ AC_MSG_RESULT([ - Enable developer documentation ${enable_devdocs} - - weston-launch utility ${enable_weston_launch} -+ PAM support ${use_pam} - systemd-login support ${have_systemd_login} - systemd notify support ${enable_systemd_notify} - -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 166bf3b..6fb9232 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -51,7 +51,9 @@ - - #include <pwd.h> - #include <grp.h> -+#ifdef HAVE_PAM - #include <security/pam_appl.h> -+#endif - - #ifdef HAVE_SYSTEMD_LOGIN - #include <systemd/sd-login.h> -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) - #endif - - struct weston_launch { -+#ifdef HAVE_PAM - struct pam_conv pc; - pam_handle_t *ph; -+#endif - int tty; - int ttynr; - int sock[2]; -@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) - return false; - } - -+#ifdef HAVE_PAM - static int - pam_conversation_fn(int msg_count, - const struct pam_message **messages, -@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) - - return 0; - } -+#endif - - static int - setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) - close(wl->signalfd); - close(wl->sock[0]); - -+#ifdef HAVE_PAM - if (wl->new_user) { - err = pam_close_session(wl->ph, 0); - if (err) -@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) - err, pam_strerror(wl->ph, err)); - pam_end(wl->ph, err); - } -+#endif - - if (ioctl(wl->tty, KDSKBMUTE, 0) && - ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) - setenv("HOME", wl->pw->pw_dir, 1); - setenv("SHELL", wl->pw->pw_shell, 1); - -+#ifdef HAVE_PAM - env = pam_getenvlist(wl->ph); - if (env) { - for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) - } - free(env); - } -+#endif - - /* - * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ static void - help(const char *name) - { - fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); -+#ifdef HAVE_PAM - fprintf(stderr, " -u, --user Start session as specified username,\n" - " e.g. -u joe, requires root.\n"); -+#endif - fprintf(stderr, " -t, --tty Start session on alternative tty,\n" - " e.g. -t /dev/tty4, requires -u option.\n"); - fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -698,7 +710,9 @@ main(int argc, char *argv[]) - int i, c; - char *tty = NULL; - struct option opts[] = { -+#ifdef HAVE_PAM - { "user", required_argument, NULL, 'u' }, -+#endif - { "tty", required_argument, NULL, 't' }, - { "verbose", no_argument, NULL, 'v' }, - { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ main(int argc, char *argv[]) - while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { - switch (c) { - case 'u': -+#ifdef HAVE_PAM - wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); -+#else -+ error(1, 0, "-u is unsupported in this weston-launch build"); -+#endif - break; - case 't': - tty = optarg; -@@ -753,8 +771,10 @@ main(int argc, char *argv[]) - if (setup_tty(&wl, tty) < 0) - exit(EXIT_FAILURE); - -+#ifdef HAVE_PAM - if (wl.new_user && setup_pam(&wl) < 0) - exit(EXIT_FAILURE); -+#endif - - if (setup_launcher_socket(&wl) < 0) - exit(EXIT_FAILURE); diff --git a/recipes-graphics/wayland/weston/imx/weston.ini b/recipes-graphics/wayland/weston/imx/weston.ini deleted file mode 100644 index d6ad40df..00000000 --- a/recipes-graphics/wayland/weston/imx/weston.ini +++ /dev/null @@ -1,20 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/recipes-graphics/wayland/weston/mx8mq/weston.ini b/recipes-graphics/wayland/weston/mx8mq/weston.ini deleted file mode 100644 index d1597a42..00000000 --- a/recipes-graphics/wayland/weston/mx8mq/weston.ini +++ /dev/null @@ -1,24 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 -gbm-format=argb8888 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -[shell] -size=1920x1080 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/recipes-graphics/wayland/weston/systemd-notify.weston-start b/recipes-graphics/wayland/weston/systemd-notify.weston-start new file mode 100644 index 00000000..a97e7b38 --- /dev/null +++ b/recipes-graphics/wayland/weston/systemd-notify.weston-start @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + + +if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then + add_weston_module "systemd-notify.so" +fi diff --git a/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index b483c97c..342ac8d1 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start @@ -1,7 +1,6 @@ #!/bin/sh if type Xwayland >/dev/null 2>/dev/null; then - mkdir -p /tmp/.X11-unix - - add_weston_argument "--modules=xwayland.so" + mkdir -m 775 -p /tmp/.X11-unix + chown root:video /tmp/.X11-unix fi diff --git a/recipes-graphics/wayland/weston_10.0.5.imx.bb b/recipes-graphics/wayland/weston_10.0.5.imx.bb new file mode 100644 index 00000000..df2898f0 --- /dev/null +++ b/recipes-graphics/wayland/weston_10.0.5.imx.bb @@ -0,0 +1,211 @@ +# This recipe is for the i.MX fork of weston. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 4b42fd87da290ddea098605aea3a5cce1fb432a7 + +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ + " + +SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://systemd-notify.weston-start \ + " + +SRC_URI[sha256sum] = "89646ca0d9f8d413c2767e5c3828eaa3fa149c2a105b3729a6894fa7cf1549e7" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" +UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig useradd + +# depends on virtual/egl +# +require ${THISDIR}/required-distro-features.inc + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + +# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' +SIMPLECLIENTS ?= "all" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" +# Weston on RDP +PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" +# weston-launch +PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# Clients support +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" +# support libseat based launch +PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" + +do_install:append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${UNPACKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${UNPACKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${UNPACKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${UNPACKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES:${PN}-examples = "${bindir}/*" + +FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS:${PN}-xwayland += "xwayland" + +RDEPENDS:${PN} += "xkeyboard-config" +RRECOMMENDS:${PN} = "weston-init liberation-fonts" +RRECOMMENDS:${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system weston-launch" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" + +LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" +LIC_FILES_CHKSUM:append = "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" +SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ + file://0001-g2d-renderer.c-Include-sys-stat.h.patch" +SRCBRANCH = "weston-imx-10.0.5" +SRCREV = "0cc822a1e5a8faea6835a4e9259887d8792b86b4" +S = "${WORKDIR}/git" + +# Disable OpenGL for parts with GPU support for 2D but not 3D +REQUIRED_DISTRO_FEATURES = "opengl" +REQUIRED_DISTRO_FEATURES:imxgpu2d = "" +REQUIRED_DISTRO_FEATURES:imxgpu3d = "opengl" +PACKAGECONFIG_OPENGL = "opengl" +PACKAGECONFIG_OPENGL:imxgpu2d = "" +PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" + +PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" +PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" +PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" + +PACKAGECONFIG:remove:imxfbdev = "kms" +PACKAGECONFIG:append:imxfbdev = " fbdev clients" +PACKAGECONFIG:append:imxgpu = " imxgpu" +PACKAGECONFIG:append:imxgpu2d = " imxg2d" + +SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" + +# Override +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" +# Weston with i.MX GPU support +PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" + +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev libdrm" +EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" + +EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" + +########### End of i.MX overrides ######### diff --git a/recipes-graphics/wayland/weston_12.0.3.imx.bb b/recipes-graphics/wayland/weston_12.0.3.imx.bb new file mode 100644 index 00000000..14b79f18 --- /dev/null +++ b/recipes-graphics/wayland/weston_12.0.3.imx.bb @@ -0,0 +1,194 @@ +# This recipe is for the i.MX fork of weston. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 92a460b55e7290ec0006365219189761f7226f7c + +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ + " + +SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://systemd-notify.weston-start \ + " + +SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" +UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig useradd + +# depends on virtual/egl +# +require ${THISDIR}/required-distro-features.inc + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launcher-libseat \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi \ + shell-kiosk \ + " + +# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' +SIMPLECLIENTS ?= "all" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcursor" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on RDP +PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd support +PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland" +# colord CMS support +PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord" +# Clients support +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# Kiosk shell +PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" +# support libseat based launch +PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" +# deprecated and superseded by libseat launcher +PACKAGECONFIG[launcher-logind] = "-Ddeprecated-launcher-logind=true,-Ddeprecated-launcher-logind=false," +# screencasting via PipeWire +PACKAGECONFIG[pipewire] = "-Dbackend-pipewire=true,-Dbackend-pipewire=false,pipewire" +# VNC remote screensharing +PACKAGECONFIG[vnc] = "-Dbackend-vnc=true,-Dbackend-vnc=false,neatvnc" + + +do_install:append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${UNPACKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${UNPACKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${UNPACKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${UNPACKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES:${PN} = "${sysconfdir} ${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES:${PN}-examples = "${bindir}/*" + +FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS:${PN}-xwayland += "xwayland" + +RDEPENDS:${PN} += "xkeyboard-config" +RRECOMMENDS:${PN} = "weston-init liberation-fonts" +RRECOMMENDS:${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "--system weston-launch" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" +LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70" +LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz" +SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" +SRCBRANCH = "weston-imx-12.0.3" +SRCREV = "b0d890915ee191ceb10e79ea9a830281f5c6258f" +S = "${WORKDIR}/git" + +PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" +PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" + +PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}" +PACKAGECONFIG_G2D ??= "" +PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d" +PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d" + +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imx-nxp-bsp)" + +########### End of i.MX overrides ######### diff --git a/recipes-graphics/wayland/weston_4.0.0.imx.bb b/recipes-graphics/wayland/weston_4.0.0.imx.bb deleted file mode 100644 index e8d74fd4..00000000 --- a/recipes-graphics/wayland/weston_4.0.0.imx.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, i.MX fork" -DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ - file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38" - -DEFAULT_PREFERENCE = "-1" - -SRCBRANCH = "weston-imx-4.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.ini \ - file://weston.png \ - file://weston.desktop \ - file://0001-make-error-portable.patch \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ - file://0001-g2d-renderer-Fix-open-function-build-break.patch \ -" -SRCREV = "866072b52751e5023651dd9322baa513e1f74fe6" -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit autotools pkgconfig useradd distro_features_check - -# Disable OpenGL for parts with GPU support for 2D but not 3D -REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_imxgpu2d = "" -REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" -PACKAGECONFIG_OPENGL = "opengl" -PACKAGECONFIG_OPENGL_imxgpu2d = "" -PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" - -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" -DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" - -WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" - -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - " -EXTRA_OECONF_append_qemux86 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_qemux86-64 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_imxfbdev = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL} pam systemd x11', d)} \ - clients launch" -PACKAGECONFIG_remove_imxfbdev = "kms" -PACKAGECONFIG_append_imxgpu = " imxgpu" -PACKAGECONFIG_append_imxgpu2d = " imxg2d" -PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" -# -# Compositor choices -# -# Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" -# Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" -# Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" -# Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" -# Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" -# weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" -# VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" -# Weston with EGL support -PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" -# Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" -# Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" -# colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" -# Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" -# Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" -# Weston with i.MX GPU support -PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" -# Weston with i.MX G2D renderer -PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" -# Weston with OpenGL support -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" - -do_install_append() { - # Weston doesn't need the .la files to load modules, so wipe them - rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la - - # If X11, ship a desktop file to launch it - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then - install -d ${D}${datadir}/applications - install ${WORKDIR}/weston.desktop ${D}${datadir}/applications - - install -d ${D}${datadir}/icons/hicolor/48x48/apps - install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps - fi - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then - install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland - fi - - # install default weston.ini - install -D -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini -} - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" - -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir} ${sysconfdir}/xdg/weston" - -FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" -SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." - -FILES_${PN}-examples = "${bindir}/*" - -FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" -RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" - -RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6/pointercal.xinput b/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6-nxp-bsp/pointercal.xinput index ba34b89f..ba34b89f 100644 --- a/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6/pointercal.xinput +++ b/recipes-graphics/xinput-calibrator/pointercal-xinput/mx6-nxp-bsp/pointercal.xinput diff --git a/recipes-graphics/xinput-calibrator/pointercal-xinput_%.bbappend b/recipes-graphics/xinput-calibrator/pointercal-xinput_%.bbappend index a9c60f3e..d112b274 100644 --- a/recipes-graphics/xinput-calibrator/pointercal-xinput_%.bbappend +++ b/recipes-graphics/xinput-calibrator/pointercal-xinput_%.bbappend @@ -1,2 +1,2 @@ # Append path for freescale layer to include bsp pointercal.xinput -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb deleted file mode 100644 index 30372eff..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "X.org graphics driver for KMS based systems with pluggable GPU backend" -DESCRIPTION = "The xf86-video-armada module is a 2D graphics driver for the X Window \ -System as implemented by X.org, supporting these DRM KMS drivers: \ -\ - Freescale i.MX \ - Marvell Armada 510 (Dove) \ -\ -and GPU drivers: \ - Vivante libGAL (Armada only) \ - Etnaviv (Armada and i.MX) with galcore kernel driver \ - Etnaviv (Armada and i.MX) with etnaviv DRM kernel driver \ -" -LICENSE = "BSD" - -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -DEPENDS += "libdrm-armada" - -LIC_FILES_CHKSUM = " \ - file://README;md5=d5271074fb6ad959b7b6cfa68b4adaf0 \ - file://../etna_viv/LICENSE;md5=9d4853905d85f044ed013e75def30a76 \ - " - -SRCREV_armada = "78e7116a5bc6cdd9f93cbf1552d342933623ab59" -SRCREV_etna = "8478eef32fd911ebb300c970071e22227afa1896" -SRCREV_FORMAT = "armada_etna" - -PV = "0.1+git${SRCPV}" - -SRC_URI = " \ - git://git.arm.linux.org.uk/cgit/xf86-video-armada.git;branch=unstable-devel;protocol=http;name=armada \ - git://github.com/etnaviv/etna_viv.git;protocol=https;name=etna;destsuffix=etna_viv \ - " - -S = "${WORKDIR}/git" - -RDEPENDS_${PN} = "xserver-xorg-module-exa \ - xserver-xorg-extension-dri \ - xserver-xorg-extension-dri2 \ - xserver-xorg-extension-glx \ - " - -EXTRA_OECONF = "--disable-etnaviv \ - --disable-vivante \ - --with-etnaviv-source=${WORKDIR}/etna_viv \ - " - -COMPATIBLE_MACHINE = "(imx)" diff --git a/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb deleted file mode 100644 index 996a9c7f..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -require recipes-graphics/xorg-driver/xorg-driver-video.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" - -DESCRIPTION = "X.Org X server -- fbdev display driver" -PE = "1" -PR = "${INC_PR}.1" - -DEPENDS += "virtual/xserver" - -SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074" -SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5" diff --git a/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi b/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi deleted file mode 100644 index 8c16a1d7..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-imx-vivante/rc.autohdmi +++ /dev/null @@ -1,42 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: rc.autohdmi -# Required-Start: $all -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: -### END INIT INFO - -PATH=/sbin:/usr/sbin:/bin:/usr/bin - -# Source function library. -. /etc/init.d/functions - -case "$1" in - start) - echo -n "Starting autohdmi: " - export DISPLAY=:0 - autohdmi & - echo - exit 0 - ;; - reload|force-reload) - echo "Error: argument '$1' not supported" >&2 - exit 3 - ;; - stop) - echo -n "Shutting down autohdmi: " - killproc autohdmi - echo - ;; - restart) - echo -n "Restarting autohdmi: " - $0 stop - $0 start - echo - ;; - *) - echo "Usage: $0 start|stop" >&2 - exit 3 - ;; -esac diff --git a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb b/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb deleted file mode 100644 index 670ade64..00000000 --- a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -PE = "3" - -inherit autotools-brokensep update-rc.d pkgconfig - -DEPENDS += "virtual/xserver virtual/libx11 libgal-imx imx-gpu-viv virtual/libg2d pixman" - -LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3" - -SRCREV = "b765c3ffc0dcc4246afa659aa0d59f78a6736b08" -SRCBRANCH = "imx_exa_viv6_g2d" -SRC_URI = "git://source.codeaurora.org/external/imx/xf86-video-imx-vivante.git;protocol=https;branch=${SRCBRANCH} \ - file://rc.autohdmi" - -S = "${WORKDIR}/git/" - -INITSCRIPT_PACKAGES = "xserver-xorg-extension-viv-autohdmi" -INITSCRIPT_NAME = "rc.autohdmi" -INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." - -EXTRA_OEMAKE += "prefix=${exec_prefix} \ - sysroot=${STAGING_DIR_TARGET} \ - SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ - BUSID_HAS_NUMBER=1 \ - BUILD_IN_YOCTO=1 \ - XSERVER_GREATER_THAN_13=1" -TARGET_CC_ARCH += "${LDFLAGS}" - -PACKAGES =+ "xserver-xorg-extension-viv-autohdmi" - -do_install_append () { - install -d ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_priv.h ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_gal.h ${D}${includedir} - - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/rc.autohdmi ${D}/${sysconfdir}/init.d/rc.autohdmi - - find ${D}${includedir} -type f -exec chmod 660 {} \; -} - -RDEPENDS_${PN} += "libvivante-dri-imx \ - xserver-xorg-module-exa \ - mesa-driver-swrast \ - xserver-xorg-extension-dri \ - xserver-xorg-extension-dri2 \ - xserver-xorg-extension-glx" - -REALSOLIBS := "${SOLIBS}" -SOLIBS = "${SOLIBSDEV}" - -FILES_${PN} = "${libdir}/*/*/*/vivante_drv${SOLIBS}" -FILES_${PN}-dev = "${includedir} /usr/src ${libdir}/libfsl_x11_ext${SOLIBSDEV}" -FILES_${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/.debug/autohdmi" - -FILES_xserver-xorg-extension-viv-autohdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d/rc.autohdmi" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7ulp)" diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5-generic-bsp/xorg.conf index a99e6f24..a99e6f24 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx5-generic-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100755..100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf deleted file mode 100644 index b89bed60..00000000 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6/xorg.conf +++ /dev/null @@ -1,14 +0,0 @@ -Section "Device" - Identifier "i.MX Accelerated Framebuffer Device" - Driver "vivante" - Option "fbdev" "/dev/fb0" - Option "vivante_fbdev" "/dev/fb0" - Option "HWcursor" "false" -EndSection - -Section "ServerFlags" - Option "BlankTime" "0" - Option "StandbyTime" "0" - Option "SuspendTime" "0" - Option "OffTime" "0" -EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl-nxp-bsp/xorg.conf index de3905ab..de3905ab 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sl-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644..100755 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sll-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx-nxp-bsp/xorg.conf index de3905ab..de3905ab 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6sx-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ul-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull-nxp-bsp/xorg.conf index 79b6c0fc..79b6c0fc 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7-nxp-bsp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7-nxp-bsp/xorg.conf new file mode 100644 index 00000000..79b6c0fc --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7-nxp-bsp/xorg.conf @@ -0,0 +1,12 @@ +Section "Device" + Identifier "Kernel Framebuffer Device" + Driver "fbdev" + Option "fbdev" "/dev/fb0" +EndSection + +Section "ServerFlags" + Option "BlankTime" "0" + Option "StandbyTime" "0" + Option "SuspendTime" "0" + Option "OffTime" "0" +EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp-nxp-bsp/xorg.conf index de6307a3..de6307a3 100755 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mx7ulp-nxp-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf new file mode 100644 index 00000000..79b6c0fc --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/mxs-generic-bsp/xorg.conf @@ -0,0 +1,12 @@ +Section "Device" + Identifier "Kernel Framebuffer Device" + Driver "fbdev" + Option "fbdev" "/dev/fb0" +EndSection + +Section "ServerFlags" + Option "BlankTime" "0" + Option "StandbyTime" "0" + Option "SuspendTime" "0" + Option "OffTime" "0" +EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf index b6f83469..6fe64e11 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/use-mainline-bsp/xorg.conf @@ -1,28 +1,13 @@ Section "Device" - Identifier "Driver0" - Screen 0 - Driver "armada" - -# Support hotplugging displays? - Option "Hotplug" "TRUE" - -# Support hardware cursor if available? - Option "HWCursor" "TRUE" - -# Use GPU acceleration? - Option "UseGPU" "TRUE" - -# Provide Xv interfaces? - Option "XvAccel" "TRUE" - -# Prefer overlay for Xv (TRUE for armada-drm, FALSE for imx-drm) - Option "XvPreferOverlay" "TRUE" - -# Which accelerator module to load (automatically found if commented out) - Option "AccelModule" "etnadrm_gpu" - Option "AccelModule" "etnaviv_gpu" + Identifier "etnaviv" + Driver "modesetting" + Option "kmsdev" "/dev/dri/card1" + Option "AccelMethod" "glamor" + Option "Atomic" "On" +EndSection -# Support DRI2 interfaces? - Option "DRI" "TRUE" +Section "ServerFlags" + Option "AutoAddGPU" "false" + Option "DRI" "3" EndSection diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/vf/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/vf-generic-bsp/xorg.conf index b4ee82a9..b4ee82a9 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/vf/xorg.conf +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config/vf-generic-bsp/xorg.conf diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend index ceb438e3..3fe677b3 100644 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend +++ b/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -1,2 +1,2 @@ # Append path for freescale layer to include bsp xorg.conf -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch b/recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch new file mode 100644 index 00000000..71e045b2 --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xorg/0001-Allow-to-enable-atomic-in-modesetting-DDX.patch @@ -0,0 +1,36 @@ +From 8f50f62cf9030d1839e23a7f1ff9688dec2063e4 Mon Sep 17 00:00:00 2001 +From: Daniel Abrecht <public@danielabrecht.ch> +Date: Wed, 21 Oct 2020 21:13:30 +0200 +Subject: [PATCH] Allow to enable atomic in modesetting DDX + +The linux kernel blacklisted atomic for the modesetting DDX to deal with +problems with old Xorg versions which didn't have it disabled by default. +Ever since, it wasn't possible to enable atomic in modesetting at all +anymore. + +This change doesn't enable atomic by default, but it allows a user to +enabled it again. + +Upstream-Status: Pending +Signed-off-by: Daniel Abrecht <public@danielabrecht.ch> + +--- + hw/xfree86/drivers/modesetting/driver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c +index 535f49d..58a1c67 100644 +--- a/hw/xfree86/drivers/modesetting/driver.c ++++ b/hw/xfree86/drivers/modesetting/driver.c +@@ -1236,7 +1236,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) + ms->atomic_modeset_capable = (ret == 0); + + if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) { +- ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); ++ ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 2); + ms->atomic_modeset = (ret == 0); + } else { + ms->atomic_modeset = FALSE; +-- +GitLab + diff --git a/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch b/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch new file mode 100644 index 00000000..960bf3b5 --- /dev/null +++ b/recipes-graphics/xorg-xserver/xserver-xorg/0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch @@ -0,0 +1,38 @@ +From c76f5d2c0a0dda534888025d7236465202884665 Mon Sep 17 00:00:00 2001 +From: Xianzhong <xianzhong.li@nxp.com> +Date: Thu, 5 Aug 2021 16:57:43 +0800 +Subject: [PATCH] glamor: Fix fbo pixmap format with GL_BGRA_EXT + +Red and Blue channels are swizzled in GLES path, +Fix color inverse problem with ximagesink command: +gst-launch-1.0 videotestsrc pattern=6 num-buffers=1 ! video/x-raw,format=BGRx ! videoconvert ! ximagesink display=:0 -v + +This fix requires GL_EXT_texture_format_BGRA8888 extention, not applicable for upstream. + +Upstream-Status: Inappropriate + +Signed-off-by: Xianzhong <xianzhong.li@nxp.com> +--- + glamor/glamor.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/glamor/glamor.c ++++ b/glamor/glamor.c +@@ -586,10 +586,17 @@ glamor_setup_formats(ScreenPtr screen) + + if (glamor_priv->is_gles) { + assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); ++#if GL_EXT_texture_format_BGRA8888 ++ glamor_add_format(screen, 24, PICT_x8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE); ++ glamor_add_format(screen, 32, PICT_a8r8g8b8, ++ GL_BGRA_EXT, GL_BGRA_EXT, GL_UNSIGNED_BYTE, TRUE); ++#else + glamor_add_format(screen, 24, PICT_x8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); + glamor_add_format(screen, 32, PICT_a8b8g8r8, + GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, TRUE); ++#endif + } else { + glamor_add_format(screen, 24, PICT_x8r8g8b8, + GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); diff --git a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index e3c59040..cf1c3a50 100644 --- a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -1,5 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI:append:use-mainline-bsp = " file://0001-Allow-to-enable-atomic-in-modesetting-DDX.patch" + +SRC_URI:append:imxgpu = " file://0001-glamor-Fix-fbo-pixmap-format-with-GL_BGRA_EXT.patch" + IMX_OPENGL_PKGCONFIGS_REMOVE = "" -IMX_OPENGL_PKGCONFIGS_REMOVE_imxgpu = "glamor" -OPENGL_PKGCONFIGS_remove_mx6 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" -OPENGL_PKGCONFIGS_remove_mx7 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" -OPENGL_PKGCONFIGS_remove_mx8 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +IMX_OPENGL_PKGCONFIGS_REMOVE:imxgpu = "glamor" +OPENGL_PKGCONFIGS:remove:mx6-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +OPENGL_PKGCONFIGS:remove:mx7-nxp-bsp = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" +OPENGL_PKGCONFIGS:remove:imxdrm = "dri glx" diff --git a/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch b/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch new file mode 100644 index 00000000..c1e8ae11 --- /dev/null +++ b/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch @@ -0,0 +1,31 @@ +From e75a4d7b4474529967490de6e75ae4f1b7128937 Mon Sep 17 00:00:00 2001 +From: Xianzhong <xianzhong.li@nxp.com> +Date: Sat, 22 Jan 2022 17:57:59 +0800 +Subject: [PATCH 1/3] Prefer to create GLES2 context for glamor EGL + +created the initial patch for xwayland-21.1.2 + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Xianzhong <xianzhong.li@nxp.com> +--- + hw/xwayland/xwayland-glamor-gbm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index 12d820e44..8a89919be 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -866,8 +866,8 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) + goto error; + } + +- if (!xwl_glamor_try_big_gl_api(xwl_screen) && +- !xwl_glamor_try_gles_api(xwl_screen)) { ++ if (!xwl_glamor_try_gles_api(xwl_screen) && ++ !xwl_glamor_try_big_gl_api(xwl_screen)) { + ErrorF("Cannot use neither GL nor GLES2\n"); + goto error; + } +-- +2.17.1 + diff --git a/recipes-graphics/xwayland/xwayland_23.1.1.imx.bb b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bb new file mode 100644 index 00000000..a9705a23 --- /dev/null +++ b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bb @@ -0,0 +1,53 @@ +# This recipe copy helps keep meta-freescale master branch compatible +# with Yocto langdale. +# (From OE-Core rev: 35fdbd0ea81650a0421d50fb53989d96c5956331) + +SUMMARY = "XWayland is an X Server that runs under Wayland." +DESCRIPTION = "XWayland is an X Server running as a Wayland client, \ +and thus is capable of displaying native X11 client applications in a \ +Wayland compositor environment. The goal of XWayland is to facilitate \ +the transition from X Window System to Wayland environments, providing \ +a way to run unported applications in the meantime." +HOMEPAGE = "https://fedoraproject.org/wiki/Changes/XwaylandStandalone" + +DEFAULT_PREFERENCE = "-1" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" + +SRC_URI = "https://www.x.org/archive/individual/xserver/${BP_ORIGINAL}.tar.xz" +BP_ORIGINAL = "${BPN}-23.1.1" +SRC_URI[sha256sum] = "fb9461f5cb9fea5e07e91882311b0c88b43e8843b017ebac05eb5af69aa34c15" +S = "${WORKDIR}/${BP_ORIGINAL}" + +UPSTREAM_CHECK_REGEX = "xwayland-(?P<pver>\d+(\.(?!90\d)\d+)+)\.tar" + +inherit meson features_check pkgconfig +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +DEPENDS += "xorgproto xtrans pixman libxkbfile libxfont2 wayland wayland-native wayland-protocols libdrm libepoxy libxcvt" + +OPENGL_PKGCONFIGS = "glx glamor dri3" +PACKAGECONFIG ??= "${XORG_CRYPTO} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ +" +PACKAGECONFIG[dri3] = "-Ddri3=true,-Ddri3=false,libxshmfence" +PACKAGECONFIG[glx] = "-Dglx=true,-Dglx=false,virtual/libgl virtual/libx11" +PACKAGECONFIG[glamor] = "-Dglamor=true,-Dglamor=false,libepoxy virtual/libgbm,libegl" +PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" +PACKAGECONFIG[xinerama] = "-Dxinerama=true,-Dxinerama=false" + +# Xorg requires a SHA1 implementation, pick one +XORG_CRYPTO ??= "openssl" +PACKAGECONFIG[openssl] = "-Dsha1=libcrypto,,openssl" +PACKAGECONFIG[nettle] = "-Dsha1=libnettle,,nettle" +PACKAGECONFIG[gcrypt] = "-Dsha1=libgcrypt,,libgcrypt" + +do_install:append() { + # remove files not needed and clashing with xserver-xorg + rm -rf ${D}/${libdir}/xorg/ +} + +FILES:${PN} += "${libdir}/xorg/protocol.txt" + +RDEPENDS:${PN} += "xkbcomp" diff --git a/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend new file mode 100644 index 00000000..f71ba16c --- /dev/null +++ b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend @@ -0,0 +1,20 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:imxgpu = " \ + file://0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch \ +" + +OPENGL_PKGCONFIGS:remove:imxgpu = "${OPENGL_PKGCONFIGS_REMOVE_IMXGPU}" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU = "" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx6-nxp-bsp = "glamor glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx7-nxp-bsp = "glamor glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx8-nxp-bsp = "glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx9-nxp-bsp = "glamor glx" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" |