summaryrefslogtreecommitdiff
path: root/recipes-graphics/wayland/weston-init.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/wayland/weston-init.bbappend')
-rw-r--r--recipes-graphics/wayland/weston-init.bbappend24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 0000000..a7b7710
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1,24 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://weston.sh"
+
+PACKAGECONFIG:append:upstream:tdx = " no-idle-timeout"
+PACKAGECONFIG:append:am62x = " no-idle-timeout"
+PACKAGECONFIG:append:upstream:colibri-imx6ull = " use-pixman"
+PACKAGECONFIG:append:upstream:colibri-imx6ull-emmc = " use-pixman"
+PACKAGECONFIG:append:upstream:colibri-imx7 = " use-pixman"
+PACKAGECONFIG:append:upstream:colibri-imx7-emmc = " use-pixman"
+
+do_install:append:tdx() {
+ install -Dm0755 ${WORKDIR}/weston.sh ${D}${sysconfdir}/profile.d/weston.sh
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ # We need run weston systemd service with root user, or else it could not
+ # access input devices and GPU acceleration hardwares
+ # Reference: https://source.codeaurora.org/external/imx/meta-imx/commit/?h=hardknott-5.10.72-2.2.0&id=9e08be758765d4a991e0a440f8abef225be094e3
+ sed -i "s/User=weston/User=root/" ${D}${systemd_system_unitdir}/weston.service
+ sed -i "s/Group=weston/Group=root/" ${D}${systemd_system_unitdir}/weston.service
+ sed -i "s/SocketUser=weston/SocketUser=root/" ${D}${systemd_system_unitdir}/weston.socket
+ sed -i "s/SocketGroup=wayland/SocketGroup=root/" ${D}${systemd_system_unitdir}/weston.socket
+ fi
+}