From c7b2c5e94c7615b2d58c5fc9c29abb4e13608a5f Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 11 Dec 2024 11:48:11 +0100 Subject: [PATCH] Generalize WAYLAND_DISPLAY variable at a platform level and set a default value The value of this variable is always the same within a platform, so it doesn't make sense to have different variables for it in each recipe that requires it. While at it, it seems like all currently supported platforms in DEY 5.0 use the same value of "wayland-1", presumably because they all use similar versions of wayland/weston. Set this as the default value for all platforms for now. As we support more platforms, we can adjust this value if needed, but if it ends up being the same for all platforms, we can just hardcode it. https://onedigi.atlassian.net/browse/DEL-9404 Co-authored-by: Isaac Hermida Signed-off-by: Isaac Hermida Signed-off-by: Gabriel Valcazar --- meta-digi-arm/conf/machine/include/digi-defaults.inc | 3 +++ .../eiq-examples/eiq-examples/scripts/launch_eiq_demo.sh | 2 +- .../connectcore-demo-example-webkit.bb | 6 +----- meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb | 5 +---- meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_8.3.0.bb | 6 +----- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/meta-digi-arm/conf/machine/include/digi-defaults.inc b/meta-digi-arm/conf/machine/include/digi-defaults.inc index 0072b5d90..ce262a7db 100644 --- a/meta-digi-arm/conf/machine/include/digi-defaults.inc +++ b/meta-digi-arm/conf/machine/include/digi-defaults.inc @@ -86,6 +86,9 @@ IMAGE_LINK_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}" # List of graphical images names (for install scripts) GRAPHICAL_IMAGES ?= "dey-image-crank dey-image-qt dey-image-webkit dey-image-lvgl" +# Default wayland socket +WAYLAND_DISPLAY ?= "wayland-1" + # Include DEY SELinux policy modifications by default DEY_SELINUX_POLICY ?= "1" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples/scripts/launch_eiq_demo.sh b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples/scripts/launch_eiq_demo.sh index 374dd6d79..b181441e3 100644 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples/scripts/launch_eiq_demo.sh +++ b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples/scripts/launch_eiq_demo.sh @@ -36,4 +36,4 @@ DEMO_DIR="/usr/bin/eiq-examples-git/${DEMO}" cd "${DEMO_DIR}" || exit # Execute the demo pre-configuring the display settings. -WAYLAND_DISPLAY=/run/wayland-0 DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 python3 main.py -i /dev/video0 -f -d /usr/lib/libethosu_delegate.so +DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 python3 main.py -i /dev/video0 -f -d /usr/lib/libethosu_delegate.so diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-digi/connectcore-demo-example-webkit/connectcore-demo-example-webkit.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-digi/connectcore-demo-example-webkit/connectcore-demo-example-webkit.bb index bd3c0cd15..11b390e98 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-digi/connectcore-demo-example-webkit/connectcore-demo-example-webkit.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-digi/connectcore-demo-example-webkit/connectcore-demo-example-webkit.bb @@ -6,10 +6,6 @@ WESTON_SERVICE ?= "weston.service" WESTON_SERVICE:ccmp15 ?= "weston-launch.service" WESTON_SERVICE:ccmp25 ?= "weston-launch.service" -CC_DEMO_DISPLAY ?= "wayland-0" -CC_DEMO_DISPLAY:ccmp15 ?= "wayland-1" -CC_DEMO_DISPLAY:ccmp25 ?= "wayland-1" -CC_DEMO_DISPLAY:ccimx93 ?= "wayland-1" CC_DEMO_ENV ?= "DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=\$\{DEMO_DISPLAY\}" CC_DEMO_ENV:ccimx6ul ?= "" @@ -34,7 +30,7 @@ do_install:append() { install -d ${D}${sysconfdir}/init.d/ install -m 755 ${WORKDIR}/connectcore-demo-example-init ${D}${sysconfdir}/connectcore-demo-example sed -i -e "s@##CC_DEMO_ENV##@${CC_DEMO_ENV}@g" \ - -e "s@##CC_DEMO_DISPLAY##@${CC_DEMO_DISPLAY}@g" \ + -e "s@##CC_DEMO_DISPLAY##@${WAYLAND_DISPLAY}@g" \ "${D}${sysconfdir}/connectcore-demo-example" ln -sf ${sysconfdir}/connectcore-demo-example ${D}${sysconfdir}/init.d/connectcore-demo-example } diff --git a/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb b/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb index be1c61582..88fcbc3d0 100644 --- a/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb +++ b/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb @@ -17,9 +17,6 @@ WESTON_SERVICE ?= "weston.service" WESTON_SERVICE:ccmp15 ?= "weston-launch.service" CRANK_DEMOS_TARBALL_PATH ?= "" -CRANK_DEMO_DISPLAY ?= "wayland-0" -CRANK_DEMO_DISPLAY:ccmp15 ?= "wayland-1" -CRANK_DEMO_DISPLAY:ccimx93 ?= "wayland-1" CRANK_DEMO_ENV ?= "DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=\$\{DEMO_DISPLAY\}" CRANK_DEMO_ENV:ccimx6ul ?= "" CRANK_DEMO_OPTIONS ?= "-orender_mgr,multisample=0" @@ -81,7 +78,7 @@ do_install () { sed -i -e "s@##CRANK_DEMO_PATH##@${CRANK_DEMO_PATH}@g" \ -e "s@##CRANK_DEMO_OPTIONS##@${CRANK_DEMO_OPTIONS}@g" \ -e "s@##CRANK_DEMO_ENV##@${CRANK_DEMO_ENV}@g" \ - -e "s@##CRANK_DEMO_DISPLAY##@${CRANK_DEMO_DISPLAY}@g" \ + -e "s@##CRANK_DEMO_DISPLAY##@${WAYLAND_DISPLAY}@g" \ "${D}${sysconfdir}/crank-demo" ln -sf ${sysconfdir}/crank-demo ${D}${sysconfdir}/init.d/crank-demo } diff --git a/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_8.3.0.bb b/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_8.3.0.bb index 9bafa6a74..5af0f2010 100644 --- a/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_8.3.0.bb +++ b/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_8.3.0.bb @@ -66,10 +66,6 @@ WESTON_SERVICE ?= "weston.service" WESTON_SERVICE:ccmp15 ?= "weston-launch.service" WESTON_SERVICE:ccmp2 ?= "weston-launch.service" -LVGL_DEMO_DISPLAY ?= "wayland-0" -LVGL_DEMO_DISPLAY:ccmp15 ?= "wayland-1" -LVGL_DEMO_DISPLAY:ccmp2 ?= "wayland-1" -LVGL_DEMO_DISPLAY:ccimx93 ?= "wayland-1" LVGL_DEMO_ENV ?= "DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=\$\{DEMO_DISPLAY\}" LVGL_DEMO_ENV:ccimx6ul ?= "" @@ -89,7 +85,7 @@ do_install:append() { # Install wrapper bootscript to launch LVGL demo on boot install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/lvgl-demo-init ${D}${sysconfdir}/lvgl-demo-init - sed -i -e "s@##LVGL_DEMO_DISPLAY##@${LVGL_DEMO_DISPLAY}@g" \ + sed -i -e "s@##LVGL_DEMO_DISPLAY##@${WAYLAND_DISPLAY}@g" \ -e "s@##LVGL_DEMO_ENV##@${LVGL_DEMO_ENV}@g" \ "${D}${sysconfdir}/lvgl-demo-init" ln -sf ${sysconfdir}/lvgl-demo-init ${D}${sysconfdir}/init.d/lvgl-demo-init