summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/meta-freescale/recipes-graphics/wayland/weston')
-rw-r--r--bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch33
-rw-r--r--bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch78
-rw-r--r--bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch129
-rw-r--r--bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini20
-rw-r--r--bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini24
5 files changed, 77 insertions, 207 deletions
diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch
deleted file mode 100644
index 6f676048..00000000
--- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001
-From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Mon, 29 Oct 2018 21:40:32 +0000
-Subject: [PATCH] g2d-renderer: Fix open function build break
-
-| from ../git/libweston/g2d-renderer.c:40:
-| In function 'open',
-| inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2:
-| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe- sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit h O_CREAT or O_TMPFILE in second argument needs 3 arguments
-| __open_missing_mode ();
-| ^~~~~~~~~~~~~~~~~~~~~~
-| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed
-
-Upstream-Status: Inappropriate [i.MX-specific]
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
----
- libweston/g2d-renderer.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: git/libweston/g2d-renderer.c
-===================================================================
---- git.orig/libweston/g2d-renderer.c
-+++ git/libweston/g2d-renderer.c
-@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compos
- path = malloc(strlen(dir) + 40);
- strcpy(path, dir);
- strcat(path, "/use-g2d-renderer");
-- close(open(path, O_CREAT | O_RDWR));
-+ close(open(path, O_CREAT | O_RDWR, 0600));
- free(path);
-
- return 0;
diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch
deleted file mode 100644
index 09ec1559..00000000
--- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 May 2015 20:56:00 -0700
-Subject: [PATCH] make error() portable
-
-error() is not posix but gnu extension so may not be available on all
-kind of systemsi e.g. musl.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- configure.ac | 2 ++
- libweston/weston-error.h | 20 ++++++++++++++++++++
- libweston/weston-launch.c | 2 +-
- 3 files changed, 23 insertions(+), 1 deletion(-)
- create mode 100644 libweston/weston-error.h
-
-diff --git a/configure.ac b/configure.ac
-index 7aebbdb..dc9c802 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
- [[#include <time.h>]])
- AC_CHECK_HEADERS([execinfo.h])
-
-+AC_CHECK_HEADERS([error.h])
-+
- AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
-
- # check for libdrm as a build-time dependency only
-diff --git a/libweston/weston-error.h b/libweston/weston-error.h
-new file mode 100644
-index 0000000..2089d02
---- /dev/null
-+++ b/libweston/weston-error.h
-@@ -0,0 +1,20 @@
-+#ifndef _WESTON_ERROR_H
-+#define _WESTON_ERROR_H
-+
-+#if defined(HAVE_ERROR_H)
-+#include <error.h>
-+#else
-+#include <err.h>
-+#include <string.h>
-+#define _weston_error(S, E, F, ...) do { \
-+ if (E) \
-+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
-+ else \
-+ err(S, F, ##__VA_ARGS__); \
-+} while(0)
-+
-+#define error _weston_error
-+#endif
-+
-+#endif
-+
-diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
-index 1adcf21..166bf3b 100644
---- a/libweston/weston-launch.c
-+++ b/libweston/weston-launch.c
-@@ -33,7 +33,6 @@
- #include <poll.h>
- #include <errno.h>
-
--#include <error.h>
- #include <getopt.h>
-
- #include <sys/types.h>
-@@ -59,6 +58,7 @@
- #endif
-
- #include "weston-launch.h"
-+#include "weston-error.h"
-
- #define DRM_MAJOR 226
-
diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index d648538b..62b864c1 100644
--- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,7 +1,8 @@
-From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001
+From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Feb 2017 15:53:30 +0200
-Subject: [PATCH] weston-launch: Provide a default version that doesn't require PAM
+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.
@@ -14,46 +15,49 @@ Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
- configure.ac | 9 +++++++--
- libweston/weston-launch.c | 20 ++++++++++++++++++++
- 2 files changed, 27 insertions(+), 2 deletions(-)
+ libweston/meson.build | 16 ++++++++++++----
+ libweston/weston-launch.c | 21 +++++++++++++++++++++
+ meson_options.txt | 7 +++++++
+ 3 files changed, 40 insertions(+), 4 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index dc9c802..48cf5cb 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization,
- AS_IF([test "x$enable_resize_optimization" = "xyes"],
- [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
-
-+AC_ARG_WITH(pam,
-+ AS_HELP_STRING([--with-pam], [Use PAM]),
-+ [use_pam=$withval], [use_pam=yes])
- AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
- AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes)
--if test x$enable_weston_launch = xyes; then
-+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
- WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
- if test x$have_pam = xno; then
-- AC_ERROR([weston-launch requires pam])
-+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
- fi
-+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
- fi
-
- AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -702,6 +706,7 @@ AC_MSG_RESULT([
- Enable developer documentation ${enable_devdocs}
-
- weston-launch utility ${enable_weston_launch}
-+ PAM support ${use_pam}
- systemd-login support ${have_systemd_login}
- systemd notify support ${enable_systemd_notify}
-
+diff --git a/libweston/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 166bf3b..6fb9232 100644
+index 8a711b4..54c567a 100644
--- a/libweston/weston-launch.c
+++ b/libweston/weston-launch.c
@@ -51,7 +51,9 @@
@@ -66,7 +70,7 @@ index 166bf3b..6fb9232 100644
#ifdef HAVE_SYSTEMD_LOGIN
#include <systemd/sd-login.h>
-@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd)
+@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd)
#endif
struct weston_launch {
@@ -77,7 +81,7 @@ index 166bf3b..6fb9232 100644
int tty;
int ttynr;
int sock[2];
-@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl)
+@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl)
return false;
}
@@ -85,7 +89,7 @@ index 166bf3b..6fb9232 100644
static int
pam_conversation_fn(int msg_count,
const struct pam_message **messages,
-@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl)
+@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl)
return 0;
}
@@ -93,7 +97,7 @@ index 166bf3b..6fb9232 100644
static int
setup_launcher_socket(struct weston_launch *wl)
-@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status)
+@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status)
close(wl->signalfd);
close(wl->sock[0]);
@@ -101,7 +105,7 @@ index 166bf3b..6fb9232 100644
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
-@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status)
+@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status)
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
@@ -109,7 +113,7 @@ index 166bf3b..6fb9232 100644
if (ioctl(wl->tty, KDSKBMUTE, 0) &&
ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
+@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
@@ -117,7 +121,7 @@ index 166bf3b..6fb9232 100644
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
-@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
+@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
}
free(env);
}
@@ -125,7 +129,7 @@ index 166bf3b..6fb9232 100644
/*
* We open a new session, so it makes sense
-@@ -683,8 +693,10 @@ static void
+@@ -745,8 +755,10 @@ static void
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -136,7 +140,7 @@ index 166bf3b..6fb9232 100644
fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
" e.g. -t /dev/tty4, requires -u option.\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
-@@ -698,7 +710,9 @@ main(int argc, char *argv[])
+@@ -760,7 +772,9 @@ main(int argc, char *argv[])
int i, c;
char *tty = NULL;
struct option opts[] = {
@@ -146,21 +150,24 @@ index 166bf3b..6fb9232 100644
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
-@@ -710,9 +724,13 @@ main(int argc, char *argv[])
+@@ -772,11 +786,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)
- error(1, 0, "Permission denied. -u allowed for root only");
+ if (getuid() != 0) {
+ fprintf(stderr, "weston: Permission denied. -u allowed for root only\n");
+ exit(EXIT_FAILURE);
+ }
+#else
-+ error(1, 0, "-u is unsupported in this weston-launch build");
++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n");
++ exit(EXIT_FAILURE);
+#endif
break;
case 't':
tty = optarg;
-@@ -753,8 +771,10 @@ main(int argc, char *argv[])
+@@ -828,8 +847,10 @@ main(int argc, char *argv[])
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
@@ -171,3 +178,21 @@ index 166bf3b..6fb9232 100644
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);
+diff --git a/meson_options.txt b/meson_options.txt
+index c862ecc..73ef2c3 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/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini
deleted file mode 100644
index d6ad40df..00000000
--- a/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[core]
-# i.MX: Disable idle timeout
-idle-time=0
-
-#[output]
-#name=HDMI-A-1
-#mode=1920x1080@60
-#transform=90
-
-#[output]
-#name=HDMI-A-2
-#mode=off
-# WIDTHxHEIGHT Resolution size width and height in pixels
-# off Disables the output
-# preferred Uses the preferred mode
-# current Uses the current crt controller mode
-#transform=90
-
-[screen-share]
-command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini
deleted file mode 100644
index d1597a42..00000000
--- a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-[core]
-# i.MX: Disable idle timeout
-idle-time=0
-gbm-format=argb8888
-
-#[output]
-#name=HDMI-A-1
-#mode=1920x1080@60
-#transform=90
-
-[shell]
-size=1920x1080
-
-#[output]
-#name=HDMI-A-2
-#mode=off
-# WIDTHxHEIGHT Resolution size width and height in pixels
-# off Disables the output
-# preferred Uses the preferred mode
-# current Uses the current crt controller mode
-#transform=90
-
-[screen-share]
-command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize