diff options
| -rw-r--r-- | recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | 27 | ||||
| -rw-r--r-- | recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch | 23 | ||||
| -rw-r--r-- | recipes-graphics/wayland/weston_9.0.0.imx.bb (renamed from recipes-graphics/wayland/weston_8.0.0.imx.bb) | 43 |
3 files changed, 70 insertions, 23 deletions
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 index 62b864c13..3279a728c 100644 --- 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 | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001 | 1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 |
| 2 | From: Tom Hochstein <tom.hochstein@nxp.com> | 2 | From: Tom Hochstein <tom.hochstein@nxp.com> |
| 3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | 3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 |
| 4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | 4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require |
| 5 | |||
| 5 | PAM | 6 | PAM |
| 6 | 7 | ||
| 7 | weston-launch requires PAM for starting weston as a non-root user. | 8 | weston-launch requires PAM for starting weston as a non-root user. |
| @@ -57,7 +58,7 @@ index 08d23ec..cb9fd3f 100644 | |||
| 57 | install: true | 58 | install: true |
| 58 | ) | 59 | ) |
| 59 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | 60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c |
| 60 | index 8a711b4..54c567a 100644 | 61 | index 521cb2c..2d42d33 100644 |
| 61 | --- a/libweston/weston-launch.c | 62 | --- a/libweston/weston-launch.c |
| 62 | +++ b/libweston/weston-launch.c | 63 | +++ b/libweston/weston-launch.c |
| 63 | @@ -51,7 +51,9 @@ | 64 | @@ -51,7 +51,9 @@ |
| @@ -97,7 +98,7 @@ index 8a711b4..54c567a 100644 | |||
| 97 | 98 | ||
| 98 | static int | 99 | static int |
| 99 | setup_launcher_socket(struct weston_launch *wl) | 100 | setup_launcher_socket(struct weston_launch *wl) |
| 100 | @@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) | 101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) |
| 101 | close(wl->signalfd); | 102 | close(wl->signalfd); |
| 102 | close(wl->sock[0]); | 103 | close(wl->sock[0]); |
| 103 | 104 | ||
| @@ -105,15 +106,15 @@ index 8a711b4..54c567a 100644 | |||
| 105 | if (wl->new_user) { | 106 | if (wl->new_user) { |
| 106 | err = pam_close_session(wl->ph, 0); | 107 | err = pam_close_session(wl->ph, 0); |
| 107 | if (err) | 108 | if (err) |
| 108 | @@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) | 109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) |
| 109 | err, pam_strerror(wl->ph, err)); | 110 | err, pam_strerror(wl->ph, err)); |
| 110 | pam_end(wl->ph, err); | 111 | pam_end(wl->ph, err); |
| 111 | } | 112 | } |
| 112 | +#endif | 113 | +#endif |
| 113 | 114 | ||
| 114 | if (ioctl(wl->tty, KDSKBMUTE, 0) && | 115 | /* |
| 115 | ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) | 116 | * Get a fresh handle to the tty as the previous one is in |
| 116 | @@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | 117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) |
| 117 | setenv("HOME", wl->pw->pw_dir, 1); | 118 | setenv("HOME", wl->pw->pw_dir, 1); |
| 118 | setenv("SHELL", wl->pw->pw_shell, 1); | 119 | setenv("SHELL", wl->pw->pw_shell, 1); |
| 119 | 120 | ||
| @@ -121,7 +122,7 @@ index 8a711b4..54c567a 100644 | |||
| 121 | env = pam_getenvlist(wl->ph); | 122 | env = pam_getenvlist(wl->ph); |
| 122 | if (env) { | 123 | if (env) { |
| 123 | for (i = 0; env[i]; ++i) { | 124 | for (i = 0; env[i]; ++i) { |
| 124 | @@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | 125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) |
| 125 | } | 126 | } |
| 126 | free(env); | 127 | free(env); |
| 127 | } | 128 | } |
| @@ -129,7 +130,7 @@ index 8a711b4..54c567a 100644 | |||
| 129 | 130 | ||
| 130 | /* | 131 | /* |
| 131 | * We open a new session, so it makes sense | 132 | * We open a new session, so it makes sense |
| 132 | @@ -745,8 +755,10 @@ static void | 133 | @@ -789,8 +799,10 @@ static void |
| 133 | help(const char *name) | 134 | help(const char *name) |
| 134 | { | 135 | { |
| 135 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | 136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); |
| @@ -140,7 +141,7 @@ index 8a711b4..54c567a 100644 | |||
| 140 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | 141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" |
| 141 | " e.g. -t /dev/tty4, requires -u option.\n"); | 142 | " e.g. -t /dev/tty4, requires -u option.\n"); |
| 142 | fprintf(stderr, " -v, --verbose Be verbose\n"); | 143 | fprintf(stderr, " -v, --verbose Be verbose\n"); |
| 143 | @@ -760,7 +772,9 @@ main(int argc, char *argv[]) | 144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) |
| 144 | int i, c; | 145 | int i, c; |
| 145 | char *tty = NULL; | 146 | char *tty = NULL; |
| 146 | struct option opts[] = { | 147 | struct option opts[] = { |
| @@ -150,7 +151,7 @@ index 8a711b4..54c567a 100644 | |||
| 150 | { "tty", required_argument, NULL, 't' }, | 151 | { "tty", required_argument, NULL, 't' }, |
| 151 | { "verbose", no_argument, NULL, 'v' }, | 152 | { "verbose", no_argument, NULL, 'v' }, |
| 152 | { "help", no_argument, NULL, 'h' }, | 153 | { "help", no_argument, NULL, 'h' }, |
| 153 | @@ -772,11 +786,16 @@ main(int argc, char *argv[]) | 154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) |
| 154 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | 155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { |
| 155 | switch (c) { | 156 | switch (c) { |
| 156 | case 'u': | 157 | case 'u': |
| @@ -167,7 +168,7 @@ index 8a711b4..54c567a 100644 | |||
| 167 | break; | 168 | break; |
| 168 | case 't': | 169 | case 't': |
| 169 | tty = optarg; | 170 | tty = optarg; |
| 170 | @@ -828,8 +847,10 @@ main(int argc, char *argv[]) | 171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) |
| 171 | if (setup_tty(&wl, tty) < 0) | 172 | if (setup_tty(&wl, tty) < 0) |
| 172 | exit(EXIT_FAILURE); | 173 | exit(EXIT_FAILURE); |
| 173 | 174 | ||
| @@ -179,7 +180,7 @@ index 8a711b4..54c567a 100644 | |||
| 179 | if (setup_launcher_socket(&wl) < 0) | 180 | if (setup_launcher_socket(&wl) < 0) |
| 180 | exit(EXIT_FAILURE); | 181 | exit(EXIT_FAILURE); |
| 181 | diff --git a/meson_options.txt b/meson_options.txt | 182 | diff --git a/meson_options.txt b/meson_options.txt |
| 182 | index c862ecc..73ef2c3 100644 | 183 | index 239bd2d..99e4ec3 100644 |
| 183 | --- a/meson_options.txt | 184 | --- a/meson_options.txt |
| 184 | +++ b/meson_options.txt | 185 | +++ b/meson_options.txt |
| 185 | @@ -73,6 +73,13 @@ option( | 186 | @@ -73,6 +73,13 @@ option( |
diff --git a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 000000000..a4444e5d1 --- /dev/null +++ b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | Fix atomic modesetting with musl | ||
| 2 | |||
| 3 | atomic modesetting seems to fail with drm weston backend and this patch fixes | ||
| 4 | it, below errors are seen before weston exits | ||
| 5 | |||
| 6 | atomic: couldn't commit new state: Invalid argument | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | |||
| 11 | --- a/libweston/backend-drm/kms.c | ||
| 12 | +++ b/libweston/backend-drm/kms.c | ||
| 13 | @@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr | ||
| 14 | wl_list_for_each(plane, &b->plane_list, link) { | ||
| 15 | drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", | ||
| 16 | (unsigned long) plane->plane_id); | ||
| 17 | - plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
| 18 | - plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
| 19 | + //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
| 20 | + //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
| 21 | } | ||
| 22 | |||
| 23 | flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; | ||
diff --git a/recipes-graphics/wayland/weston_8.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb index ba2e9f939..825a1b1c3 100644 --- a/recipes-graphics/wayland/weston_8.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb | |||
| @@ -3,7 +3,7 @@ | |||
| 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: 9b1d30810eeecb46b977c8eed68be69aef891312 | 6 | # Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0 |
| 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" |
| @@ -17,19 +17,25 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | |||
| 17 | file://weston.desktop \ | 17 | file://weston.desktop \ |
| 18 | file://xwayland.weston-start \ | 18 | file://xwayland.weston-start \ |
| 19 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 19 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ |
| 20 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
| 20 | " | 21 | " |
| 21 | SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" | 22 | |
| 22 | SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" | 23 | SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " |
| 24 | |||
| 25 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | ||
| 23 | 26 | ||
| 24 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 27 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
| 25 | 28 | ||
| 26 | inherit meson pkgconfig useradd features_check | 29 | inherit meson pkgconfig useradd features_check |
| 27 | # depends on virtual/egl | 30 | # depends on virtual/egl |
| 28 | REQUIRED_DISTRO_FEATURES = "opengl" | 31 | # weston-init requires pam enabled if started via systemd |
| 32 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
| 29 | 33 | ||
| 30 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" | 34 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
| 31 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | 35 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
| 32 | 36 | ||
| 37 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
| 38 | |||
| 33 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 39 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
| 34 | 40 | ||
| 35 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" | 41 | EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" |
| @@ -38,7 +44,13 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev | |||
| 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 44 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
| 39 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 45 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ |
| 40 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | 46 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
| 41 | launch" | 47 | launch \ |
| 48 | image-jpeg \ | ||
| 49 | screenshare \ | ||
| 50 | shell-desktop \ | ||
| 51 | shell-fullscreen \ | ||
| 52 | shell-ivi" | ||
| 53 | |||
| 42 | # | 54 | # |
| 43 | # Compositor choices | 55 | # Compositor choices |
| 44 | # | 56 | # |
| @@ -65,15 +77,25 @@ PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | |||
| 65 | # Weston with systemd-login support | 77 | # Weston with systemd-login support |
| 66 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | 78 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" |
| 67 | # Weston with Xwayland support (requires X11 and Wayland) | 79 | # Weston with Xwayland support (requires X11 and Wayland) |
| 68 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | 80 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" |
| 69 | # colord CMS support | 81 | # colord CMS support |
| 70 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | 82 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
| 71 | # Clients support | 83 | # Clients support |
| 72 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 84 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 73 | # Virtual remote output with GStreamer on DRM backend | 85 | # Virtual remote output with GStreamer on DRM backend |
| 74 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" | 86 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0" |
| 75 | # Weston with PAM support | 87 | # Weston with PAM support |
| 76 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | 88 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" |
| 89 | # Weston with screen-share support | ||
| 90 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
| 91 | # Traditional desktop shell | ||
| 92 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
| 93 | # Fullscreen shell | ||
| 94 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
| 95 | # In-Vehicle Infotainment (IVI) shell | ||
| 96 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
| 97 | # JPEG image loading support | ||
| 98 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
| 77 | 99 | ||
| 78 | do_install_append() { | 100 | do_install_append() { |
| 79 | # Weston doesn't need the .la files to load modules, so wipe them | 101 | # Weston doesn't need the .la files to load modules, so wipe them |
| @@ -126,14 +148,14 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork" | |||
| 126 | 148 | ||
| 127 | DEFAULT_PREFERENCE = "-1" | 149 | DEFAULT_PREFERENCE = "-1" |
| 128 | 150 | ||
| 129 | SRCBRANCH = "weston-imx-8.0" | 151 | SRCBRANCH = "weston-imx-9.0" |
| 130 | SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ | 152 | SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ |
| 131 | file://weston.png \ | 153 | file://weston.png \ |
| 132 | file://weston.desktop \ | 154 | file://weston.desktop \ |
| 133 | file://xwayland.weston-start \ | 155 | file://xwayland.weston-start \ |
| 134 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 156 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ |
| 135 | " | 157 | " |
| 136 | SRCREV = "f13d40a3a0504a00baf2f28abe83b65dab8b2e10" | 158 | SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567" |
| 137 | S = "${WORKDIR}/git" | 159 | S = "${WORKDIR}/git" |
| 138 | 160 | ||
| 139 | # Disable OpenGL for parts with GPU support for 2D but not 3D | 161 | # Disable OpenGL for parts with GPU support for 2D but not 3D |
| @@ -155,6 +177,7 @@ PACKAGECONFIG_append_imxgpu2d = " imxg2d" | |||
| 155 | # Clients support | 177 | # Clients support |
| 156 | SIMPLE_CLIENTS = "all" | 178 | SIMPLE_CLIENTS = "all" |
| 157 | SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | 179 | SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" |
| 180 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | ||
| 158 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 181 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
| 159 | # Weston with i.MX GPU support | 182 | # Weston with i.MX GPU support |
| 160 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | 183 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" |
