From 1f01bcbbffe2692e95fac591c4eaace33483f76a Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Sun, 21 May 2023 14:02:50 +0900 Subject: Improvement to psplash recipe using service override 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 --- recipes-core/psplash/agl-container-guest/psplash.env | 4 ---- recipes-core/psplash/files/psplash-args.conf | 3 +++ recipes-core/psplash/files/psplash-portrait.conf | 3 +-- recipes-core/psplash/psplash-portrait-config.bbappend | 1 - .../psplash-portrait-config_agl-container-guest-demo.inc | 15 --------------- recipes-core/psplash/psplash_agl-container-guest-demo.inc | 11 ----------- recipes-core/psplash/psplash_agldemo.inc | 13 ++++++++++++- recipes-core/psplash/psplash_git.bbappend | 1 - 8 files changed, 16 insertions(+), 35 deletions(-) delete mode 100644 recipes-core/psplash/agl-container-guest/psplash.env create mode 100644 recipes-core/psplash/files/psplash-args.conf delete mode 100644 recipes-core/psplash/psplash-portrait-config.bbappend delete mode 100644 recipes-core/psplash/psplash-portrait-config_agl-container-guest-demo.inc delete mode 100644 recipes-core/psplash/psplash_agl-container-guest-demo.inc diff --git a/recipes-core/psplash/agl-container-guest/psplash.env b/recipes-core/psplash/agl-container-guest/psplash.env deleted file mode 100644 index ed5f2621..00000000 --- a/recipes-core/psplash/agl-container-guest/psplash.env +++ /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 index 00000000..e5b34f4d --- /dev/null +++ b/recipes-core/psplash/files/psplash-args.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/usr/bin/psplash $PSPLASH_ARGS $PSPLASH_ANGLE_ARGS diff --git a/recipes-core/psplash/files/psplash-portrait.conf b/recipes-core/psplash/files/psplash-portrait.conf index 1423cf9d..d74f9779 100644 --- a/recipes-core/psplash/files/psplash-portrait.conf +++ b/recipes-core/psplash/files/psplash-portrait.conf @@ -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 index 62914b5d..00000000 --- a/recipes-core/psplash/psplash-portrait-config.bbappend +++ /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 index 73edc67d..00000000 --- a/recipes-core/psplash/psplash-portrait-config_agl-container-guest-demo.inc +++ /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 index 9c7fb37e..00000000 --- a/recipes-core/psplash/psplash_agl-container-guest-demo.inc +++ /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 -} diff --git a/recipes-core/psplash/psplash_agldemo.inc b/recipes-core/psplash/psplash_agldemo.inc index 84a6814b..cc5b5b7b 100644 --- a/recipes-core/psplash/psplash_agldemo.inc +++ b/recipes-core/psplash/psplash_agldemo.inc @@ -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}" diff --git a/recipes-core/psplash/psplash_git.bbappend b/recipes-core/psplash/psplash_git.bbappend index d7d75d27..931b27c7 100644 --- a/recipes-core/psplash/psplash_git.bbappend +++ b/recipes-core/psplash/psplash_git.bbappend @@ -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)} -- cgit 1.2.3-korg