From 21d9c4f17be9fa0a0abf2d9465f8d882bdf6c937 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Fri, 12 Dec 2025 14:29:22 +0100 Subject: [PATCH] lvgl-demo: remove vestigial Wayland logic In platforms that support wayland/xwayland, dey-image-lvgl images have most weston/wayland packages removed from the filesystem, save for the main wayland package (because DISTRO_FEATURES still contains "wayland"). Because of this, the wait_for_wayland() function is called in lvgl-demo-init, but the wayland display never gets created, causing the function to time out after 20 seconds. Get rid of this check to have the lvgl-demo launch as soon as possible. While at it, get rid of other wayland-related logic, since we only use LVGL's drm or fbdev backends at the moment. Signed-off-by: Gabriel Valcazar --- .../lvgl/files/lvgl-demo-init | 27 +++---------------- .../recipes-graphics/lvgl/lvgl-demo_9.3.0.bb | 6 ----- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/meta-digi-dey/recipes-graphics/lvgl/files/lvgl-demo-init b/meta-digi-dey/recipes-graphics/lvgl/files/lvgl-demo-init index e1ac75dd8..063ea537a 100644 --- a/meta-digi-dey/recipes-graphics/lvgl/files/lvgl-demo-init +++ b/meta-digi-dey/recipes-graphics/lvgl/files/lvgl-demo-init @@ -16,8 +16,6 @@ readonly DEMO_NAME="lvgl-demo" readonly DEMO_PATH="/usr/bin/${DEMO_NAME}" readonly DEMO_TITLE="LVGL Demo Application" -readonly DEMO_DISPLAY="##LVGL_DEMO_DISPLAY##" -readonly DEMO_ENV="##LVGL_DEMO_ENV##" readonly PID_FILE="/run/${DEMO_NAME}.pid" log() { @@ -54,21 +52,6 @@ check_is_running() { return 1 } -wait_for_wayland() { - local count=20 - local wayland_socket="/run/user/0/${DEMO_DISPLAY}" - - while [ ! -S "${wayland_socket}" ]; do - sleep 1 - count=$((count-1)) - if [ "${count}" = 0 ]; then - return 1 - fi - done - sleep 1 - return 0 -} - stop() { check_is_running || return @@ -89,15 +72,11 @@ stop() { start() { check_is_running && { log warning "start: ${DEMO_NAME} ALREADY running"; exit 0; } - if [ -d "/usr/share/wayland" ]; then - wait_for_wayland - else - # Disable the cursor when displaying at full screen on fbdev - echo "0" > /sys/class/graphics/fbcon/cursor_blink - fi + # Disable the cursor when displaying at full screen on fbdev + echo "0" > /sys/class/graphics/fbcon/cursor_blink # Launch demo - env ${DEMO_ENV} ${DEMO_PATH} >/dev/null 2>&1 & + env ${DEMO_PATH} >/dev/null 2>&1 & if [ $? -eq 0 ]; then echo $! > ${PID_FILE} diff --git a/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_9.3.0.bb b/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_9.3.0.bb index 347bb929a..2d0f97dae 100644 --- a/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_9.3.0.bb +++ b/meta-digi-dey/recipes-graphics/lvgl/lvgl-demo_9.3.0.bb @@ -42,9 +42,6 @@ inherit cmake systemd update-rc.d S = "${WORKDIR}/git" -LVGL_DEMO_ENV ?= "DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 WAYLAND_DISPLAY=\$\{DEMO_DISPLAY\}" -LVGL_DEMO_ENV:ccimx6ul ?= "" - do_configure:prepend() { if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then # Add libsdl build dependency, SDL2_image has no cmake file @@ -66,9 +63,6 @@ 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##@${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 }