Improvement to psplash recipe using service override 21/28921/2
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Sun, 21 May 2023 05:02:50 +0000 (14:02 +0900)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 29 May 2023 13:35:09 +0000 (13:35 +0000)
Last psplash patch has some HACK implementation for
drl lease support.  It cause complex change to psplash
service file.

This patch fix this issue reusing
sandbox/ishii.hiroyuki/psplash-drm, that is worked by
ishii hiroyuki.

Bug-AGL: SPEC-4804

Change-Id: I4ae514293fbf1bc5a6cde4bcf96ff59ea8ba9b08
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
recipes-core/psplash/agl-container-guest/psplash.env [deleted file]
recipes-core/psplash/files/psplash-args.conf [new file with mode: 0644]
recipes-core/psplash/files/psplash-portrait.conf
recipes-core/psplash/psplash-portrait-config.bbappend [deleted file]
recipes-core/psplash/psplash-portrait-config_agl-container-guest-demo.inc [deleted file]
recipes-core/psplash/psplash_agl-container-guest-demo.inc [deleted file]
recipes-core/psplash/psplash_agldemo.inc
recipes-core/psplash/psplash_git.bbappend

diff --git a/recipes-core/psplash/agl-container-guest/psplash.env b/recipes-core/psplash/agl-container-guest/psplash.env
deleted file mode 100644 (file)
index ed5f262..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-XDG_RUNTIME_DIR=/run/user/0
-DLM_RUNTIME_PATH=/var/display/drm-lease-manager
-DRM_LEASE_DEVICE=lease
-WAYLAND_DISPLAY=wayland-1
diff --git a/recipes-core/psplash/files/psplash-args.conf b/recipes-core/psplash/files/psplash-args.conf
new file mode 100644 (file)
index 0000000..e5b34f4
--- /dev/null
@@ -0,0 +1,3 @@
+[Service]
+ExecStart=
+ExecStart=/usr/bin/psplash $PSPLASH_ARGS $PSPLASH_ANGLE_ARGS
index 1423cf9..d74f977 100644 (file)
@@ -1,3 +1,2 @@
 [Service]
-ExecStart=
-ExecStart=/usr/bin/psplash --angle 90
+Environment=PSPLASH_ANGLE_ARGS='--angle 90'
diff --git a/recipes-core/psplash/psplash-portrait-config.bbappend b/recipes-core/psplash/psplash-portrait-config.bbappend
deleted file mode 100644 (file)
index 62914b5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('AGL_FEATURES', 'agl-container-guest-demo', 'psplash-portrait-config_agl-container-guest-demo.inc', '', d)}
diff --git a/recipes-core/psplash/psplash-portrait-config_agl-container-guest-demo.inc b/recipes-core/psplash/psplash-portrait-config_agl-container-guest-demo.inc
deleted file mode 100644 (file)
index 73edc67..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-do_install[depends] = "psplash:do_populate_sysroot"
-
-do_install() {
-    # Install override
-    psplash_service="${STAGING_DIR_TARGET}/${systemd_system_unitdir}/psplash-start.service"
-    if [ ! -f "$psplash_service" ]; then
-        echo "ERROR: psplash service unit file not found: $psplash_service" >&2
-        exit 1
-    fi
-    install -d ${D}${systemd_system_unitdir}/psplash-start.service.d
-    psplash_portrait_conf="${D}${systemd_system_unitdir}/psplash-start.service.d/psplash-portrait.conf"
-    echo "[Service]" > "$psplash_portrait_conf"
-    echo "ExecStart=" >> "$psplash_portrait_conf"
-    sed -ne 's!^\(ExecStart=/usr/bin/psplash.*\)!\1 --angle 90!p' "$psplash_service" >> "$psplash_portrait_conf"
-}
diff --git a/recipes-core/psplash/psplash_agl-container-guest-demo.inc b/recipes-core/psplash/psplash_agl-container-guest-demo.inc
deleted file mode 100644 (file)
index 9c7fb37..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/agl-container-guest:"
-SRC_URI:append = " file://psplash.env"
-
-PACKAGECONFIG:append = " drm drm-lease"
-
-PSPLASH_DRM_LEASE_ARGS = "--drm-lease lease"
-
-do_install:append () {
-       sed -i -e '/^\[Service\]/a EnvironmentFile=/etc/default/psplash' ${D}${systemd_system_unitdir}/psplash-start.service
-    install -Dm644 ${WORKDIR}/psplash.env ${D}${sysconfdir}/default/psplash
-}
index 84a6814..cc5b5b7 100644 (file)
@@ -1,9 +1,20 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
-SRC_URI:append = " file://psplash-colors.h"
+SRC_URI:append = " \
+    file://psplash-colors.h \
+    file://psplash-args.conf \
+"
 
 SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
 
 do_configure:append () {
        cp -f ${WORKDIR}/psplash-colors.h ${S}
 }
+
+do_install:append () {
+    # Install override
+    install -d ${D}${systemd_system_unitdir}/psplash-start.service.d
+    install -m 0644 ${WORKDIR}/psplash-args.conf ${D}${systemd_system_unitdir}/psplash-start.service.d/
+}
+
+FILES:${PN} += "${systemd_system_unitdir}"
index d7d75d2..931b27c 100644 (file)
@@ -1,2 +1 @@
 require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'psplash_agldemo.inc', '', d)}
-require ${@bb.utils.contains('AGL_FEATURES', 'agl-container-guest-demo', 'psplash_agl-container-guest-demo.inc', '', d)}