Skip to contentSkip to conversation

lvgl: update 9.5.0 -> 9.6.0

PATCH New Thorsten Schmelzer 1 participant 6 messages Oct 8

lore
Share & tools
lore
#0 lore raw

cover lvgl: update 9.5.0 -> 9.6.0

This series updates lvgl and lvgl-demo-fb series to the latest 9.6.0 version. The defconfigs for both recipes are also updated and a wayland packageconfig is added.

Thorsten Schmelzer (5):
lvgl: Update to 9.6.0
lvgl: Update defconfig
lvgl: lv-conf.inc: add wayland packageconfig
lvgl-demo-fb: Update to 9.6.0
lvgl-demo-fb: update defconfig

 ...rate-proper-.so-links-when-installin.patch | 71 +++++++++++++++++++
 meta-oe/recipes-graphics/lvgl/files/defconfig |  7 ++
 .../recipes-graphics/lvgl/files/wayland.cfg   |  1 +
 meta-oe/recipes-graphics/lvgl/lv-conf.inc     | 11 ++-
 .../lvgl/lvgl-demo-fb/defconfig               | 33 ++++++++-
 ...demo-fb_9.5.0.bb => lvgl-demo-fb_9.6.0.bb} | 10 ++-
 .../lvgl/{lvgl_9.5.0.bb => lvgl_9.6.0.bb}     |  8 ++-
 7 files changed, 124 insertions(+), 17 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/lvgl/files/0001-build-cmake-generate-proper-.so-links-when-installin.patch
 create mode 100644 meta-oe/recipes-graphics/lvgl/files/wayland.cfg
 rename meta-oe/recipes-graphics/lvgl/{lvgl-demo-fb_9.5.0.bb => lvgl-demo-fb_9.6.0.bb} (79%)
 rename meta-oe/recipes-graphics/lvgl/{lvgl_9.5.0.bb => lvgl_9.6.0.bb} (71%)
#1 lore raw

PATCH 1/5 lvgl: Update to 9.6.0

Add pkgconfig inherit and drop manually adding include paths to CFLAGS and CXXFLAGS. The lvgl cmake can handle this meanwhile.

Add a patch to fix missing version and links for installed .so files.

---
 ...rate-proper-.so-links-when-installin.patch | 71 +++++++++++++++++++
 meta-oe/recipes-graphics/lvgl/lv-conf.inc     |  7 --
 .../lvgl/{lvgl_9.5.0.bb => lvgl_9.6.0.bb}     |  8 ++-
 3 files changed, 76 insertions(+), 10 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/lvgl/files/0001-build-cmake-generate-proper-.so-links-when-installin.patch
 rename meta-oe/recipes-graphics/lvgl/{lvgl_9.5.0.bb => lvgl_9.6.0.bb} (71%)
