weston-ini-conf: rework remote output configuration generation 19/27619/3
authorScott Murray <scott.murray@konsulko.com>
Wed, 8 Jun 2022 19:35:37 +0000 (15:35 -0400)
committerScott Murray <scott.murray@konsulko.com>
Tue, 14 Jun 2022 04:44:42 +0000 (04:44 +0000)
To allow for a user to change the weston-remoting configuration
fragment the same way 8c4b3948 did with the the fragment for
waltham-remoting, rename the TRANSMITTER* variables 8c4b3948
added to REMOTE* and apply the same transformations to the
remote-output.cfg fragment.  Additionally, add a new
REMOTE_OUTPUT_APP_ID variable that will add the potentially
required agl-shell-app-id option to the fragment if the variable
is set.

Bug-AGL: SPEC-4426

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ib20aafe5737482814fe6c4ae0f9cd1b39230adb3
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27619
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account

meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in [moved from meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg with 100% similarity]

index c635d7b..89b2164 100644 (file)
@@ -9,7 +9,7 @@ SRC_URI = " \
        file://hdmi-a-1-90.cfg \
        file://hdmi-a-1-180.cfg \
        file://hdmi-a-1-270.cfg \
-       file://remote-output.cfg \
+       file://remote-output.cfg.in \
        file://transmitter-output.cfg.in \
        file://virtual-0.cfg \
        file://virtual-180.cfg \
@@ -32,16 +32,25 @@ WESTON_FRAGMENTS = "core shell ${WESTON_DISPLAYS}"
 weston_ini_dir = "${sysconfdir}/xdg/weston"
 
 # Options for the user to change in local.conf
-# e.g. TRANSMITTER_OUTPUT_MODE = "1080x1488"
-TRANSMITTER_OUTPUT_MODE ??= "640x720@30"
-TRANSMITTER_OUTPUT_HOST ??= "192.168.20.99"
-TRANSMITTER_OUTPUT_PORT ??= "5005"
+# e.g. REMOTE_OUTPUT_MODE = "1080x1488"
+REMOTE_OUTPUT_MODE ??= "640x720@30"
+REMOTE_OUTPUT_HOST ??= "192.168.20.99"
+REMOTE_OUTPUT_PORT ??= "5005"
+REMOTE_OUTPUT_APP_ID ??= ""
 
 do_configure() {
-    sed -e "s#mode=.*#mode=${TRANSMITTER_OUTPUT_MODE}#" \
-        -e "s#host=.*#host=${TRANSMITTER_OUTPUT_HOST}#" \
-        -e "s#port=.*#port=${TRANSMITTER_OUTPUT_PORT}#" \
+    sed -e "s#mode=.*#mode=${REMOTE_OUTPUT_MODE}#" \
+        -e "s#host=.*#host=${REMOTE_OUTPUT_HOST}#" \
+        -e "s#port=.*#port=${REMOTE_OUTPUT_PORT}#" \
         ${WORKDIR}/transmitter-output.cfg.in  > ${WORKDIR}/transmitter-output.cfg
+
+    sed -e "s#mode=.*#mode=${REMOTE_OUTPUT_MODE}#" \
+        -e "s#host=.*#host=${REMOTE_OUTPUT_HOST}#" \
+        -e "s#port=.*#port=${REMOTE_OUTPUT_PORT}#" \
+        ${WORKDIR}/remote-output.cfg.in  > ${WORKDIR}/remote-output.cfg
+    if [ -n "${REMOTE_OUTPUT_APP_ID}" ]; then
+        echo "agl-shell-app-id=${REMOTE_OUTPUT_APP_ID}" >> ${WORKDIR}/remote-output.cfg
+    fi
 }
 
 do_compile() {