From 6e76d204612e4d18afe81e658b8c4b638a8404fc Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 25 Aug 2022 16:26:16 -0500 Subject: weston: Upgrade 9.0.0.imx -> 10.0.0.imx Signed-off-by: Tom Hochstein (cherry picked from commit 96f0ad1126bdeca57b810b7c2ac010fa7af9ab25) --- conf/machine/include/imx-base.inc | 2 +- .../wayland/required-distro-features.inc | 8 + ...ocol-no-found-wayland-scanner-with-Yocto-.patch | 8 +- ...g2d-renderer-Add-vsync-to-cloned-displays.patch | 102 ---------- ...ackend-drm-Re-order-gbm-destruction-at-DR.patch | 52 ------ .../0001-meson.build-fix-incorrect-header.patch | 32 ---- ...ch-Provide-a-default-version-that-doesn-t.patch | 199 -------------------- recipes-graphics/wayland/weston_10.0.0.imx.bb | 206 +++++++++++++++++++++ recipes-graphics/wayland/weston_9.0.0.imx.bb | 202 -------------------- 9 files changed, 219 insertions(+), 592 deletions(-) create mode 100644 recipes-graphics/wayland/required-distro-features.inc delete mode 100644 recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch delete mode 100644 recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch delete mode 100644 recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch delete mode 100644 recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch create mode 100644 recipes-graphics/wayland/weston_10.0.0.imx.bb delete mode 100644 recipes-graphics/wayland/weston_9.0.0.imx.bb diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 8d6dac9d..33fb6c84 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -471,7 +471,7 @@ 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 ??= "9.0.0.imx" +PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.0.imx" PREFERRED_VERSION_weston:imx-mainline-bsp = "" PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.25.imx" 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/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 dde00546..676d0338 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 be066d9841a9cd5e9cc5ef3c457bd1e33b2a5fae Mon Sep 17 00:00:00 2001 +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 @@ -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 dc90ec2a..8290ad44 100644 +index bdd322ac..e50b23bb 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -1,4 +1,4 @@ @@ -34,7 +34,7 @@ index dc90ec2a..8290ad44 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.18') + dep_wp = dependency('wayland-protocols', version: '>= 1.24') -- -2.20.1 +2.17.1 diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch deleted file mode 100644 index fb2d47bf..00000000 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch +++ /dev/null @@ -1,102 +0,0 @@ -From b719011b7c015e2d6f0108c9d0709b98d21d6a89 Mon Sep 17 00:00:00 2001 -From: Piotr Wojtaszczyk -Date: Mon, 21 Mar 2022 12:37:18 +0100 -Subject: [PATCH] g2d-renderer: Add vsync to cloned displays. - -When using g2d clone mode allocates additional surfaces according to -FB_MULTI_BUFFER for each cloned display. The g2d blit from the main screen -to the cloned displays is done using inactive surface. The FBIOPAN_DISPLAY -ioctl to the surface is done afterwards. - -Signed-off-by: Piotr Wojtaszczyk ---- - libweston/renderer-g2d/g2d-renderer.c | 33 +++++++++++++++++++++------ - 1 file changed, 26 insertions(+), 7 deletions(-) - -diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c -index 34a077b7..3e6395d6 100644 ---- a/libweston/renderer-g2d/g2d-renderer.c -+++ b/libweston/renderer-g2d/g2d-renderer.c -@@ -525,6 +525,7 @@ g2d_blit_surface(void *handle, struct g2d_surfaceEx * srcG2dSurface, struct g2d_ - static void - g2d_flip_surface(struct weston_output *output) - { -+ int i; - struct g2d_output_state *go = get_output_state(output); - go->fb_info.varinfo.yoffset = go->activebuffer * go->fb_info.y_resolution; - -@@ -532,6 +533,16 @@ g2d_flip_surface(struct weston_output *output) - { - weston_log("FBIOPAN_DISPLAY Failed\n"); - } -+ -+ for (i = 0; i < go->clone_display_num; i++) -+ { -+ go->mirror_fb_info[i].varinfo.yoffset = go->activebuffer * go->mirror_fb_info[i].y_resolution; -+ if(ioctl(go->mirror_fb_info[i].fb_fd, FBIOPAN_DISPLAY, &(go->mirror_fb_info[i].varinfo)) < 0) -+ { -+ weston_log("FBIOPAN_DISPLAY clone %d Failed\n", i); -+ } -+ } -+ - go->activebuffer = (go->activebuffer + 1) % go->nNumBuffers; - } - -@@ -571,17 +582,18 @@ copy_to_framebuffer(struct weston_output *output, pixman_region32_t* output_dama - int i = 0; - for(i = 0; i < go->clone_display_num; i++) - { -+ int idx = i * go->nNumBuffers + go->activebuffer; - g2dRECT srcRect = {0, 0, go->renderSurf[go->activebuffer].base.width, go->renderSurf[go->activebuffer].base.height}; -- g2dRECT dstrect = {0, 0, go->mirrorSurf[i].base.width, go->mirrorSurf[i].base.height}; -+ g2dRECT dstrect = {0, 0, go->mirrorSurf[idx].base.width, go->mirrorSurf[idx].base.height}; - if(go->directBlit || go->nNumBuffers > 1) - { - g2d_blit_surface(gr->handle, &go->renderSurf[go->activebuffer], -- &go->mirrorSurf[i], &srcRect, &dstrect); -+ &go->mirrorSurf[idx], &srcRect, &dstrect); - } - else - { - g2d_blit_surface(gr->handle, &go->offscreenSurface, -- &go->mirrorSurf[i], &srcRect, &dstrect); -+ &go->mirrorSurf[idx], &srcRect, &dstrect); - } - } - } -@@ -2113,6 +2125,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, - int clone_display_num = 0; - int count = 0; - int k=0, dispCount = 0; -+ int offset = 0; - char displays[5][32]; - weston_log("g2d_renderer_output_create device=%s\n", device); - count = strlen(device); -@@ -2166,7 +2179,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, - - if(go->clone_display_num) - { -- go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num); -+ go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num * go->nNumBuffers); - go->mirror_fb_info = zalloc(sizeof(struct fb_screeninfo) * clone_display_num); - if(go->mirrorSurf == NULL || go->mirror_fb_info == NULL) - return -1; -@@ -2178,9 +2191,15 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, - weston_log("Open frame buffer failed.\n"); - return -1; - } -- get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[i]); -- go->mirrorSurf[i].base.planes[0] = go->mirror_fb_info[i].physical; -- g2d_clear(gr->handle, &go->mirrorSurf[i].base); -+ -+ offset = go->mirror_fb_info[i].stride_bytes * go->mirror_fb_info[i].y_resolution; -+ for(k = 0; k < go->nNumBuffers; k++) -+ { -+ int idx = i * go->nNumBuffers + k; -+ get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[idx]); -+ go->mirrorSurf[idx].base.planes[0] = go->mirror_fb_info[i].physical + (offset * k); -+ g2d_clear(gr->handle, &go->mirrorSurf[idx].base); -+ } - } - } - g2d_finish(gr->handle); diff --git a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch deleted file mode 100644 index db640055..00000000 --- a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 4be82f75a47bd456452ab713d7d57a75d844f42a Mon Sep 17 00:00:00 2001 -From: Marius Vlad -Date: Thu, 1 Apr 2021 00:12:00 +0300 -Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at - DRM-backend tear down - -Tearing down the drm-backend when there are no input devices, would call -for the gbm device destruction before compositor shutdown. The latter -would call into the renderer detroy function and assume that the -EGLDisplay, which was created using the before-mentioned gbm device, is -still available. This patch re-orders the gbm destruction after the -compositor shutdown when no one would make use of it. - -Fixes: #314 - -Signed-off-by: Marius Vlad -Suggested-by: Daniel Stone - -Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] ---- - libweston/backend-drm/drm.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c -index 9d3b5dcc..67834d3e 100644 ---- a/libweston/backend-drm/drm.c -+++ b/libweston/backend-drm/drm.c -@@ -3402,10 +3402,6 @@ err_drm_source: - wl_event_source_remove(b->drm_source); - err_udev_input: - udev_input_destroy(&b->input); --#ifdef BUILD_DRM_GBM -- if (b->gbm) -- gbm_device_destroy(b->gbm); --#endif - destroy_sprites(b); - err_udev_dev: - udev_device_unref(drm_device); -@@ -3415,6 +3411,10 @@ err_launcher: - weston_launcher_destroy(compositor->launcher); - err_compositor: - weston_compositor_shutdown(compositor); -+#ifdef BUILD_DRM_GBM -+ if (b->gbm) -+ gbm_device_destroy(b->gbm); -+#endif - free(b); - return NULL; - } --- -2.17.1 - diff --git a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch deleted file mode 100644 index 06e0f7ba..00000000 --- a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Tue, 20 Apr 2021 20:42:18 -0700 -Subject: [PATCH] meson.build: fix incorrect header - -The wayland.c actually include 'xdg-shell-client-protocol.h' instead of -the server one, so fix it. Otherwise, it's possible to get build failure -due to race condition. - -Upstream-Status: Pending - -Signed-off-by: Chen Qi ---- - libweston/backend-wayland/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build -index 7e82513..29270b5 100644 ---- a/libweston/backend-wayland/meson.build -+++ b/libweston/backend-wayland/meson.build -@@ -10,7 +10,7 @@ srcs_wlwl = [ - fullscreen_shell_unstable_v1_protocol_c, - presentation_time_protocol_c, - presentation_time_server_protocol_h, -- xdg_shell_server_protocol_h, -+ xdg_shell_client_protocol_h, - xdg_shell_protocol_c, - ] - --- -2.30.2 - 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 f6ebfd8f..00000000 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null @@ -1,199 +0,0 @@ -From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -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: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] - -Signed-off-by: Tom Hochstein -Signed-off-by: Jussi Kukkonen -Signed-off-by: Denys Dmytriyenko -Signed-off-by: Ming Liu - ---- - libweston/meson.build | 16 ++++++++++++---- - libweston/weston-launch.c | 21 +++++++++++++++++++++ - meson_options.txt | 7 +++++++ - 3 files changed, 40 insertions(+), 4 deletions(-) - -diff --git a/libweston/meson.build b/libweston/meson.build -index 08d23ec..cb9fd3f 100644 ---- a/libweston/meson.build -+++ b/libweston/meson.build -@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( - ) - - if get_option('weston-launch') -- dep_pam = cc.find_library('pam') -+ deps_weston_launch = [systemd_dep, dep_libdrm] - -- if not cc.has_function('pam_open_session', dependencies: dep_pam) -- error('pam_open_session not found for weston-launch') -+ if get_option('pam') -+ dep_pam = cc.find_library('pam') -+ if not cc.has_function('pam_open_session', dependencies: dep_pam) -+ error('pam_open_session not found for weston-launch') -+ endif -+ -+ if dep_pam.found() -+ deps_weston_launch += dep_pam -+ config_h.set('HAVE_PAM', '1') -+ endif - endif - - executable( - 'weston-launch', - 'weston-launch.c', -- dependencies: [dep_pam, systemd_dep, dep_libdrm], -+ dependencies: deps_weston_launch, - include_directories: common_inc, - install: true - ) -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 521cb2c..2d42d33 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -51,7 +51,9 @@ - - #include - #include -+#ifdef HAVE_PAM - #include -+#endif - - #ifdef HAVE_SYSTEMD_LOGIN - #include -@@ -100,8 +102,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]; -@@ -192,6 +196,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, -@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) - - return 0; - } -+#endif - - static int - setup_launcher_socket(struct weston_launch *wl) -@@ -466,6 +472,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) -@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) - err, pam_strerror(wl->ph, err)); - pam_end(wl->ph, err); - } -+#endif - - /* - * Get a fresh handle to the tty as the previous one is in -@@ -710,6 +718,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) { -@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) - } - free(env); - } -+#endif - - /* - * We open a new session, so it makes sense -@@ -789,8 +799,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"); -@@ -804,7 +816,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' }, -@@ -816,11 +830,16 @@ 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) { - fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); - exit(EXIT_FAILURE); - } -+#else -+ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); -+ exit(EXIT_FAILURE); -+#endif - break; - case 't': - tty = optarg; -@@ -872,8 +891,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/meson_options.txt b/meson_options.txt -index 239bd2d..99e4ec3 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -73,6 +73,13 @@ option( - ) - - option( -+ 'pam', -+ type: 'boolean', -+ value: true, -+ description: 'Define if PAM is available' -+) -+ -+option( - 'xwayland', - type: 'boolean', - value: true, diff --git a/recipes-graphics/wayland/weston_10.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.0.imx.bb new file mode 100644 index 00000000..8fce4472 --- /dev/null +++ b/recipes-graphics/wayland/weston_10.0.0.imx.bb @@ -0,0 +1,206 @@ +# 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" + +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://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" +SRCBRANCH = "weston-imx-10.0" +SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d" + +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 = " \ + rdp \ + ${@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" +# 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" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" + +########### End of i.MX overrides ######### diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb deleted file mode 100644 index 63143787..00000000 --- a/recipes-graphics/wayland/weston_9.0.0.imx.bb +++ /dev/null @@ -1,202 +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: c8aa0222ce2be647911114aaebcbb0d55d7caf87 - -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=6c53bbbd99273f4f7c4affa855c33c0a" - -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 \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ - file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ - file://0001-meson.build-fix-incorrect-header.patch \ - file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ - file://0001-g2d-renderer-Add-vsync-to-cloned-displays.patch \ -" - -SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " - -SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit meson pkgconfig useradd features_check -# depends on virtual/egl -# weston-init requires pam enabled if started via systemd -REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" - -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 += "-Dbackend-default=auto -Dpipewire=false" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ - ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ - launch \ - image-jpeg \ - screenshare \ - shell-desktop \ - shell-fullscreen \ - shell-ivi" - -# -# 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] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" -# Weston on RDP -PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" -# weston-launch -PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-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=all -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 PAM support -PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" -# 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" - -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" - -SRCBRANCH = "weston-imx-9.0" -SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ -" -SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ -" -SRCREV = "7859a762617682bd804e210ad3bda6bdcd3ea24a" -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" - -# Clients support -SIMPLE_CLIENTS = "all" -SIMPLE_CLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" -PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" -PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" -# 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" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" - -########### End of i.MX overrides ######### -- cgit v1.2.3-54-g00ecf