From 3da856d28cd38af366dc5940f9c4cd31986ec6c1 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 08:16:14 -0700 Subject: xwayland: Make local copy of 23.1.1 recipe The langdale branch version of xwayland is incompatible with mickledore and master. To allow meta-freescale master to be compatible with langdale, mickledore, and master, make a local copy of the master version of xwayland and use it. Signed-off-by: Tom Hochstein --- conf/machine/include/imx-base.inc | 2 + recipes-graphics/xwayland/xwayland_%.bbappend | 18 -------- recipes-graphics/xwayland/xwayland_23.1.1.imx.bb | 53 ++++++++++++++++++++++ .../xwayland/xwayland_23.1.1.imx.bbappend | 18 ++++++++ 4 files changed, 73 insertions(+), 18 deletions(-) delete mode 100644 recipes-graphics/xwayland/xwayland_%.bbappend create mode 100644 recipes-graphics/xwayland/xwayland_23.1.1.imx.bb create mode 100644 recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index d8022c01..c4ed8dd7 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -522,6 +522,8 @@ PREFERRED_VERSION_wayland-protocols:mx7-nxp-bsp ??= "1.31.imx" PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ??= "1.31.imx" PREFERRED_VERSION_wayland-protocols:mx9-nxp-bsp ??= "1.31.imx" +PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "23.1.1.imx" + # Use i.MX libdrm Version PREFERRED_VERSION_libdrm:mx6-nxp-bsp ??= "2.4.114.imx" PREFERRED_VERSION_libdrm:mx7-nxp-bsp ??= "2.4.114.imx" diff --git a/recipes-graphics/xwayland/xwayland_%.bbappend b/recipes-graphics/xwayland/xwayland_%.bbappend deleted file mode 100644 index 8515a538..00000000 --- a/recipes-graphics/xwayland/xwayland_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -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" - - -# 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/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\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..8515a538 --- /dev/null +++ b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend @@ -0,0 +1,18 @@ +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" + + +# 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" -- cgit v1.2.3-54-g00ecf From e01382f94a11732d230cc4e2329c01e3219d3932 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 13:23:44 -0700 Subject: xwayland: Mark 23.1.1.imx as MACHINE_SOCARCH The bbappend does customize for the SOC, so mark is as such. Signed-off-by: Tom Hochstein --- recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend index 8515a538..e1708a96 100644 --- a/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend +++ b/recipes-graphics/xwayland/xwayland_23.1.1.imx.bbappend @@ -16,3 +16,5 @@ OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx8-nxp-bsp = "glx" LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" -- cgit v1.2.3-54-g00ecf From e7ff896868a592dcba3ce2b549116c1e4e7fec11 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 09:51:10 -0700 Subject: weston: Upgrade 10.0.1.imx -> 10.0.3.imx - Update OE-Core copy to 4b42fd8 - Drop dont-use-plane-add-prop.patch - Move fbdev dependency on libdrm to i.MX overrides section - Make removal of wayland and x11 from PACKAGECONFIG overridable Signed-off-by: Tom Hochstein --- .../wayland/weston/dont-use-plane-add-prop.patch | 23 --- recipes-graphics/wayland/weston_10.0.1.imx.bb | 212 --------------------- recipes-graphics/wayland/weston_10.0.3.imx.bb | 208 ++++++++++++++++++++ 3 files changed, 208 insertions(+), 235 deletions(-) delete mode 100644 recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch delete mode 100644 recipes-graphics/wayland/weston_10.0.1.imx.bb create mode 100644 recipes-graphics/wayland/weston_10.0.3.imx.bb diff --git a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch deleted file mode 100644 index a4444e5d..00000000 --- a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix atomic modesetting with musl - -atomic modesetting seems to fail with drm weston backend and this patch fixes -it, below errors are seen before weston exits - -atomic: couldn't commit new state: Invalid argument - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] -Signed-off-by: Khem Raj - ---- a/libweston/backend-drm/kms.c -+++ b/libweston/backend-drm/kms.c -@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr - wl_list_for_each(plane, &b->plane_list, link) { - drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", - (unsigned long) plane->plane_id); -- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); -- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); -+ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); -+ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); - } - - flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/recipes-graphics/wayland/weston_10.0.1.imx.bb b/recipes-graphics/wayland/weston_10.0.1.imx.bb deleted file mode 100644 index 470a7b0b..00000000 --- a/recipes-graphics/wayland/weston_10.0.1.imx.bb +++ /dev/null @@ -1,212 +0,0 @@ -# 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: 400aae43d08f0b9f787ac0d21cb3c97058d76748 - -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://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://systemd-notify.weston-start \ - " - -SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " - -SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -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" -DEPENDS:append:imxfbdev = " libdrm" - -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 ${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 - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then - install -Dm 644 ${WORKDIR}/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" - -DEFAULT_PREFERENCE = "-1" - -SRC_URI:remove = "https://wayland.freedesktop.org/releases/${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 \ - file://0001-tests-Add-dependency-on-screenshooter-client-protoco.patch \ - " -SRCBRANCH = "weston-imx-10.0.1" -SRCREV = "3f8f336b5d2cf7ea7aa4e047d669d093fc46dfe6" - -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:remove = "wayland x11" -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" -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_10.0.3.imx.bb b/recipes-graphics/wayland/weston_10.0.3.imx.bb new file mode 100644 index 00000000..f3e913fc --- /dev/null +++ b/recipes-graphics/wayland/weston_10.0.3.imx.bb @@ -0,0 +1,208 @@ +# 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://LICENSE;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\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 ${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 + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/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" + +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.3" +SRCREV = "c41675dc616886828219eba9b9ce22ec17533090" +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 ######### -- cgit v1.2.3-54-g00ecf From 016e9bcbf71218a210c7173c33cdbff1ec3d8d2f Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 10:00:42 -0700 Subject: weston: Upgrade 10.0.3.imx -> 11.0.1.imx for i.MX 8 and 9 This upgrade does not support i.MX 6 and 7 due to the removal of fbdev support, so the 10.0.3.imx recipe is kept for 6 and 7. Signed-off-by: Tom Hochstein --- conf/machine/include/imx-base.inc | 5 +- ...ocol-no-found-wayland-scanner-with-Yocto-.patch | 40 +++++ .../0001-g2d-renderer.c-Include-sys-stat.h.patch | 34 ++++ ...ocol-no-found-wayland-scanner-with-Yocto-.patch | 8 +- .../0001-g2d-renderer.c-Include-sys-stat.h.patch | 34 ---- ...ependency-on-screenshooter-client-protoco.patch | 33 ---- .../wayland/weston/xwayland.weston-start | 3 +- recipes-graphics/wayland/weston_11.0.1.imx.bb | 182 +++++++++++++++++++++ 8 files changed, 266 insertions(+), 73 deletions(-) create mode 100644 recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch create mode 100644 recipes-graphics/wayland/weston-10.0.3.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch delete mode 100644 recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch delete mode 100644 recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch create mode 100644 recipes-graphics/wayland/weston_11.0.1.imx.bb diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index c4ed8dd7..06d6e96b 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -514,7 +514,10 @@ PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" -PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.1.imx" +PREFERRED_VERSION_weston:imx-nxp-bsp ??= "11.0.1.imx" +# i.MX 6 & 7 stay on weston 10.0 for fbdev +PREFERRED_VERSION_weston:mx6-nxp-bsp ??= "10.0.3.imx" +PREFERRED_VERSION_weston:mx7-nxp-bsp ??= "10.0.3.imx" PREFERRED_VERSION_weston:imx-mainline-bsp = "" PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.31.imx" diff --git a/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch new file mode 100644 index 00000000..676d0338 --- /dev/null +++ b/recipes-graphics/wayland/weston-10.0.3.imx/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch @@ -0,0 +1,40 @@ +From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +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. + +Signed-off-by: Max Krummenacher +--- + 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.3.imx/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston-10.0.3.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.3.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 +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 +--- + 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 + #include + #include ++#include /* stat() */ + + #include + #include "g2d-renderer.h" +-- +2.37.3 + 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 index 676d0338..39439ce1 100644 --- 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 @@ -1,4 +1,4 @@ -From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 +From 3aa4024ac4107e68552be4dfe5fce511900629c9 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 11 Jul 2022 19:38:19 +0000 Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto @@ -26,7 +26,7 @@ Signed-off-by: Max Krummenacher 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/meson.build b/protocol/meson.build -index bdd322ac..e50b23bb 100644 +index e8698530..ba52089b 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -1,4 +1,4 @@ @@ -34,7 +34,7 @@ index bdd322ac..e50b23bb 100644 +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') + dep_wp = dependency('wayland-protocols', version: '>= 1.26', -- -2.17.1 +2.25.1 diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch deleted file mode 100644 index b9cb31fb..00000000 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 4afe9b2f9ef24ce0c9bf1cd41f94ca45afa4f445 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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 - #include - #include -+#include /* stat() */ - - #include - #include "g2d-renderer.h" --- -2.37.3 - diff --git a/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch b/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch deleted file mode 100644 index 46538600..00000000 --- a/recipes-graphics/wayland/weston/0001-tests-Add-dependency-on-screenshooter-client-protoco.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2ac6b6b084a877adde64db7faff2ed22eb3ea97a Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Tue, 8 Feb 2022 22:39:42 +0000 -Subject: [PATCH] tests: Add dependency on screenshooter client protocol - -Given that the test-helper code relies on the screenshooter protocol, -make sure it's available for us to build, and the dependency ensures we -build in order. - -Fixes: #588 - -Signed-off-by: Daniel Stone ---- - tests/meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/meson.build b/tests/meson.build -index 2d464ddcc..222091cd1 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -29,8 +29,9 @@ lib_test_client = static_library( - 'weston-test-client-helper.c', - 'weston-test-fixture-compositor.c', - weston_test_client_protocol_h, -- weston_screenshooter_protocol_c, - weston_test_protocol_c, -+ weston_screenshooter_client_protocol_h, -+ weston_screenshooter_protocol_c, - viewporter_client_protocol_h, - viewporter_protocol_c, - 'color_util.h', - - diff --git a/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index db384b1a..342ac8d1 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start @@ -1,5 +1,6 @@ #!/bin/sh if type Xwayland >/dev/null 2>/dev/null; then - mkdir -p /tmp/.X11-unix + mkdir -m 775 -p /tmp/.X11-unix + chown root:video /tmp/.X11-unix fi diff --git a/recipes-graphics/wayland/weston_11.0.1.imx.bb b/recipes-graphics/wayland/weston_11.0.1.imx.bb new file mode 100644 index 00000000..a14f8d99 --- /dev/null +++ b/recipes-graphics/wayland/weston_11.0.1.imx.bb @@ -0,0 +1,182 @@ +# 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: eb00d50e5da97a726eb6290317a3ef7d8e1b90a3 + +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://LICENSE;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] = "a6138d4dc9554560ac304312df456019f4be025ec79130f05fb5f2e41c091e1d" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" +UPSTREAM_CHECK_REGEX = "weston-(?P\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 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-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] = "-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" +# 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 ${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 + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/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" + +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-11.0.1" +SRCREV = "36ab06f0ad8e8981a482df6a08f39e1ae2a6a2dd" +S = "${WORKDIR}/git" + +PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11" +PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}" + +PACKAGECONFIG:append:imxgpu2d = " imxg2d" +PACKAGECONFIG:append:mx93-nxp-bsp = " imxg2d" + +# Override +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland" + +# 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 ######### -- cgit v1.2.3-54-g00ecf