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 <isaac.hermida@digi.com>
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-12-11 11:48:11 +01:00
parent 576c0283f0
commit c7b2c5e94c
5 changed files with 7 additions and 15 deletions

View File

@ -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"

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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