zeus migration: weston: update recipe to v8.0.0
https://jira.digi.com/browse/DEL-7013 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
af5d129da0
commit
9d649e3290
|
|
@ -1,31 +1,36 @@
|
|||
# Copyright (C) 2019 Digi International.
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
# OpenGL is not required for parts with GPU support for 2D but not 3D
|
||||
IMX_REQUIRED_DISTRO_FEATURES_REMOVE = ""
|
||||
IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl"
|
||||
IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = ""
|
||||
REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}"
|
||||
SRC_URI += " \
|
||||
file://digi_background.png \
|
||||
file://profile \
|
||||
"
|
||||
|
||||
SRC_URI_append_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}"
|
||||
SRC_URI_append_mx8dx = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' file://weston.config', '', d)}"
|
||||
|
||||
HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"
|
||||
|
||||
do_install_append() {
|
||||
if ${HAS_SYSTEMD}; then
|
||||
sed -i \
|
||||
-e 's,/usr/bin,${bindir},g' \
|
||||
-e 's,/etc,${sysconfdir},g' \
|
||||
-e 's,/var,${localstatedir},g' \
|
||||
${D}${systemd_system_unitdir}/weston.service
|
||||
fi
|
||||
if [ -f ${WORKDIR}/weston.config ]; then
|
||||
install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
|
||||
fi
|
||||
}
|
||||
|
||||
# Add profile support not accepted by upstream
|
||||
SRC_URI += "file://profile"
|
||||
# To customize weston.ini, start by setting the desired assignment in weston.ini,
|
||||
# commented out. For example:
|
||||
# #xwayland=true
|
||||
# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS.
|
||||
INI_UNCOMMENT_ASSIGNMENTS_append_mx8mp = " \
|
||||
use-g2d=1 \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
install -Dm0755 ${WORKDIR}/profile ${D}${sysconfdir}/profile.d/weston.sh
|
||||
|
||||
# Add custom background image
|
||||
install -d ${D}${datadir}/weston
|
||||
install ${WORKDIR}/digi_background.png ${D}${datadir}/weston
|
||||
|
||||
# Customize weston ini file
|
||||
cat <<EOF >>${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
[shell]
|
||||
background-image=/usr/share/weston/digi_background.png
|
||||
background-type=scale-crop
|
||||
EOF
|
||||
}
|
||||
|
||||
FILES_${PN} += "${datadir}/weston/digi_background.png"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
|
@ -1,51 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: weston
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
### END INIT INFO
|
||||
|
||||
if test -e /etc/default/weston ; then
|
||||
. /etc/default/weston
|
||||
fi
|
||||
|
||||
killproc() {
|
||||
pid=`/bin/pidof $1`
|
||||
[ "$pid" != "" ] && kill $pid
|
||||
}
|
||||
|
||||
read CMDLINE < /proc/cmdline
|
||||
for x in $CMDLINE; do
|
||||
case $x in
|
||||
weston=false)
|
||||
echo "Weston disabled"
|
||||
exit 0;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
weston-start -- $OPTARGS
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping Weston"
|
||||
killproc weston
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "usage: $0 { start | stop | restart }"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
FB_MULTI_BUFFER=1
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
GBM_SET_FORMAT_MOD_LINEAR=1
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
#!/bin/sh
|
||||
if test -z "$XDG_RUNTIME_DIR"; then
|
||||
export XDG_RUNTIME_DIR=/run/user/`id -u`
|
||||
if ! test -d "${XDG_RUNTIME_DIR}"; then
|
||||
mkdir --parents "${XDG_RUNTIME_DIR}"
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
fi
|
||||
export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}`
|
||||
if ! test -d "$XDG_RUNTIME_DIR"; then
|
||||
mkdir --parents $XDG_RUNTIME_DIR
|
||||
chmod 0700 $XDG_RUNTIME_DIR
|
||||
fi
|
||||
if [ -n "$WESTON_USER" ]
|
||||
then
|
||||
chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2016 O.S. Systems Software LTDA.
|
||||
# Copyright 2016 Freescale Semiconductor
|
||||
|
||||
if [ "$USER" = "" ]; then
|
||||
export USER=`id -un`
|
||||
fi
|
||||
if [ "$HOME" = "/" ]; then
|
||||
export HOME=/home/$USER
|
||||
fi
|
||||
cd
|
||||
. /etc/profile
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
$0 [<openvt arguments>] [-- <weston options>]
|
||||
EOF
|
||||
}
|
||||
|
||||
## Module support
|
||||
modules_dir=@DATADIR@/weston-start
|
||||
|
||||
# Add weston extra argument
|
||||
add_weston_argument() {
|
||||
weston_args="$weston_args $1"
|
||||
}
|
||||
|
||||
# Add openvt extra argument
|
||||
add_openvt_argument() {
|
||||
openvt_args="$openvt_args $1"
|
||||
}
|
||||
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "$DISPLAY" ]; then
|
||||
launcher="weston"
|
||||
else
|
||||
launcher="weston-launch --"
|
||||
fi
|
||||
|
||||
openvt_args="-s"
|
||||
while [ -n "$1" ]; do
|
||||
if [ "$1" = "--" ]; then
|
||||
shift
|
||||
break
|
||||
fi
|
||||
openvt_args="$openvt_args $1"
|
||||
shift
|
||||
done
|
||||
|
||||
weston_args=$*
|
||||
|
||||
# Load and run modules
|
||||
if [ -d "$modules_dir" ]; then
|
||||
for m in "$modules_dir"/*; do
|
||||
# Skip backup files
|
||||
if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# process module
|
||||
. $m
|
||||
done
|
||||
fi
|
||||
|
||||
exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
[core]
|
||||
#gbm-format=argb8888
|
||||
idle-time=0
|
||||
#use-g2d=1
|
||||
#xwayland=true
|
||||
#enable-overlay-view=1
|
||||
|
||||
#[shell]
|
||||
#size=1920x1080
|
||||
|
||||
[libinput]
|
||||
touchscreen_calibrator=true
|
||||
|
||||
#[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=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
[Unit]
|
||||
Description=Weston Wayland Compositor (on tty7)
|
||||
RequiresMountsFor=/run
|
||||
Conflicts=getty@tty7.service plymouth-quit.service
|
||||
After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
PermissionsStartOnly=true
|
||||
|
||||
# Log us in via PAM so we get our XDG & co. environment and
|
||||
# are treated as logged in so we can use the tty:
|
||||
PAMName=login
|
||||
|
||||
# Grab tty7
|
||||
UtmpIdentifier=tty7
|
||||
TTYPath=/dev/tty7
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
TTYVTDisallocate=yes
|
||||
|
||||
# stderr to journal so our logging doesn't get thrown into /dev/null
|
||||
StandardOutput=tty
|
||||
StandardInput=tty
|
||||
StandardError=journal
|
||||
|
||||
EnvironmentFile=-/etc/default/weston
|
||||
|
||||
# Weston does not successfully change VT, nor does systemd place us on
|
||||
# the VT it just activated for us. Switch manually:
|
||||
ExecStartPre=/usr/bin/chvt 7
|
||||
ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS
|
||||
|
||||
IgnoreSIGPIPE=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
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.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Submitted
|
||||
|
||||
---
|
||||
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 9d98e84bcf9e..8f6b80d932a7 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 000000000000..2089d02c2892
|
||||
--- /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 bf73e0d616a0..90644394309f 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
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
From 682b7d79a7b81ec8e38760381104b24ad549e8c0 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
|
||||
|
|
@ -13,48 +14,51 @@ 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 8f6b80d932a7..603fcb3ee5ab 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -494,13 +494,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])])
|
||||
Index: git/libweston/meson.build
|
||||
===================================================================
|
||||
--- git.orig/libweston/meson.build
|
||||
+++ git/libweston/meson.build
|
||||
@@ -224,16 +224,24 @@ dep_vertex_clipping = declare_dependency
|
||||
)
|
||||
|
||||
+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
|
||||
if get_option('weston-launch')
|
||||
- dep_pam = cc.find_library('pam')
|
||||
+ deps_weston_launch = [systemd_dep, dep_libdrm]
|
||||
|
||||
AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
|
||||
@@ -748,6 +752,7 @@ AC_MSG_RESULT([
|
||||
Enable developer documentation ${enable_devdocs}
|
||||
- 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
|
||||
|
||||
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/weston-launch.c b/libweston/weston-launch.c
|
||||
index 90644394309f..c6abe92877d5 100644
|
||||
--- a/libweston/weston-launch.c
|
||||
+++ b/libweston/weston-launch.c
|
||||
executable(
|
||||
'weston-launch',
|
||||
'weston-launch.c',
|
||||
- dependencies: [dep_pam, systemd_dep, dep_libdrm],
|
||||
+ dependencies: deps_weston_launch,
|
||||
include_directories: common_inc,
|
||||
install: true
|
||||
)
|
||||
Index: git/libweston/weston-launch.c
|
||||
===================================================================
|
||||
--- git.orig/libweston/weston-launch.c
|
||||
+++ git/libweston/weston-launch.c
|
||||
@@ -51,7 +51,9 @@
|
||||
|
||||
#include <pwd.h>
|
||||
|
|
@ -65,7 +69,7 @@ index 90644394309f..c6abe92877d5 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 {
|
||||
|
|
@ -76,7 +80,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
int tty;
|
||||
int ttynr;
|
||||
int sock[2];
|
||||
@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl)
|
||||
@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_laun
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +88,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
static int
|
||||
pam_conversation_fn(int msg_count,
|
||||
const struct pam_message **messages,
|
||||
@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl)
|
||||
@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -92,7 +96,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
|
||||
static int
|
||||
setup_launcher_socket(struct weston_launch *wl)
|
||||
@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status)
|
||||
@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int statu
|
||||
close(wl->signalfd);
|
||||
close(wl->sock[0]);
|
||||
|
||||
|
|
@ -100,7 +104,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
if (wl->new_user) {
|
||||
err = pam_close_session(wl->ph, 0);
|
||||
if (err)
|
||||
@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status)
|
||||
@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int statu
|
||||
err, pam_strerror(wl->ph, err));
|
||||
pam_end(wl->ph, err);
|
||||
}
|
||||
|
|
@ -108,7 +112,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
|
||||
if (ioctl(wl->tty, KDSKBMUTE, 0) &&
|
||||
ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
|
||||
@@ -610,6 +618,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
|
||||
@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl,
|
||||
setenv("HOME", wl->pw->pw_dir, 1);
|
||||
setenv("SHELL", wl->pw->pw_shell, 1);
|
||||
|
||||
|
|
@ -116,7 +120,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
env = pam_getenvlist(wl->ph);
|
||||
if (env) {
|
||||
for (i = 0; env[i]; ++i) {
|
||||
@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
|
||||
@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl,
|
||||
}
|
||||
free(env);
|
||||
}
|
||||
|
|
@ -124,7 +128,7 @@ index 90644394309f..c6abe92877d5 100644
|
|||
|
||||
/*
|
||||
* We open a new session, so it makes sense
|
||||
@@ -685,8 +695,10 @@ static void
|
||||
@@ -745,8 +755,10 @@ static void
|
||||
help(const char *name)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
|
||||
|
|
@ -135,7 +139,7 @@ index 90644394309f..c6abe92877d5 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");
|
||||
@@ -700,7 +712,9 @@ main(int argc, char *argv[])
|
||||
@@ -760,7 +772,9 @@ main(int argc, char *argv[])
|
||||
int i, c;
|
||||
char *tty = NULL;
|
||||
struct option opts[] = {
|
||||
|
|
@ -145,21 +149,24 @@ index 90644394309f..c6abe92877d5 100644
|
|||
{ "tty", required_argument, NULL, 't' },
|
||||
{ "verbose", no_argument, NULL, 'v' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
@@ -712,9 +726,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;
|
||||
@@ -755,8 +773,10 @@ main(int argc, char *argv[])
|
||||
@@ -828,8 +847,10 @@ main(int argc, char *argv[])
|
||||
if (setup_tty(&wl, tty) < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
|
|
@ -170,3 +177,21 @@ index 90644394309f..c6abe92877d5 100644
|
|||
|
||||
if (setup_launcher_socket(&wl) < 0)
|
||||
exit(EXIT_FAILURE);
|
||||
Index: git/meson_options.txt
|
||||
===================================================================
|
||||
--- git.orig/meson_options.txt
|
||||
+++ git/meson_options.txt
|
||||
@@ -101,6 +101,13 @@ option(
|
||||
)
|
||||
|
||||
option(
|
||||
+ 'pam',
|
||||
+ type: 'boolean',
|
||||
+ value: true,
|
||||
+ description: 'Define if PAM is available'
|
||||
+)
|
||||
+
|
||||
+option(
|
||||
'xwayland',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
From: Jun Zhu <junzhu@nxp.com>
|
||||
Date: Sun, 30 Sep 2018 15:31:26 +0800
|
||||
Subject: [PATCH] weston-touch-calibrator: Advertise the touchscreen calibrator
|
||||
interface to all clients. [YOCIMX-2963]
|
||||
|
||||
Set touchscreen_calibrator to true in the section "libinput" of the configure file
|
||||
/etc/xdg/weston/weston.ini.
|
||||
Otherwise, it will report that the new-added interface "weston-touch-calibration" cannot be found.
|
||||
|
||||
Signed-off-by: Jun Zhu <junzhu@nxp.com>
|
||||
|
||||
---
|
||||
weston.ini.in | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/weston.ini.in b/weston.ini.in
|
||||
index d9094b1f58f5..8adcc646a30b 100644
|
||||
--- a/weston.ini.in
|
||||
+++ b/weston.ini.in
|
||||
@@ -7,6 +7,9 @@ idle-time=0
|
||||
#[shell]
|
||||
#size=1920x1080
|
||||
|
||||
+[libinput]
|
||||
+touchscreen_calibrator=true
|
||||
+
|
||||
#[output]
|
||||
#name=HDMI-A-1
|
||||
#mode=1920x1080@60
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# Copyright (C) 2019 Digi International.
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI += " \
|
||||
file://digi_background.png \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
# Add custom background image
|
||||
install -d ${D}${datadir}/weston
|
||||
install ${WORKDIR}/digi_background.png ${D}${datadir}/weston
|
||||
|
||||
# Customize weston ini file
|
||||
cat <<EOF >>${D}${sysconfdir}/xdg/weston/weston.ini
|
||||
|
||||
[shell]
|
||||
background-image=/usr/share/weston/digi_background.png
|
||||
background-type=scale-crop
|
||||
EOF
|
||||
}
|
||||
|
||||
FILES_${PN} += "${datadir}/weston/digi_background.png"
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
SUMMARY = "Weston, a Wayland compositor, i.MX fork"
|
||||
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=26;md5=f47553ae598090444273db00adfb5b66"
|
||||
|
||||
#DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https"
|
||||
SRCBRANCH = "weston-imx-5.0"
|
||||
SRC_URI = "${WESTON_SRC};branch=${SRCBRANCH} \
|
||||
file://weston.png \
|
||||
file://weston.desktop \
|
||||
file://0001-make-error-portable.patch \
|
||||
file://xwayland.weston-start \
|
||||
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
|
||||
file://0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch \
|
||||
"
|
||||
SRCREV = "73a26456e43b6d4f72f0a995d437590065cafb15"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
|
||||
|
||||
inherit autotools pkgconfig useradd distro_features_check
|
||||
# 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"
|
||||
|
||||
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
|
||||
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
|
||||
|
||||
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
|
||||
|
||||
|
||||
EXTRA_OECONF = "--enable-setuid-install \
|
||||
--disable-rdp-compositor \
|
||||
"
|
||||
EXTRA_OECONF_append_qemux86 = "\
|
||||
WESTON_NATIVE_BACKEND=fbdev-backend.so \
|
||||
"
|
||||
EXTRA_OECONF_append_qemux86-64 = "\
|
||||
WESTON_NATIVE_BACKEND=fbdev-backend.so \
|
||||
"
|
||||
EXTRA_OECONF_append_mx6 = "\
|
||||
WESTON_NATIVE_BACKEND=fbdev-backend.so \
|
||||
"
|
||||
EXTRA_OECONF_append_mx7 = "\
|
||||
WESTON_NATIVE_BACKEND=fbdev-backend.so \
|
||||
"
|
||||
|
||||
IMX_EXTRA_OECONF_OPENGL = ""
|
||||
IMX_EXTRA_OECONF_OPENGL_imxgpu2d = " --disable-opengl"
|
||||
IMX_EXTRA_OECONF_OPENGL_imxgpu3d = ""
|
||||
EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_OPENGL}"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'opengl pam systemd x11', d)} \
|
||||
clients launch"
|
||||
# drm is not supported on mx6/mx7
|
||||
PACKAGECONFIG_remove_mx6 = "kms"
|
||||
PACKAGECONFIG_remove_mx7 = "kms"
|
||||
PACKAGECONFIG_append_imxgpu = " imxgpu"
|
||||
PACKAGECONFIG_append_imxgpu2d = " imxg2d"
|
||||
PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2"
|
||||
#
|
||||
# Compositor choices
|
||||
#
|
||||
# Weston on KMS
|
||||
PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
|
||||
# Weston on Wayland (nested Weston)
|
||||
PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
|
||||
# Weston on X11
|
||||
PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
|
||||
# Headless Weston
|
||||
PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
|
||||
# Weston on framebuffer
|
||||
PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
|
||||
# weston-launch
|
||||
PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
|
||||
# VA-API desktop recorder
|
||||
PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
|
||||
# Weston with EGL support
|
||||
PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
|
||||
# Weston with cairo glesv2 support
|
||||
PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
|
||||
# Weston with lcms support
|
||||
PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
|
||||
# Weston with webp support
|
||||
PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
|
||||
# Weston with systemd-login support
|
||||
PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
|
||||
# Weston with Xwayland support (requires X11 and Wayland)
|
||||
PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
|
||||
# colord CMS support
|
||||
PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
|
||||
# Clients support
|
||||
PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
|
||||
# Weston with PAM support
|
||||
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
|
||||
# Weston with i.MX G2D renderer
|
||||
PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d"
|
||||
# Weston with OpenGL support
|
||||
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl"
|
||||
# Weston with imxgpu hardware
|
||||
PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu"
|
||||
|
||||
SOCNAME = "none"
|
||||
SOCNAME_mx8mq = "8mq"
|
||||
SOCNAME_mx8mm = "8mm"
|
||||
|
||||
uncomment() {
|
||||
if ! (grep "^#$1" $2); then
|
||||
bbfatal "Commented setting '#$1' not found in file $PWD/$2"
|
||||
fi
|
||||
sed -i -e 's,^#'"$1"','"$1"',g' $2
|
||||
}
|
||||
|
||||
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.filter('BBFILE_COLLECTIONS', 'ivi', d)}" ]; then
|
||||
WESTON_INI_SRC=${B}/ivi-shell/weston.ini
|
||||
else
|
||||
WESTON_INI_SRC=${B}/weston.ini
|
||||
fi
|
||||
WESTON_INI_DEST_DIR=${D}${sysconfdir}/xdg/weston
|
||||
if [ -z "${@bb.utils.filter('BBFILE_COLLECTIONS', 'aglprofilegraphical', d)}" ]; then
|
||||
install -d ${WESTON_INI_DEST_DIR}
|
||||
install -m 0644 ${WESTON_INI_SRC} ${WESTON_INI_DEST_DIR}
|
||||
cd ${WESTON_INI_DEST_DIR}
|
||||
case ${SOCNAME} in
|
||||
8mq)
|
||||
uncomment "gbm-format=argb8888" weston.ini
|
||||
uncomment "\\[shell\\]" weston.ini
|
||||
uncomment "size=1920x1080" weston.ini
|
||||
;;
|
||||
8mm)
|
||||
uncomment "use-g2d=1" weston.ini
|
||||
;;
|
||||
esac
|
||||
if "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'true', 'false', d)}"; then
|
||||
uncomment "xwayland=true" weston.ini
|
||||
fi
|
||||
cd -
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
|
||||
libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
|
||||
|
||||
FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
|
||||
FILES_${PN} += "${sysconfdir}/xdg/weston"
|
||||
|
||||
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 += "xserver-xorg-xwayland"
|
||||
|
||||
RDEPENDS_${PN} += "xkeyboard-config"
|
||||
RRECOMMENDS_${PN} = "liberation-fonts"
|
||||
RRECOMMENDS_${PN}-dev += "wayland-protocols"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM_${PN} = "--system weston-launch"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
require recipes-graphics/wayland/weston_7.0.0.bb
|
||||
|
||||
SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
|
||||
WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https"
|
||||
SRC_URI_prepend = "${WESTON_SRC};branch=weston-imx-8.0 "
|
||||
SRCREV = "f6a7d35650121fbe7c20d4cbe0eaac730fab3b2a"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# Disable OpenGL for parts with GPU support for 2D but not 3D
|
||||
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_imxgpu = " imxgpu"
|
||||
PACKAGECONFIG_append_imxgpu2d = " g2d"
|
||||
#PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2"
|
||||
|
||||
# Weston with Xwayland support (requires X11 and Wayland)
|
||||
PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
|
||||
# Clients support
|
||||
SIMPLE_CLIENTS = "all"
|
||||
SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l"
|
||||
PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
|
||||
# Weston with cairo glesv2 support
|
||||
#PACKAGECONFIG[cairo-glesv2] = "-Dcairo-glesv2=true,-Dcairo=image"
|
||||
# Weston with i.MX GPU support
|
||||
PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false"
|
||||
# Weston with i.MX G2D renderer
|
||||
PACKAGECONFIG[g2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
|
||||
# Weston with OpenGL support
|
||||
PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false"
|
||||
|
||||
FILES_${PN} += "${libdir}/${BPN}/lib*${SOLIBS}"
|
||||
FILES_${PN}-dbg += "${libdir}/${BPN}/libexec_weston${SOLIBSDEV}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
|
||||
COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)"
|
||||
Loading…
Reference in New Issue