diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2022-08-25 16:26:16 -0500 |
---|---|---|
committer | Tom Hochstein <tom.hochstein@nxp.com> | 2022-08-26 15:12:39 -0500 |
commit | 96f0ad1126bdeca57b810b7c2ac010fa7af9ab25 (patch) | |
tree | be5a2a6f41476910d1d293a3c930e5ed8a1d74bd /recipes-graphics | |
parent | 576292c80045d94e188df4e223f8078fe753a76b (diff) | |
download | meta-freescale-96f0ad1126bdeca57b810b7c2ac010fa7af9ab25.tar.gz |
weston: Upgrade 9.0.0.imx -> 10.0.0.imx
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/wayland/required-distro-features.inc | 8 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch | 8 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch | 102 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch | 52 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch | 32 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | 199 | ||||
-rw-r--r-- | recipes-graphics/wayland/weston_10.0.0.imx.bb (renamed from recipes-graphics/wayland/weston_9.0.0.imx.bb) | 72 |
7 files changed, 50 insertions, 423 deletions
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 @@ | |||
1 | # distro features required by weston recipes | ||
2 | |||
3 | inherit features_check | ||
4 | |||
5 | # requires pam enabled if started via systemd | ||
6 | # | ||
7 | REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
8 | |||
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 @@ | |||
1 | From be066d9841a9cd5e9cc5ef3c457bd1e33b2a5fae Mon Sep 17 00:00:00 2001 | 1 | From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 |
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | 2 | From: Max Krummenacher <max.krummenacher@toradex.com> |
3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 | 3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 |
4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto | 4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto |
@@ -26,7 +26,7 @@ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | |||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | 26 | 1 file changed, 1 insertion(+), 1 deletion(-) |
27 | 27 | ||
28 | diff --git a/protocol/meson.build b/protocol/meson.build | 28 | diff --git a/protocol/meson.build b/protocol/meson.build |
29 | index dc90ec2a..8290ad44 100644 | 29 | index bdd322ac..e50b23bb 100644 |
30 | --- a/protocol/meson.build | 30 | --- a/protocol/meson.build |
31 | +++ b/protocol/meson.build | 31 | +++ b/protocol/meson.build |
32 | @@ -1,4 +1,4 @@ | 32 | @@ -1,4 +1,4 @@ |
@@ -34,7 +34,7 @@ index dc90ec2a..8290ad44 100644 | |||
34 | +dep_scanner = dependency('wayland-scanner', native: true) | 34 | +dep_scanner = dependency('wayland-scanner', native: true) |
35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) | 35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) |
36 | 36 | ||
37 | dep_wp = dependency('wayland-protocols', version: '>= 1.18') | 37 | dep_wp = dependency('wayland-protocols', version: '>= 1.24') |
38 | -- | 38 | -- |
39 | 2.20.1 | 39 | 2.17.1 |
40 | 40 | ||
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 @@ | |||
1 | From b719011b7c015e2d6f0108c9d0709b98d21d6a89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> | ||
3 | Date: Mon, 21 Mar 2022 12:37:18 +0100 | ||
4 | Subject: [PATCH] g2d-renderer: Add vsync to cloned displays. | ||
5 | |||
6 | When using g2d clone mode allocates additional surfaces according to | ||
7 | FB_MULTI_BUFFER for each cloned display. The g2d blit from the main screen | ||
8 | to the cloned displays is done using inactive surface. The FBIOPAN_DISPLAY | ||
9 | ioctl to the surface is done afterwards. | ||
10 | |||
11 | Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> | ||
12 | --- | ||
13 | libweston/renderer-g2d/g2d-renderer.c | 33 +++++++++++++++++++++------ | ||
14 | 1 file changed, 26 insertions(+), 7 deletions(-) | ||
15 | |||
16 | diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c | ||
17 | index 34a077b7..3e6395d6 100644 | ||
18 | --- a/libweston/renderer-g2d/g2d-renderer.c | ||
19 | +++ b/libweston/renderer-g2d/g2d-renderer.c | ||
20 | @@ -525,6 +525,7 @@ g2d_blit_surface(void *handle, struct g2d_surfaceEx * srcG2dSurface, struct g2d_ | ||
21 | static void | ||
22 | g2d_flip_surface(struct weston_output *output) | ||
23 | { | ||
24 | + int i; | ||
25 | struct g2d_output_state *go = get_output_state(output); | ||
26 | go->fb_info.varinfo.yoffset = go->activebuffer * go->fb_info.y_resolution; | ||
27 | |||
28 | @@ -532,6 +533,16 @@ g2d_flip_surface(struct weston_output *output) | ||
29 | { | ||
30 | weston_log("FBIOPAN_DISPLAY Failed\n"); | ||
31 | } | ||
32 | + | ||
33 | + for (i = 0; i < go->clone_display_num; i++) | ||
34 | + { | ||
35 | + go->mirror_fb_info[i].varinfo.yoffset = go->activebuffer * go->mirror_fb_info[i].y_resolution; | ||
36 | + if(ioctl(go->mirror_fb_info[i].fb_fd, FBIOPAN_DISPLAY, &(go->mirror_fb_info[i].varinfo)) < 0) | ||
37 | + { | ||
38 | + weston_log("FBIOPAN_DISPLAY clone %d Failed\n", i); | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | go->activebuffer = (go->activebuffer + 1) % go->nNumBuffers; | ||
43 | } | ||
44 | |||
45 | @@ -571,17 +582,18 @@ copy_to_framebuffer(struct weston_output *output, pixman_region32_t* output_dama | ||
46 | int i = 0; | ||
47 | for(i = 0; i < go->clone_display_num; i++) | ||
48 | { | ||
49 | + int idx = i * go->nNumBuffers + go->activebuffer; | ||
50 | g2dRECT srcRect = {0, 0, go->renderSurf[go->activebuffer].base.width, go->renderSurf[go->activebuffer].base.height}; | ||
51 | - g2dRECT dstrect = {0, 0, go->mirrorSurf[i].base.width, go->mirrorSurf[i].base.height}; | ||
52 | + g2dRECT dstrect = {0, 0, go->mirrorSurf[idx].base.width, go->mirrorSurf[idx].base.height}; | ||
53 | if(go->directBlit || go->nNumBuffers > 1) | ||
54 | { | ||
55 | g2d_blit_surface(gr->handle, &go->renderSurf[go->activebuffer], | ||
56 | - &go->mirrorSurf[i], &srcRect, &dstrect); | ||
57 | + &go->mirrorSurf[idx], &srcRect, &dstrect); | ||
58 | } | ||
59 | else | ||
60 | { | ||
61 | g2d_blit_surface(gr->handle, &go->offscreenSurface, | ||
62 | - &go->mirrorSurf[i], &srcRect, &dstrect); | ||
63 | + &go->mirrorSurf[idx], &srcRect, &dstrect); | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | @@ -2113,6 +2125,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
68 | int clone_display_num = 0; | ||
69 | int count = 0; | ||
70 | int k=0, dispCount = 0; | ||
71 | + int offset = 0; | ||
72 | char displays[5][32]; | ||
73 | weston_log("g2d_renderer_output_create device=%s\n", device); | ||
74 | count = strlen(device); | ||
75 | @@ -2166,7 +2179,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
76 | |||
77 | if(go->clone_display_num) | ||
78 | { | ||
79 | - go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num); | ||
80 | + go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num * go->nNumBuffers); | ||
81 | go->mirror_fb_info = zalloc(sizeof(struct fb_screeninfo) * clone_display_num); | ||
82 | if(go->mirrorSurf == NULL || go->mirror_fb_info == NULL) | ||
83 | return -1; | ||
84 | @@ -2178,9 +2191,15 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
85 | weston_log("Open frame buffer failed.\n"); | ||
86 | return -1; | ||
87 | } | ||
88 | - get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[i]); | ||
89 | - go->mirrorSurf[i].base.planes[0] = go->mirror_fb_info[i].physical; | ||
90 | - g2d_clear(gr->handle, &go->mirrorSurf[i].base); | ||
91 | + | ||
92 | + offset = go->mirror_fb_info[i].stride_bytes * go->mirror_fb_info[i].y_resolution; | ||
93 | + for(k = 0; k < go->nNumBuffers; k++) | ||
94 | + { | ||
95 | + int idx = i * go->nNumBuffers + k; | ||
96 | + get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[idx]); | ||
97 | + go->mirrorSurf[idx].base.planes[0] = go->mirror_fb_info[i].physical + (offset * k); | ||
98 | + g2d_clear(gr->handle, &go->mirrorSurf[idx].base); | ||
99 | + } | ||
100 | } | ||
101 | } | ||
102 | 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 @@ | |||
1 | From 4be82f75a47bd456452ab713d7d57a75d844f42a Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Thu, 1 Apr 2021 00:12:00 +0300 | ||
4 | Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at | ||
5 | DRM-backend tear down | ||
6 | |||
7 | Tearing down the drm-backend when there are no input devices, would call | ||
8 | for the gbm device destruction before compositor shutdown. The latter | ||
9 | would call into the renderer detroy function and assume that the | ||
10 | EGLDisplay, which was created using the before-mentioned gbm device, is | ||
11 | still available. This patch re-orders the gbm destruction after the | ||
12 | compositor shutdown when no one would make use of it. | ||
13 | |||
14 | Fixes: #314 | ||
15 | |||
16 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
17 | Suggested-by: Daniel Stone <daniel.stone@collabora.com> | ||
18 | |||
19 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] | ||
20 | --- | ||
21 | libweston/backend-drm/drm.c | 8 ++++---- | ||
22 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
23 | |||
24 | diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c | ||
25 | index 9d3b5dcc..67834d3e 100644 | ||
26 | --- a/libweston/backend-drm/drm.c | ||
27 | +++ b/libweston/backend-drm/drm.c | ||
28 | @@ -3402,10 +3402,6 @@ err_drm_source: | ||
29 | wl_event_source_remove(b->drm_source); | ||
30 | err_udev_input: | ||
31 | udev_input_destroy(&b->input); | ||
32 | -#ifdef BUILD_DRM_GBM | ||
33 | - if (b->gbm) | ||
34 | - gbm_device_destroy(b->gbm); | ||
35 | -#endif | ||
36 | destroy_sprites(b); | ||
37 | err_udev_dev: | ||
38 | udev_device_unref(drm_device); | ||
39 | @@ -3415,6 +3411,10 @@ err_launcher: | ||
40 | weston_launcher_destroy(compositor->launcher); | ||
41 | err_compositor: | ||
42 | weston_compositor_shutdown(compositor); | ||
43 | +#ifdef BUILD_DRM_GBM | ||
44 | + if (b->gbm) | ||
45 | + gbm_device_destroy(b->gbm); | ||
46 | +#endif | ||
47 | free(b); | ||
48 | return NULL; | ||
49 | } | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||
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 @@ | |||
1 | From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 20 Apr 2021 20:42:18 -0700 | ||
4 | Subject: [PATCH] meson.build: fix incorrect header | ||
5 | |||
6 | The wayland.c actually include 'xdg-shell-client-protocol.h' instead of | ||
7 | the server one, so fix it. Otherwise, it's possible to get build failure | ||
8 | due to race condition. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | libweston/backend-wayland/meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build | ||
18 | index 7e82513..29270b5 100644 | ||
19 | --- a/libweston/backend-wayland/meson.build | ||
20 | +++ b/libweston/backend-wayland/meson.build | ||
21 | @@ -10,7 +10,7 @@ srcs_wlwl = [ | ||
22 | fullscreen_shell_unstable_v1_protocol_c, | ||
23 | presentation_time_protocol_c, | ||
24 | presentation_time_server_protocol_h, | ||
25 | - xdg_shell_server_protocol_h, | ||
26 | + xdg_shell_client_protocol_h, | ||
27 | xdg_shell_protocol_c, | ||
28 | ] | ||
29 | |||
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
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 @@ | |||
1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | |||
6 | PAM | ||
7 | |||
8 | weston-launch requires PAM for starting weston as a non-root user. | ||
9 | |||
10 | Since starting weston as root is a valid use case by itself, if | ||
11 | PAM is not available, provide a default version of weston-launch | ||
12 | without non-root-user support. | ||
13 | |||
14 | Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] | ||
15 | |||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
19 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | ||
20 | |||
21 | --- | ||
22 | libweston/meson.build | 16 ++++++++++++---- | ||
23 | libweston/weston-launch.c | 21 +++++++++++++++++++++ | ||
24 | meson_options.txt | 7 +++++++ | ||
25 | 3 files changed, 40 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/libweston/meson.build b/libweston/meson.build | ||
28 | index 08d23ec..cb9fd3f 100644 | ||
29 | --- a/libweston/meson.build | ||
30 | +++ b/libweston/meson.build | ||
31 | @@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( | ||
32 | ) | ||
33 | |||
34 | if get_option('weston-launch') | ||
35 | - dep_pam = cc.find_library('pam') | ||
36 | + deps_weston_launch = [systemd_dep, dep_libdrm] | ||
37 | |||
38 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
39 | - error('pam_open_session not found for weston-launch') | ||
40 | + if get_option('pam') | ||
41 | + dep_pam = cc.find_library('pam') | ||
42 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
43 | + error('pam_open_session not found for weston-launch') | ||
44 | + endif | ||
45 | + | ||
46 | + if dep_pam.found() | ||
47 | + deps_weston_launch += dep_pam | ||
48 | + config_h.set('HAVE_PAM', '1') | ||
49 | + endif | ||
50 | endif | ||
51 | |||
52 | executable( | ||
53 | 'weston-launch', | ||
54 | 'weston-launch.c', | ||
55 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], | ||
56 | + dependencies: deps_weston_launch, | ||
57 | include_directories: common_inc, | ||
58 | install: true | ||
59 | ) | ||
60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
61 | index 521cb2c..2d42d33 100644 | ||
62 | --- a/libweston/weston-launch.c | ||
63 | +++ b/libweston/weston-launch.c | ||
64 | @@ -51,7 +51,9 @@ | ||
65 | |||
66 | #include <pwd.h> | ||
67 | #include <grp.h> | ||
68 | +#ifdef HAVE_PAM | ||
69 | #include <security/pam_appl.h> | ||
70 | +#endif | ||
71 | |||
72 | #ifdef HAVE_SYSTEMD_LOGIN | ||
73 | #include <systemd/sd-login.h> | ||
74 | @@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) | ||
75 | #endif | ||
76 | |||
77 | struct weston_launch { | ||
78 | +#ifdef HAVE_PAM | ||
79 | struct pam_conv pc; | ||
80 | pam_handle_t *ph; | ||
81 | +#endif | ||
82 | int tty; | ||
83 | int ttynr; | ||
84 | int sock[2]; | ||
85 | @@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | +#ifdef HAVE_PAM | ||
90 | static int | ||
91 | pam_conversation_fn(int msg_count, | ||
92 | const struct pam_message **messages, | ||
93 | @@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | +#endif | ||
98 | |||
99 | static int | ||
100 | setup_launcher_socket(struct weston_launch *wl) | ||
101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) | ||
102 | close(wl->signalfd); | ||
103 | close(wl->sock[0]); | ||
104 | |||
105 | +#ifdef HAVE_PAM | ||
106 | if (wl->new_user) { | ||
107 | err = pam_close_session(wl->ph, 0); | ||
108 | if (err) | ||
109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) | ||
110 | err, pam_strerror(wl->ph, err)); | ||
111 | pam_end(wl->ph, err); | ||
112 | } | ||
113 | +#endif | ||
114 | |||
115 | /* | ||
116 | * Get a fresh handle to the tty as the previous one is in | ||
117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
118 | setenv("HOME", wl->pw->pw_dir, 1); | ||
119 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
120 | |||
121 | +#ifdef HAVE_PAM | ||
122 | env = pam_getenvlist(wl->ph); | ||
123 | if (env) { | ||
124 | for (i = 0; env[i]; ++i) { | ||
125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
126 | } | ||
127 | free(env); | ||
128 | } | ||
129 | +#endif | ||
130 | |||
131 | /* | ||
132 | * We open a new session, so it makes sense | ||
133 | @@ -789,8 +799,10 @@ static void | ||
134 | help(const char *name) | ||
135 | { | ||
136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
137 | +#ifdef HAVE_PAM | ||
138 | fprintf(stderr, " -u, --user Start session as specified username,\n" | ||
139 | " e.g. -u joe, requires root.\n"); | ||
140 | +#endif | ||
141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | ||
142 | " e.g. -t /dev/tty4, requires -u option.\n"); | ||
143 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) | ||
145 | int i, c; | ||
146 | char *tty = NULL; | ||
147 | struct option opts[] = { | ||
148 | +#ifdef HAVE_PAM | ||
149 | { "user", required_argument, NULL, 'u' }, | ||
150 | +#endif | ||
151 | { "tty", required_argument, NULL, 't' }, | ||
152 | { "verbose", no_argument, NULL, 'v' }, | ||
153 | { "help", no_argument, NULL, 'h' }, | ||
154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) | ||
155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | ||
156 | switch (c) { | ||
157 | case 'u': | ||
158 | +#ifdef HAVE_PAM | ||
159 | wl.new_user = optarg; | ||
160 | if (getuid() != 0) { | ||
161 | fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); | ||
162 | exit(EXIT_FAILURE); | ||
163 | } | ||
164 | +#else | ||
165 | + fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); | ||
166 | + exit(EXIT_FAILURE); | ||
167 | +#endif | ||
168 | break; | ||
169 | case 't': | ||
170 | tty = optarg; | ||
171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) | ||
172 | if (setup_tty(&wl, tty) < 0) | ||
173 | exit(EXIT_FAILURE); | ||
174 | |||
175 | +#ifdef HAVE_PAM | ||
176 | if (wl.new_user && setup_pam(&wl) < 0) | ||
177 | exit(EXIT_FAILURE); | ||
178 | +#endif | ||
179 | |||
180 | if (setup_launcher_socket(&wl) < 0) | ||
181 | exit(EXIT_FAILURE); | ||
182 | diff --git a/meson_options.txt b/meson_options.txt | ||
183 | index 239bd2d..99e4ec3 100644 | ||
184 | --- a/meson_options.txt | ||
185 | +++ b/meson_options.txt | ||
186 | @@ -73,6 +73,13 @@ option( | ||
187 | ) | ||
188 | |||
189 | option( | ||
190 | + 'pam', | ||
191 | + type: 'boolean', | ||
192 | + value: true, | ||
193 | + description: 'Define if PAM is available' | ||
194 | +) | ||
195 | + | ||
196 | +option( | ||
197 | 'xwayland', | ||
198 | type: 'boolean', | ||
199 | value: true, | ||
diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.0.imx.bb index 63143787..8fce4472 100644 --- a/recipes-graphics/wayland/weston_9.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_10.0.0.imx.bb | |||
@@ -3,37 +3,34 @@ | |||
3 | # recipe. The second section customizes the recipe for i.MX. | 3 | # recipe. The second section customizes the recipe for i.MX. |
4 | 4 | ||
5 | ########### OE-core copy ################## | 5 | ########### OE-core copy ################## |
6 | # Upstream hash: c8aa0222ce2be647911114aaebcbb0d55d7caf87 | 6 | # Upstream hash: 400aae43d08f0b9f787ac0d21cb3c97058d76748 |
7 | 7 | ||
8 | SUMMARY = "Weston, a Wayland compositor" | 8 | SUMMARY = "Weston, a Wayland compositor" |
9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | 9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" |
10 | HOMEPAGE = "http://wayland.freedesktop.org" | 10 | HOMEPAGE = "http://wayland.freedesktop.org" |
11 | LICENSE = "MIT" | 11 | LICENSE = "MIT" |
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
13 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | 13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
14 | " | ||
14 | 15 | ||
15 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 16 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
16 | file://weston.png \ | 17 | file://weston.png \ |
17 | file://weston.desktop \ | 18 | file://weston.desktop \ |
18 | file://xwayland.weston-start \ | 19 | file://xwayland.weston-start \ |
19 | file://systemd-notify.weston-start \ | 20 | file://systemd-notify.weston-start \ |
20 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 21 | " |
21 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
22 | file://0001-meson.build-fix-incorrect-header.patch \ | ||
23 | file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ | ||
24 | file://0001-g2d-renderer-Add-vsync-to-cloned-displays.patch \ | ||
25 | " | ||
26 | 22 | ||
27 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | 23 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |
28 | 24 | ||
29 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | 25 | SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" |
30 | 26 | ||
31 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 27 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
32 | 28 | ||
33 | inherit meson pkgconfig useradd features_check | 29 | inherit meson pkgconfig useradd |
30 | |||
34 | # depends on virtual/egl | 31 | # depends on virtual/egl |
35 | # weston-init requires pam enabled if started via systemd | 32 | # |
36 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | 33 | require ${THISDIR}/required-distro-features.inc |
37 | 34 | ||
38 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | 35 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
39 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | 36 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
@@ -42,19 +39,22 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', | |||
42 | 39 | ||
43 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 40 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
44 | 41 | ||
45 | EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" | 42 | EXTRA_OEMESON += "-Dpipewire=false" |
46 | 43 | ||
47 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | 44 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
48 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 45 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
49 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 46 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
50 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | 47 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
51 | launch \ | 48 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ |
52 | image-jpeg \ | 49 | image-jpeg \ |
53 | screenshare \ | 50 | screenshare \ |
54 | shell-desktop \ | 51 | shell-desktop \ |
55 | shell-fullscreen \ | 52 | shell-fullscreen \ |
56 | shell-ivi" | 53 | shell-ivi" |
57 | 54 | ||
55 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' | ||
56 | SIMPLECLIENTS ?= "all" | ||
57 | |||
58 | # | 58 | # |
59 | # Compositor choices | 59 | # Compositor choices |
60 | # | 60 | # |
@@ -67,11 +67,11 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx | |||
67 | # Headless Weston | 67 | # Headless Weston |
68 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | 68 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
69 | # Weston on framebuffer | 69 | # Weston on framebuffer |
70 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | 70 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" |
71 | # Weston on RDP | 71 | # Weston on RDP |
72 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | 72 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
73 | # weston-launch | 73 | # weston-launch |
74 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | 74 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" |
75 | # VA-API desktop recorder | 75 | # VA-API desktop recorder |
76 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | 76 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
77 | # Weston with EGL support | 77 | # Weston with EGL support |
@@ -87,11 +87,9 @@ PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | |||
87 | # colord CMS support | 87 | # colord CMS support |
88 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | 88 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
89 | # Clients support | 89 | # Clients support |
90 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 90 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
91 | # Virtual remote output with GStreamer on DRM backend | 91 | # Virtual remote output with GStreamer on DRM backend |
92 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | 92 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
93 | # Weston with PAM support | ||
94 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
95 | # Weston with screen-share support | 93 | # Weston with screen-share support |
96 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | 94 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
97 | # Traditional desktop shell | 95 | # Traditional desktop shell |
@@ -102,6 +100,8 @@ PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=fa | |||
102 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | 100 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
103 | # JPEG image loading support | 101 | # JPEG image loading support |
104 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | 102 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
103 | # support libseat based launch | ||
104 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
105 | 105 | ||
106 | do_install:append() { | 106 | do_install:append() { |
107 | # Weston doesn't need the .la files to load modules, so wipe them | 107 | # Weston doesn't need the .la files to load modules, so wipe them |
@@ -158,14 +158,12 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork" | |||
158 | 158 | ||
159 | DEFAULT_PREFERENCE = "-1" | 159 | DEFAULT_PREFERENCE = "-1" |
160 | 160 | ||
161 | SRCBRANCH = "weston-imx-9.0" | 161 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" |
162 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 162 | SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " |
163 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | 163 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" |
164 | " | 164 | SRCBRANCH = "weston-imx-10.0" |
165 | SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ | 165 | SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d" |
166 | file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ | 166 | |
167 | " | ||
168 | SRCREV = "7859a762617682bd804e210ad3bda6bdcd3ea24a" | ||
169 | S = "${WORKDIR}/git" | 167 | S = "${WORKDIR}/git" |
170 | 168 | ||
171 | # Disable OpenGL for parts with GPU support for 2D but not 3D | 169 | # Disable OpenGL for parts with GPU support for 2D but not 3D |
@@ -177,18 +175,19 @@ PACKAGECONFIG_OPENGL:imxgpu2d = "" | |||
177 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" | 175 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" |
178 | 176 | ||
179 | PACKAGECONFIG:remove = "wayland x11" | 177 | PACKAGECONFIG:remove = "wayland x11" |
180 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | 178 | PACKAGECONFIG:append = " \ |
179 | rdp \ | ||
180 | ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | ||
181 | 181 | ||
182 | PACKAGECONFIG:remove:imxfbdev = "kms" | 182 | PACKAGECONFIG:remove:imxfbdev = "kms" |
183 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" | 183 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" |
184 | PACKAGECONFIG:append:imxgpu = " imxgpu" | 184 | PACKAGECONFIG:append:imxgpu = " imxgpu" |
185 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | 185 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" |
186 | 186 | ||
187 | # Clients support | 187 | SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" |
188 | SIMPLE_CLIENTS = "all" | 188 | |
189 | SIMPLE_CLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | 189 | # Override |
190 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | 190 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" |
191 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
192 | # Weston with i.MX GPU support | 191 | # Weston with i.MX GPU support |
193 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | 192 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" |
194 | # Weston with i.MX G2D renderer | 193 | # Weston with i.MX G2D renderer |
@@ -196,6 +195,11 @@ PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d | |||
196 | # Weston with OpenGL support | 195 | # Weston with OpenGL support |
197 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | 196 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" |
198 | 197 | ||
198 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | ||
199 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" | ||
200 | |||
201 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" | ||
202 | |||
199 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | 203 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" |
200 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" | 204 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" |
201 | 205 | ||