From c1ebb48c52762fbc75ef5efb6e2541c1869586bc Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Sun, 17 Nov 2019 09:25:11 -0600 Subject: weston: Replace copies of weston.ini with logic Install a common base weston.ini and then customize it in the recipe by specifying custom options. Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init.bbappend | 25 ++++++++++++++++++++++ .../wayland/weston-init/mx7ulp/weston.ini | 25 ---------------------- .../wayland/weston-init/mx8mm/weston.ini | 25 ---------------------- .../wayland/weston-init/mx8mq/weston.ini | 25 ---------------------- 4 files changed, 25 insertions(+), 75 deletions(-) delete mode 100644 recipes-graphics/wayland/weston-init/mx7ulp/weston.ini delete mode 100644 recipes-graphics/wayland/weston-init/mx8mm/weston.ini delete mode 100644 recipes-graphics/wayland/weston-init/mx8mq/weston.ini (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 13818bc3..ce6c4c7c 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -11,10 +11,35 @@ SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" +# To customize weston.ini, start by setting the desired assignment in weston.ini, +# commented out. Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. +INI_UNCOMMENT_ASSIGNMENTS = "" +INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ + gbm-format=argb8888 \ + \\[shell\\] \ + size=1920x1080 \ +" + +uncomment() { + if ! (grep "^#$1" $2); then + bbfatal "Commented setting '#$1' not found in file $2" + fi + sed -i -e 's,^#'"$1"','"$1"',g' $2 +} + do_install_append() { if ${HAS_SYSTEMD}; then if ${HAS_XWAYLAND}; then install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi fi + for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do + uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini + done } diff --git a/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini b/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini deleted file mode 100644 index 390932bc..00000000 --- a/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini +++ /dev/null @@ -1,25 +0,0 @@ -[core] -#gbm-format=argb8888 -idle-time=0 -use-g2d=1 -#xwayland=true - -#[shell] -#size=1920x1080 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/recipes-graphics/wayland/weston-init/mx8mm/weston.ini b/recipes-graphics/wayland/weston-init/mx8mm/weston.ini deleted file mode 100644 index 390932bc..00000000 --- a/recipes-graphics/wayland/weston-init/mx8mm/weston.ini +++ /dev/null @@ -1,25 +0,0 @@ -[core] -#gbm-format=argb8888 -idle-time=0 -use-g2d=1 -#xwayland=true - -#[shell] -#size=1920x1080 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/recipes-graphics/wayland/weston-init/mx8mq/weston.ini b/recipes-graphics/wayland/weston-init/mx8mq/weston.ini deleted file mode 100644 index eceb6456..00000000 --- a/recipes-graphics/wayland/weston-init/mx8mq/weston.ini +++ /dev/null @@ -1,25 +0,0 @@ -[core] -gbm-format=argb8888 -idle-time=0 -#use-g2d=1 -#xwayland=true - -[shell] -size=1920x1080 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize -- cgit v1.2.3-54-g00ecf