]> code.ossystems Code Review - openembedded-core.git/commitdiff
weston-init: Select drm/fbdev backends for qemu machines
authorKhem Raj <raj.khem@gmail.com>
Sun, 13 Sep 2020 21:52:42 +0000 (14:52 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 13 Sep 2020 23:14:45 +0000 (00:14 +0100)
qemux86/x86_64/aarch64 supports drm backend well, therefore enable it on
these qemu machines, other qemu machines should be defaulting to fbdev,
if its not qemu then leave it empty

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/wayland/weston-init.bb
meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini [deleted file]
meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini [deleted file]

index 113f0ff5991c83d16626ba9cb24977506b901716..07cec75fb333e81105ffa07aaf056b9395756dda 100644 (file)
@@ -15,6 +15,12 @@ SRC_URI = "file://init \
 
 S = "${WORKDIR}"
 
+DEFAULTBACKEND ??= ""
+DEFAULTBACKEND_qemuall ?= "fbdev"
+DEFAULTBACKEND_qemuarm64 = "drm"
+DEFAULTBACKEND_qemux86 = "drm"
+DEFAULTBACKEND_qemux86-64 = "drm"
+
 do_install() {
        install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
        install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
@@ -36,6 +42,9 @@ do_install() {
        install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
        sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
        sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
+        if [ -n "${DEFAULTBACKEND}" ]; then
+               sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
+       fi
 }
 
 inherit update-rc.d features_check systemd
diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini b/meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini
deleted file mode 100644 (file)
index e69de29..0000000