All of lore.kernel.org
 help / color / mirror / Atom feed
From: <rs@ti.com>
To: <reatmon@ti.com>, <denys@konsulko.com>
Cc: <meta-arago@lists.yoctoproject.org>, <afd@ti.com>,
	<detheridge@ti.com>, <vijayp@ti.com>
Subject: [meta-arago][scarthgap][PATCH 2/2] weston-init: weston-init -> weston-init-arago
Date: Wed, 12 Mar 2025 18:26:29 -0500	[thread overview]
Message-ID: <20250312232628.1260171-4-rs@ti.com> (raw)
In-Reply-To: <20250312232628.1260171-2-rs@ti.com>

From: Randolph Sapp <rs@ti.com>

Make a weston-init-arago package to replace weston-init and use the
emptty display manager. This is based around my initial RFC to oe-core.
This should only be necessary on scarthgap as I doubt any of the changes
proposed on that thread would be approved for a backport.

This also addresses the current issue of with weston occasionally
starting before all the required devices are registered with the drm
subsystem.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-arago-distro/conf/distro/arago.conf      |  3 +-
 meta-arago-distro/conf/layer.conf             |  4 +-
 .../packagegroup-arago-tisdk-graphics.bb      |  2 +-
 .../wayland/weston-init-arago.bb              | 72 +++++++++++++++++
 .../beaglebone/weston.ini                     |  0
 .../wayland/weston-init-arago/emptty.conf     | 77 +++++++++++++++++++
 .../weston-launch-calibrator.sh               |  0
 .../weston.ini                                |  0
 .../wayland/weston-init.bbappend              | 14 ----
 9 files changed, 154 insertions(+), 18 deletions(-)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/beaglebone/weston.ini (100%)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston-launch-calibrator.sh (100%)
 rename meta-arago-distro/recipes-graphics/wayland/{weston-init => weston-init-arago}/weston.ini (100%)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend

diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
index 24d8b005..b536e5b1 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -69,7 +69,8 @@ PACKAGECONFIG:pn-curl = "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6",
 PACKAGECONFIG:pn-glmark2 = "drm-gles2 wayland-gles2"
 
 # Set this to empty string to prevent xwayland config from being added
