From 8ae75b7ad68a64840cd516f7b1aba11ec0c266bd Mon Sep 17 00:00:00 2001 From: Thorsten Schmelzer Date: Thu, 8 Oct 2026 12:06:24 +0200 Subject: [PATCH] lvgl: lv-conf.inc: add wayland packageconfig Add the possibility to use wayland as lvgl backend. Add a config snippet to enable wayland and add the necessary dependencies. The lvgl cmake needs SYSROOT to be set to RECIPE_SYSROOT to find the wayland protocols. Signed-off-by: Thorsten Schmelzer Signed-off-by: Khem Raj --- meta-oe/recipes-graphics/lvgl/files/wayland.cfg | 1 + meta-oe/recipes-graphics/lvgl/lv-conf.inc | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 meta-oe/recipes-graphics/lvgl/files/wayland.cfg diff --git a/meta-oe/recipes-graphics/lvgl/files/wayland.cfg b/meta-oe/recipes-graphics/lvgl/files/wayland.cfg new file mode 100644 index 0000000000..0d18cd9df6 --- /dev/null +++ b/meta-oe/recipes-graphics/lvgl/files/wayland.cfg @@ -0,0 +1 @@ +CONFIG_LV_USE_WAYLAND=y diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc index 84115b68cc..073da087b4 100644 --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc @@ -12,6 +12,7 @@ SRC_URI += " \ ${@bb.utils.contains('PACKAGECONFIG', 'gridnav', 'file://gridnav.cfg', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'file://sdl.cfg', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'thorvg', 'file://thorvg.cfg', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'wayland', 'file://wayland.cfg', '', d)} \ " PACKAGECONFIG ??= "drm" @@ -22,11 +23,16 @@ PACKAGECONFIG[freetype] = ",,freetype" PACKAGECONFIG[gridnav] = ",," PACKAGECONFIG[thorvg] = ",," PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" +PACKAGECONFIG[wayland] = ",,wayland wayland-protocols wayland-native libxkbcommon" inherit cml1 python3native EXTRA_OECMAKE += "-DLV_BUILD_USE_KCONFIG=ON" +# needed for finding wayland protocols +export SYSROOT +SYSROOT = "${RECIPE_SYSROOT}" + KCONFIG_CONFIG_ROOTDIR ?= "${S}" KCONFIG_FILE ?= "${KCONFIG_CONFIG_ROOTDIR}/Kconfig" export KCONFIG_CONFIG ?= "${KCONFIG_CONFIG_ROOTDIR}/.config"