diff --git a/meta-xt-driver-domain/recipes-core/systemd/files/sdl-env-kmsdrm.conf b/meta-xt-driver-domain/recipes-core/systemd/files/sdl-env-kmsdrm.conf new file mode 100644 index 0000000..890522f --- /dev/null +++ b/meta-xt-driver-domain/recipes-core/systemd/files/sdl-env-kmsdrm.conf @@ -0,0 +1,2 @@ +[Manager] +DefaultEnvironment="SDL_VIDEODRIVER=kmsdrm" diff --git a/meta-xt-driver-domain/recipes-core/systemd/files/sdl-env.conf b/meta-xt-driver-domain/recipes-core/systemd/files/sdl-env-wayland.conf similarity index 100% rename from meta-xt-driver-domain/recipes-core/systemd/files/sdl-env.conf rename to meta-xt-driver-domain/recipes-core/systemd/files/sdl-env-wayland.conf diff --git a/meta-xt-driver-domain/recipes-core/systemd/systemd_%.bbappend b/meta-xt-driver-domain/recipes-core/systemd/systemd_%.bbappend index 7049c7c..6cceb6f 100644 --- a/meta-xt-driver-domain/recipes-core/systemd/systemd_%.bbappend +++ b/meta-xt-driver-domain/recipes-core/systemd/systemd_%.bbappend @@ -2,7 +2,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI:append = " \ file://ip_forward.conf \ - file://sdl-env.conf \ + file://sdl-env-wayland.conf \ + file://sdl-env-kmsdrm.conf \ " PACKAGECONFIG:append = " networkd" @@ -14,5 +15,10 @@ USERADD_ERROR_DYNAMIC = "warn" do_install:append() { install -m 0644 ${WORKDIR}/ip_forward.conf ${D}${sysconfdir}/tmpfiles.d/ install -d ${D}${sysconfdir}/systemd/system.conf.d/ - install -m 0644 ${WORKDIR}/sdl-env.conf ${D}${sysconfdir}/systemd/system.conf.d/ + # Check if 'weston' is included in the DISTRO_FEATURES or PACKAGECONFIG + if ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'true', 'false', d)}; then + install -m 0644 ${WORKDIR}/sdl-env-wayland.conf ${D}${sysconfdir}/systemd/system.conf.d/sdl-env.conf + else + install -m 0644 ${WORKDIR}/sdl-env-kmsdrm.conf ${D}${sysconfdir}/systemd/system.conf.d/sdl-env.conf + fi }