]> code.ossystems Code Review - openembedded-core.git/commitdiff
weston-init: Allow setting idle time to 0
authorAlistair <alistair@alistair23.me>
Thu, 22 Oct 2020 02:45:49 +0000 (19:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Oct 2020 11:56:52 +0000 (12:56 +0100)
Add a PACKAGECONFIG that can be used to set the idle-time to 0. This is
useful for always on machine (such as kiosks) and for debugging.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/wayland/weston-init.bb

index 07cec75fb333e81105ffa07aaf056b9395756dda..b7a99be6461fa283f5131d29d35bab19ab16c12b 100644 (file)
@@ -15,6 +15,10 @@ SRC_URI = "file://init \
 
 S = "${WORKDIR}"
 
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[no-idle-timeout] = ",,"
+
 DEFAULTBACKEND ??= ""
 DEFAULTBACKEND_qemuall ?= "fbdev"
 DEFAULTBACKEND_qemuarm64 = "drm"
@@ -45,6 +49,10 @@ do_install() {
         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', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
+               echo "idle-time=0" >> ${D}${sysconfdir}/xdg/weston/weston.ini
+       fi
 }
 
 inherit update-rc.d features_check systemd