From a3927c0306716ed17da0f59bdca9f33fbe68454f Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Fri, 27 Feb 2026 15:03:08 +0100 Subject: [PATCH] lvgl: lv-conf.inc: include wayland backend support This is mostly logic to convert the backend configured in the PACKAGECONFIG to the lv_conf.h file, based on the DEY 4.0 version of the recipe. Add weston as a runtime dependency to make sure the final image has a wayland compositor and recover DEY 4.0's mechanism to fall back to a minimal backend if wayland is missing from DISTRO_FEATURES Use the wayland backend by default in all platforms except the ccimx6ul https://onedigi.atlassian.net/browse/DEL-9925 Signed-off-by: Gabriel Valcazar --- meta-digi-dey/recipes-graphics/lvgl/lv-conf.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/recipes-graphics/lvgl/lv-conf.inc b/meta-digi-dey/recipes-graphics/lvgl/lv-conf.inc index e2d90864e..05ac19755 100644 --- a/meta-digi-dey/recipes-graphics/lvgl/lv-conf.inc +++ b/meta-digi-dey/recipes-graphics/lvgl/lv-conf.inc @@ -1,14 +1,16 @@ -# By default, use drm backend if possible. +# By default, use wayland backend if possible. # If unavailable, fall back to a secondary backend -PACKAGECONFIG ?= "drm" -PACKAGECONFIG:ccimx6ul = "fbdev" -PACKAGECONFIG:ccimx6 = "fbdev" +MINIMAL_LVGL_BACKEND ?= "drm" +MINIMAL_LVGL_BACKEND:ccimx6 = "fbdev" +MINIMAL_LVGL_BACKEND:ccimx6ul = "fbdev" +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '${MINIMAL_LVGL_BACKEND}', d)}" PACKAGECONFIG[drm] = ",,libdrm" PACKAGECONFIG[fbdev] = ",," PACKAGECONFIG[gridnav] = ",," PACKAGECONFIG[thorvg] = ",," PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" +PACKAGECONFIG[wayland] = ",,libxkbcommon wayland wayland-native,weston weston-init" # Add libdrm include if drm is selected in PACKAGECONFIG TARGET_CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'drm', '-I${STAGING_INCDIR}/libdrm', '', d)}" @@ -21,6 +23,8 @@ LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0' LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)}" +LVGL_CONFIG_USE_WAYLAND = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', '1', '0', d)}" + LVGL_CONFIG_SDL_FULLSCREEN ?= "0" LVGL_CONFIG_LV_MEM_CUSTOM ?= "0" @@ -68,6 +72,8 @@ do_configure:append() { -e "s|^([[:space:]]*#define LV_SDL_BUF_COUNT[[:space:]]).*|\1 2|" \ -e "s|^([[:space:]]*#define LV_SDL_FULLSCREEN[[:space:]]).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|" \ \ + -e "s|^([[:space:]]*#define LV_USE_WAYLAND[[:space:]]).*|\1${LVGL_CONFIG_USE_WAYLAND}|" \ + \ -e "s|^([[:space:]]*#define LV_COLOR_DEPTH[[:space:]]).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|" \ -e "s|^([[:space:]]*#define LV_MEM_CUSTOM[[:space:]]).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|" \ -e "s|^([[:space:]]*#define LV_MEM_SIZE[[:space:]]).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|" \