-PACKAGECONFIG:pn-weston-init = ""
+PACKAGECONFIG:pn-weston-init-arago = ""
+PREFERRED_RPROVIDER_virtual-emptty-conf = "weston-init-arago"
 
 # Enable testing for opencl and vulkan with piglit
 PACKAGECONFIG:append:pn-piglit = " \
diff --git a/meta-arago-distro/conf/layer.conf b/meta-arago-distro/conf/layer.conf
index 4a0e424d..8eb59e61 100644
--- a/meta-arago-distro/conf/layer.conf
+++ b/meta-arago-distro/conf/layer.conf
@@ -36,8 +36,8 @@ BBFILES_DYNAMIC += " \
 BB_DANGLINGAPPENDS_WARNONLY = "true"
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
-    weston-init->weston \
-    weston-init->kbd \
+    weston-init-arago->weston \
+    weston-init-arago->kbd \
 "
 
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
index a82db154..4f2f00b9 100644
--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-graphics.bb
@@ -7,7 +7,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit packagegroup
 
 GFX_WAYLAND = "\
-    weston-init \
+    weston-init-arago \
     weston-examples \
 "
 
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
new file mode 100644
index 00000000..033c32f1
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago.bb
@@ -0,0 +1,72 @@
+SUMMARY = "Configuration files for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI:append = " \
+    file://weston.ini \
+    file://weston-launch-calibrator.sh \
+    file://emptty.conf \
+"
+
+S = "${WORKDIR}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)}"
+PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
+PACKAGECONFIG:append:qemuppc64 = " use-pixman"
+
+PACKAGECONFIG[xwayland] = ",,"
+PACKAGECONFIG[no-idle-timeout] = ",,"
+PACKAGECONFIG[use-pixman] = ",,"
+
+DEFAULTBACKEND ??= ""
+DEFAULTBACKEND:qemuall ?= "drm"
+
+do_install() {
+	install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
+	install -D -p -m0644 ${WORKDIR}/emptty.conf ${D}${sysconfdir}/emptty/conf
+
+	if [ -n "${DEFAULTBACKEND}" ]; then
+		sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', d)}" = "yes" ]; then
+		sed -i -e "/^\[core\]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini
+	fi
+
+	install -dm 755 -o weston -g weston ${D}/home/weston
+	install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator
+}
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+
+# rdepends on weston which depends on virtual/egl
+#
+require ${COREBASE}/meta/recipes-graphics/wayland/required-distro-features.inc
+
+RDEPENDS:${PN} = "weston kbd ${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'weston-xwayland', '', d)} emptty"
+
+FILES:${PN} += "\
+    ${sysconfdir}/xdg/weston/weston.ini \
+    ${sysconfdir}/emptty/conf \
+    /home/weston \
+    ${bindir}/weston-launch-calibrator \
+    "
+
+CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/emptty/conf"
+RPROVIDES:${PN}:append = " virtual-emptty-conf"
+RCONFLICTS:${PN} += "weston-init"
+
+USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,nopasswdlogin weston"
+GROUPADD_PARAM:${PN} = "-r wayland; -r render; -r nopasswdlogin"
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/beaglebone/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/beaglebone/weston.ini
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/beaglebone/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/beaglebone/weston.ini
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
new file mode 100644
index 00000000..7520bc0b
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/emptty.conf
@@ -0,0 +1,77 @@
+# TTY, where emptty will start.
+TTY_NUMBER=7
+
+# Enables switching to defined TTY number.
+SWITCH_TTY=true
+
+# Enables printing of /etc/issue in daemon mode.
+PRINT_ISSUE=true
+
+# Enables printing of default motd, /etc/emptty/motd or /etc/emptty/motd-gen.sh.
+PRINT_MOTD=true
+
+# Preselected user, if AUTOLOGIN is enabled, this user is logged in.
+DEFAULT_USER=weston
+
+# Enables Autologin, if DEFAULT_USER is defined and part of nopasswdlogin group. Possible values are "true" or "false".
+AUTOLOGIN=true
+
+# The default session used, if Autologin is enabled. If session is not found in list of session, it proceeds to manual selection.
+AUTOLOGIN_SESSION=Weston
+
+# If Autologin is enabled and session does not start correctly, the number of retries in short period is kept to eventually stop the infinite loop of restarts. -1 is for infinite retries, 0 is for no retry.
+AUTOLOGIN_MAX_RETRY=0
+
+# Default LANG, if user does not have set own in init script.
+#LANG=en_US.UTF-8
+
+# Starts desktop with calling "dbus-launch".
+DBUS_LAUNCH=true
+
+# Starts Xorg desktop with calling "~/.xinitrc" script, if is true, file exists and selected WM/DE is Xorg session, it overrides DBUS_LAUNCH.
+XINITRC_LAUNCH=false
+
+# Prints available WM/DE each on new line instead of printing on single line.
+VERTICAL_SELECTION=false
+
+# Defines the way, how is logging handled. Possible values are "rotate", "appending" or "disabled".
+#LOGGING=rotate
+
+# Overrides path of log file
+#LOGGING_FILE=/var/log/emptty/[TTY_NUMBER].log
+
+# Arguments passed to Xorg server.
+#XORG_ARGS=
+
+# Allows to use dynamic motd script to generate custom MOTD.
+#DYNAMIC_MOTD=false
+
+# Allows to override default path to dynamic motd.
+#DYNAMIC_MOTD_PATH=/etc/emptty/motd-gen.sh
+
+# Allows to override default path to static motd.
+#MOTD_PATH=/etc/emptty/motd
+
+# Foreground color, available only in daemon mode.
+#FG_COLOR=LIGHT_BLACK
+
+# Background color, available only in daemon mode.
+#BG_COLOR=BLACK
+
+# Enables numlock in daemon mode. Possible values are "true" or "false".
+#ENABLE_NUMLOCK=false
+
+# Defines the way, how is logging of session errors handled. Possible values are "rotate", "appending" or "disabled".
+SESSION_ERROR_LOGGING=rotate
+
+# Overrides path of session errors log file
+#SESSION_ERROR_LOGGING_FILE=/var/log/emptty/session-errors.[TTY_NUMBER].log
+
+# If set true, it will not use `.emptty-xauth` file, but the standard `~/.Xauthority` file. This allows to handle xauth issues.
+#DEFAULT_XAUTHORITY=false
+
+#If set true, Xorg will be started as rootless, if system allows and emptty is running in daemon mode.
+#ROOTLESS_XORG=false
+
+#If set true, environmental groups are printed to differ Xorg/Wayland/Custom/UserCustom desktops.
+IDENTIFY_ENVS=false
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston-launch-calibrator.sh
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston-launch-calibrator.sh
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston.ini
similarity index 100%
rename from meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
rename to meta-arago-distro/recipes-graphics/wayland/weston-init-arago/weston.ini
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
deleted file mode 100644
index 4d5db58c..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
+++ /dev/null
@@ -1,14 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-PR:append = ".arago12"
-
-SRC_URI:append = " \
-    file://weston.ini \
-    file://weston-launch-calibrator.sh \
-"
-
-do_install:append() {
-    install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator
-}
-
-FILES:${PN}:append = "${bindir}/weston-launch-calibrator"
-- 
2.48.1



      parent reply	other threads:[~2025-03-12 23:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 23:26 [meta-arago][scarthgap][PATCH 0/2] Add display manager and required configs rs
2025-03-12 23:26 ` [meta-arago][scarthgap][PATCH 1/2] emptty: add version 0.13.0 rs
2025-03-18 16:33   ` Denys Dmytriyenko
2025-03-12 23:26 ` rs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250312232628.1260171-4-rs@ti.com \
    --to=rs@ti.com \
    --cc=afd@ti.com \
    --cc=denys@konsulko.com \
    --cc=detheridge@ti.com \
    --cc=meta-arago@lists.yoctoproject.org \
    --cc=reatmon@ti.com \
    --cc=vijayp@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.