meta-oe/recipes-graphics/lvgl/files/0001-build-cmake-generate-proper-.so-links-when-installin.patch new file +71 -0
new file mode 100644
index 000000000000..07e6557cb72d
@@ -0,0 +1,71 @@
+From a9841c03f4670d1b0373cb869573740df92cd1cf Mon Sep 17 00:00:00 2001
+From: Thorsten Schmelzer <[email protected]>
+Date: Tue, 6 Oct 2026 11:58:15 +0200
+Subject: [PATCH] build(cmake): generate proper .so links when installing
+ shared library
+
+Commit 789d453 removed the set_target_properties sections for the
+library installations. That results in only the plain liblvgl.so being
+installed in the install location, when building a shared library.
+Other package and build systems (like yocto), however expect to have a
+proper versioned library and links like this:
+liblvgl.so -> liblvgl.so.9
+liblvgl.so.9 -> liblvgl.so.9.6.0
+liblvgl.so.9.6.0
+
+Fix this by setting VERSION and SOVERSION in set_target_properties
+for lvgl, lvgl_demos and lvgl_examples library targets.
+
+Upstream-Status: Backport [8df3de9c4c5e45ad7b0fef5adc2fa6eaa5d21579]
+
+Signed-off-by: Thorsten Schmelzer <[email protected]>
+---
+ env_support/cmake/install.cmake | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/env_support/cmake/install.cmake b/env_support/cmake/install.cmake
+index cb647af9ea9b..93a0272f81c8 100644
+--- a/env_support/cmake/install.cmake
++++ b/env_support/cmake/install.cmake
+@@ -91,6 +91,13 @@ install(
+     DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/lvgl"
+ )
+ 
++set_target_properties(
++    lvgl
++    PROPERTIES OUTPUT_NAME lvgl
++    VERSION ${LVGL_VERSION}
++    SOVERSION ${LVGL_SOVERSION}
++)
++
+ install(TARGETS lvgl
+     EXPORT lvglTargets
+     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -132,6 +139,13 @@ if(CONFIG_LV_BUILD_DEMOS)
+         FILES_MATCHING PATTERN "*.h"
+     )
+ 
++    set_target_properties(
++        lvgl_demos
++        PROPERTIES OUTPUT_NAME lvgl_demos
++        VERSION ${LVGL_VERSION}
++        SOVERSION ${LVGL_SOVERSION}
++    )
++
+     # Demo library target (if you build one)
+     install(TARGETS lvgl_demos
+ 	EXPORT lvglDemosTargets
+@@ -155,6 +169,13 @@ if(CONFIG_LV_BUILD_EXAMPLES)
+         FILES_MATCHING PATTERN "*.h"
+     )
+ 
++    set_target_properties(
++        lvgl_examples
++        PROPERTIES OUTPUT_NAME lvgl_examples
++        VERSION ${LVGL_VERSION}
++        SOVERSION ${LVGL_SOVERSION}
++    )
++
+     install(TARGETS lvgl_examples
+ 	EXPORT lvglExamplesTargets
+         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
meta-oe/recipes-graphics/lvgl/lv-conf.inc +0 -7
index 4264f20895de..84115b68cc51 100644
@@ -27,13 +27,6 @@ inherit cml1 python3native
 
 EXTRA_OECMAKE += "-DLV_BUILD_USE_KCONFIG=ON"
 
-LVGL_FLAGS += " \
-    ${@bb.utils.contains('PACKAGECONFIG', 'drm', '-I${STAGING_INCDIR}/libdrm', '', d)} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'freetype', '-I${STAGING_INCDIR}/freetype2', '', d)} \
-"
-CFLAGS += "${LVGL_FLAGS}"
-CXXFLAGS += "${LVGL_FLAGS}"
-
 KCONFIG_CONFIG_ROOTDIR ?= "${S}"
 KCONFIG_FILE ?= "${KCONFIG_CONFIG_ROOTDIR}/Kconfig"
 export KCONFIG_CONFIG ?= "${KCONFIG_CONFIG_ROOTDIR}/.config"
meta-oe/recipes-graphics/lvgl/lvgl_9.6.0.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl_9.5.0.bb +5 -3
similarity index 71%
rename from meta-oe/recipes-graphics/lvgl/lvgl_9.5.0.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl_9.6.0.bb
index 18a5b5de5160..260ea094e68c 100644
@@ -9,11 +9,13 @@ HOMEPAGE = "https://lvgl.io/"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=4570b6241b4fced1d1d18eb691a0e083"
 
-SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.5;tag=v9.5.0"
+SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.6;tag=v9.6.0 \
+           file://0001-build-cmake-generate-proper-.so-links-when-installin.patch \
+           "
 
-SRCREV = "85aa60d18b3d5e5588d7b247abf90198f07c8a63"
+SRCREV = "80ca777e37a2b176770726a02e07a6fb79ef0b39"
 
-inherit cmake
+inherit cmake pkgconfig
 
 EXTRA_OECMAKE += "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
 
#2 lore raw

PATCH 2/5 lvgl: Update defconfig

In reply to Thorsten Schmelzer

Update the defconfig to use Linux default settings. Settings are taken from the linux.defconfig from the source repository. This includes the following changes:
- use libc based malloc, string, sprintf. Using libc based memory allocation eliminates the risk that the lvgl application runs out of memory because of fixed internal memory size.
- use OS based pthread implementation
- set refresh period to 16 ms (60 FPS max)
- increase LV_DRAW_LAYER_SIMPLE_BUF_SIZE and CONFIG_LV_DRAW_THREAD_STACK_SIZE

---
 meta-oe/recipes-graphics/lvgl/files/defconfig | 7 +++++++
 1 file changed, 7 insertions(+)
meta-oe/recipes-graphics/lvgl/files/defconfig +7 -0
index 088b2369e957..3d0260f1f451 100644
@@ -1,3 +1,10 @@
+CONFIG_LV_USE_CLIB_MALLOC=y
+CONFIG_LV_USE_CLIB_STRING=y
+CONFIG_LV_USE_CLIB_SPRINTF=y
+CONFIG_LV_OS_PTHREAD=y
 CONFIG_LV_COLOR_DEPTH_32=y
+CONFIG_LV_DEF_REFR_PERIOD=16
+CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE=262144
+CONFIG_LV_DRAW_THREAD_STACK_SIZE=65536
 # CONFIG_LV_BUILD_EXAMPLES is not set
 # CONFIG_LV_BUILD_DEMOS is not set
#3 lore raw

PATCH 3/5 lvgl: lv-conf.inc: add wayland packageconfig

In reply to Thorsten Schmelzer

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.

---
 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
meta-oe/recipes-graphics/lvgl/files/wayland.cfg new file +1 -0
new file mode 100644
index 000000000000..0d18cd9df6eb
@@ -0,0 +1 @@
+CONFIG_LV_USE_WAYLAND=y
meta-oe/recipes-graphics/lvgl/lv-conf.inc +6 -0
index 84115b68cc51..073da087b45a 100644
@@ -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"
#4 lore raw

PATCH 4/5 lvgl-demo-fb: Update to 9.6.0

In reply to Thorsten Schmelzer

Drop setting KCONFIG_CONFIG_ROOTDIR to the lvgl subfolder. The demo repo has now its own Kconfig file.

---
 .../{lvgl-demo-fb_9.5.0.bb => lvgl-demo-fb_9.6.0.bb}   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
 rename meta-oe/recipes-graphics/lvgl/{lvgl-demo-fb_9.5.0.bb => lvgl-demo-fb_9.6.0.bb} (79%)
meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.6.0.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.5.0.bb +4 -6
similarity index 79%
rename from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.5.0.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.6.0.bb
index cd6441ded701..1389fa958ac7 100644
@@ -10,12 +10,12 @@ DEPENDS = "python3-pcpp-native"
 PV .= "+git"
 
 SRC_URI = "\
-    git://github.com/lvgl/lv_port_linux_frame_buffer.git;protocol=https;branch=release/v9.5;name=demo \
-    git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.5;tag=v9.5.0;name=lvgl;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/lvgl \
+    git://github.com/lvgl/lv_port_linux_frame_buffer.git;protocol=https;branch=release/v9.6;name=demo \
+    git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.6;tag=v9.6.0;name=lvgl;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/lvgl \
 "
 
-SRCREV_demo = "045137cf0fa1781483cb796261a11b5eb21e99d9"
-SRCREV_lvgl = "85aa60d18b3d5e5588d7b247abf90198f07c8a63"
+SRCREV_demo = "0728bc4eff0ff85ef787db3f557a654c5c7c9c41"
+SRCREV_lvgl = "80ca777e37a2b176770726a02e07a6fb79ef0b39"
 SRCREV_FORMAT = "demo_lvgl"
 # The version check runs against the first SRC_URI (the demo repo), whose tags
 # are "vX.Y.Z" but top out at v9.2.2 -- below PV 9.5.0+git, which follows the
@@ -28,8 +28,6 @@ inherit cmake pkgconfig
 
 require lv-conf.inc
 
-KCONFIG_CONFIG_ROOTDIR = "${S}/lvgl"
-
 do_install() {
     install -d ${D}${bindir}
     install -m 0755 ${B}/bin/lvglsim ${D}${bindir}
#5 lore raw

PATCH 5/5 lvgl-demo-fb: update defconfig

In reply to Thorsten Schmelzer

Update the defconfig to use more linux default settings. Most settings are imported from the get_started.defconfig from the source repository. This includes the following changes:
- use libc based malloc, string, sprintf
- use OS based pthread implementation
- include fonts
- include performance monitor
- remove CONFIG_LV_MEM_SIZE_KILOBYTES, not necessary when using libc memory management
- set refresh period to 16 ms (60 FPS max)
- increase LV_DRAW_LAYER_SIMPLE_BUF_SIZE and LV_DRAW_THREAD_STACK_SIZE

---
 .../lvgl/lvgl-demo-fb/defconfig               | 33 +++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)
meta-oe/recipes-graphics/lvgl/lvgl-demo-fb/defconfig +31 -2
index 9d4ffa9b40c9..f85f5895a438 100644
@@ -1,6 +1,35 @@
+CONFIG_LV_USE_CLIB_MALLOC=y
+CONFIG_LV_USE_CLIB_STRING=y
+CONFIG_LV_USE_CLIB_SPRINTF=y
+CONFIG_LV_OS_PTHREAD=y
 CONFIG_LV_COLOR_DEPTH_32=y
-CONFIG_LV_MEM_SIZE_KILOBYTES=256
 CONFIG_LV_USE_LOG=y
 CONFIG_LV_LOG_PRINTF=y
-CONFIG_LV_USE_FONT_COMPRESSED=y
+CONFIG_LV_FONT_MONTSERRAT_8=y
+CONFIG_LV_FONT_MONTSERRAT_10=y
+CONFIG_LV_FONT_MONTSERRAT_12=y
+CONFIG_LV_FONT_MONTSERRAT_16=y
+CONFIG_LV_FONT_MONTSERRAT_18=y
+CONFIG_LV_FONT_MONTSERRAT_20=y
+CONFIG_LV_FONT_MONTSERRAT_22=y
+CONFIG_LV_FONT_MONTSERRAT_24=y
+CONFIG_LV_FONT_MONTSERRAT_26=y
+CONFIG_LV_FONT_MONTSERRAT_28=y
+CONFIG_LV_FONT_MONTSERRAT_30=y
+CONFIG_LV_FONT_MONTSERRAT_32=y
+CONFIG_LV_FONT_MONTSERRAT_34=y
+CONFIG_LV_FONT_MONTSERRAT_36=y
+CONFIG_LV_FONT_MONTSERRAT_38=y
+CONFIG_LV_FONT_MONTSERRAT_40=y
+CONFIG_LV_FONT_MONTSERRAT_42=y
+CONFIG_LV_FONT_MONTSERRAT_44=y
+CONFIG_LV_FONT_MONTSERRAT_46=y
+CONFIG_LV_FONT_MONTSERRAT_48=y
+CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED=y
+CONFIG_LV_USE_SYSMON=y
+CONFIG_LV_SYSMON_PROC_IDLE_AVAILABLE=y
+CONFIG_LV_USE_PERF_MONITOR=y
 CONFIG_LV_USE_DEMO_WIDGETS=y
+CONFIG_LV_DEF_REFR_PERIOD=16
+CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE=262144
+CONFIG_LV_DRAW_THREAD_STACK_SIZE=65536