summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/wayland
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2023-04-28 15:28:37 +0200
committerMing Liu <liu.ming50@gmail.com>2023-04-28 15:57:14 +0200
commit6dbe58269fcbe15c1e6f2e86c8ea1cfc3de31156 (patch)
tree64de526aa48ef6c7fabf4cdc3da28a847b4d430a /recipes-graphics/wayland
parentb211cd09da29c82802a823f42ae0f5005616d2ef (diff)
downloadmeta-freescale-6dbe58269fcbe15c1e6f2e86c8ea1cfc3de31156.tar.gz
weston-init: comment in xwayland=true for mainline BSPs
The main recipe now sets xwayland=true in weston.ini, but xwayland does not really work for mainline BSPs, the following error was observed on both imx6/imx7 machines, as follows: ``` | # gst-play-1.0 testvideo_h264_360p.mp4 | Press 'k' to see a list of keyboard shortcuts. | Now playing testvideo_h264_360p.mp4 | X connection to :0.0 broken (explicit kill or server shutdown). ``` after removing "xwayland=true" from weston.ini, it works again. This patch mainly aims to resolve this problem by introducing a variable INI_COMMENT_ASSIGNMENTS that the end users could set to comment a line in weston.ini. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Diffstat (limited to 'recipes-graphics/wayland')
-rw-r--r--recipes-graphics/wayland/weston-init.bbappend20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
index 478c7cd6..a742bb86 100644
--- a/recipes-graphics/wayland/weston-init.bbappend
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -9,9 +9,17 @@ REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}"
9SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" 9SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config"
10 10
11# To customize weston.ini, start by setting the desired assignment in weston.ini, 11# To customize weston.ini, start by setting the desired assignment in weston.ini,
12# commented in. For example:
13# xwayland=true
14# Then add the assignment to INI_COMMENT_ASSIGNMENTS.
15#
12# commented out. For example: 16# commented out. For example:
13# #xwayland=true 17# #xwayland=true
14# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. 18# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS.
19INI_COMMENT_ASSIGNMENTS:append:imx-mainline-bsp = " \
20 xwayland=true \
21"
22
15INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \ 23INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \
16 repaint-window=16 \ 24 repaint-window=16 \
17" 25"
@@ -33,6 +41,13 @@ INI_UNCOMMENT_ASSIGNMENTS:append = " \
33 ${INI_UNCOMMENT_USE_G2D} \ 41 ${INI_UNCOMMENT_USE_G2D} \
34" 42"
35 43
44comment() {
45 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then
46 bbwarn "Commented setting '#$1' not found in file $2"
47 fi
48 sed -i -e 's,^'"$1"',#'"$1"',g' $2
49}
50
36uncomment() { 51uncomment() {
37 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then 52 if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then
38 bbwarn "Commented setting '#$1' not found in file $2" 53 bbwarn "Commented setting '#$1' not found in file $2"
@@ -44,6 +59,11 @@ do_install:append() {
44 if [ -f "${WORKDIR}/weston.config" ]; then 59 if [ -f "${WORKDIR}/weston.config" ]; then
45 install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston 60 install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
46 fi 61 fi
62
63 for assignment in ${INI_COMMENT_ASSIGNMENTS}; do
64 comment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini
65 done
66
47 for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do 67 for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do
48 uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini 68 uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini
49 done 69 done