* [PATCH v3 1/5] core-image-weston: Add XWayland option to the image
@ 2016-01-21 22:47 Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 2/5] packagegroup-core-x11-xserver: Add xserver-xorg-xwayland for XWayland image Tom Hochstein
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tom Hochstein @ 2016-01-21 22:47 UTC (permalink / raw)
To: openembedded-core
Allow the user to add XWayland to the image via the xwayland
distro feature.
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
meta/recipes-graphics/images/core-image-weston.bb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/images/core-image-weston.bb b/meta/recipes-graphics/images/core-image-weston.bb
index 52e271d..6dd49e7 100644
--- a/meta/recipes-graphics/images/core-image-weston.bb
+++ b/meta/recipes-graphics/images/core-image-weston.bb
@@ -8,4 +8,6 @@ inherit core-image distro_features_check
REQUIRED_DISTRO_FEATURES = "wayland"
-CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples"
+CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xwayland', 'packagegroup-core-x11-xserver xterm', '', d)} \
+ "
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/5] packagegroup-core-x11-xserver: Add xserver-xorg-xwayland for XWayland image
2016-01-21 22:47 [PATCH v3 1/5] core-image-weston: Add XWayland option to the image Tom Hochstein
@ 2016-01-21 22:47 ` Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 3/5] weston: Include weston-launch if Wayland is configured Tom Hochstein
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Tom Hochstein @ 2016-01-21 22:47 UTC (permalink / raw)
To: openembedded-core
The package xserver-xorg-xwayland is required for XWayland support.
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
.../packagegroups/packagegroup-core-x11-xserver.bb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index c53f1b7..56c28f9 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -12,7 +12,12 @@ inherit packagegroup distro_features_check
# rdepends on XSERVER
REQUIRED_DISTRO_FEATURES = "x11"
-XSERVER ?= "xserver-xorg xf86-video-fbdev xf86-input-evdev"
+XSERVER ?= " \
+ xserver-xorg \
+ ${@base_contains('DISTRO_FEATURES', 'xwayland', 'xserver-xorg-xwayland', '', d)} \
+ xf86-video-fbdev \
+ xf86-input-evdev \
+ "
XSERVERCODECS ?= ""
RDEPENDS_${PN} = "\
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 3/5] weston: Include weston-launch if Wayland is configured
2016-01-21 22:47 [PATCH v3 1/5] core-image-weston: Add XWayland option to the image Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 2/5] packagegroup-core-x11-xserver: Add xserver-xorg-xwayland for XWayland image Tom Hochstein
@ 2016-01-21 22:47 ` Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 4/5] weston: xwayland distro feature requires x11 and wayland Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 5/5] weston-init: Handle Weston startup correctly Tom Hochstein
3 siblings, 0 replies; 5+ messages in thread
From: Tom Hochstein @ 2016-01-21 22:47 UTC (permalink / raw)
To: openembedded-core
When weston is started as the first windowing system (i.e. not under X
nor under another Wayland server), it should be done with the command
weston-launch to set up proper privileged access to devices.
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
meta/recipes-graphics/wayland/weston_1.8.0.bb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-graphics/wayland/weston_1.8.0.bb b/meta/recipes-graphics/wayland/weston_1.8.0.bb
index aff9a12..fa6092b 100644
--- a/meta/recipes-graphics/wayland/weston_1.8.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.8.0.bb
@@ -20,7 +20,9 @@ SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada
inherit autotools pkgconfig useradd distro_features_check
# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES = "opengl \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'pam', '', d)} \
+ "
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
DEPENDS += "wayland libinput virtual/egl pango"
@@ -39,9 +41,8 @@ EXTRA_OECONF_append_qemux86 = "\
EXTRA_OECONF_append_qemux86-64 = "\
WESTON_NATIVE_BACKEND=fbdev-backend.so \
"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl launch', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
"
#
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 4/5] weston: xwayland distro feature requires x11 and wayland
2016-01-21 22:47 [PATCH v3 1/5] core-image-weston: Add XWayland option to the image Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 2/5] packagegroup-core-x11-xserver: Add xserver-xorg-xwayland for XWayland image Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 3/5] weston: Include weston-launch if Wayland is configured Tom Hochstein
@ 2016-01-21 22:47 ` Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 5/5] weston-init: Handle Weston startup correctly Tom Hochstein
3 siblings, 0 replies; 5+ messages in thread
From: Tom Hochstein @ 2016-01-21 22:47 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
meta/recipes-graphics/wayland/weston_1.8.0.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-graphics/wayland/weston_1.8.0.bb b/meta/recipes-graphics/wayland/weston_1.8.0.bb
index fa6092b..d47105d 100644
--- a/meta/recipes-graphics/wayland/weston_1.8.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.8.0.bb
@@ -22,6 +22,7 @@ inherit autotools pkgconfig useradd distro_features_check
# depends on virtual/egl
REQUIRED_DISTRO_FEATURES = "opengl \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xwayland', 'x11 wayland', '', d)} \
"
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 5/5] weston-init: Handle Weston startup correctly
2016-01-21 22:47 [PATCH v3 1/5] core-image-weston: Add XWayland option to the image Tom Hochstein
` (2 preceding siblings ...)
2016-01-21 22:47 ` [PATCH v3 4/5] weston: xwayland distro feature requires x11 and wayland Tom Hochstein
@ 2016-01-21 22:47 ` Tom Hochstein
3 siblings, 0 replies; 5+ messages in thread
From: Tom Hochstein @ 2016-01-21 22:47 UTC (permalink / raw)
To: openembedded-core
Weston is started in different ways depending on the image
configuration and the runtime scenario. Refer to the weston man
page for more information.
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
meta/recipes-graphics/wayland/weston-init.bb | 10 +++++++++-
meta/recipes-graphics/wayland/weston-init/init | 2 +-
.../wayland/weston-init/weston-start | 22 ++++++++++++++++++++++
.../wayland/weston-init/weston.service | 4 ++--
4 files changed, 34 insertions(+), 4 deletions(-)
create mode 100644 meta/recipes-graphics/wayland/weston-init/weston-start
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 653541e..7b5481a 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -3,7 +3,9 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
SRC_URI = "file://init \
- file://weston.service"
+ file://weston.service \
+ file://weston-start \
+ "
S = "${WORKDIR}"
@@ -13,6 +15,12 @@ do_install() {
install -d ${D}${systemd_system_unitdir}
install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
+
+ install -d ${D}${bindir}
+ install -m755 ${WORKDIR}/weston-start ${D}${bindir}
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xwayland', 'xwayland', '', d)}" = "xwayland" ]; then
+ sed -i 's|USE_XWAYLAND="0"|USE_XWAYLAND="1"|g' ${D}${bindir}/weston-start
+ fi
}
inherit allarch update-rc.d distro_features_check systemd
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init
index 2e938f4..8567dfc 100644
--- a/meta/recipes-graphics/wayland/weston-init/init
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -38,7 +38,7 @@ case "$1" in
chmod 0700 $XDG_RUNTIME_DIR
fi
- openvt -s weston -- $OPTARGS
+ weston-start
;;
stop)
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
new file mode 100644
index 0000000..da20921
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+# There are multiple ways to start weston.
+if [ "$WAYLAND_DISPLAY" ]; then
+ echo -e "\aError: A Wayland compositor is already running."
+ echo "This script does not support launching a nested Weston instance."
+ exit 1
+else
+ if [ "$DISPLAY" ]; then
+ echo "Launching Weston under X"
+ openvt -s -- sh -c "weston -- $OPTARGS > /var/log/weston.log 2>&1"
+ else
+ echo "Launching Weston as first windowing system"
+ export XDG_CONFIG_HOME=/etc
+ USE_XWAYLAND="0"
+ if [ "$USE_XWAYLAND" = "1" ]; then
+ mkdir -p /tmp/.X11-unix
+ OPTARGS="--modules=xwayland.so $OPTARGS"
+ fi
+ openvt $OPENVT_ARGS -- sh -c "weston-launch -- $OPTARGS > /var/log/weston.log 2>&1"
+ fi
+fi
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
index 4f1f7ff..856f91f 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -5,10 +5,10 @@ RequiresMountsFor=/run
[Service]
User=root
EnvironmentFile=-/etc/default/weston
-Environment="XDG_RUNTIME_DIR=/run/user/root"
+Environment="XDG_RUNTIME_DIR=/run/user/root" "OPENVT_ARGS=-w"
ExecStartPre=/bin/mkdir -p /run/user/root
ExecStartPre=/bin/chmod 0700 /run/user/root
-ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+ExecStart=/usr/bin/weston-start
[Install]
WantedBy=multi-user.target
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-21 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21 22:47 [PATCH v3 1/5] core-image-weston: Add XWayland option to the image Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 2/5] packagegroup-core-x11-xserver: Add xserver-xorg-xwayland for XWayland image Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 3/5] weston: Include weston-launch if Wayland is configured Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 4/5] weston: xwayland distro feature requires x11 and wayland Tom Hochstein
2016-01-21 22:47 ` [PATCH v3 5/5] weston-init: Handle Weston startup correctly Tom Hochstein
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.