Skip to contentSkip to conversation

lvgl: Upgrade lvgl to 8.3.7 and lv-driver to 8.3.0

PATCH Superseded Marek Vasut 2 participants 8 messages May 7, 2023 – May 9, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 lvgl: Upgrade lvgl to 8.3.7 and lv-driver to 8.3.0

Both the LVGL and lv-drivers are now available in 8.3.y release, upgrade both to latest 8.3.y release version in lock step. Also, lvgl contains no submodules, drop the gitsm fetcher use.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 .../lvgl/{lv-drivers_7.11.0.bb => lv-drivers_8.3.0.bb}       | 5 ++---
 .../recipes-graphics/lvgl/{lvgl_8.1.0.bb => lvgl_8.3.7.bb}   | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
 rename meta-oe/recipes-graphics/lvgl/{lv-drivers_7.11.0.bb => lv-drivers_8.3.0.bb} (89%)
 rename meta-oe/recipes-graphics/lvgl/{lvgl_8.1.0.bb => lvgl_8.3.7.bb} (89%)
meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb renamed from meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb +2 -3
similarity index 89%
rename from meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb
rename to meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb
index cf33c6904..d9cde497c 100644
@@ -8,9 +8,8 @@ DESCRIPTION = "Collection of drivers: SDL, framebuffer, wayland and more..."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2"
 
-# TODO: Pin upstream release (current v7.11.0-80-g419a757)
-SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;nobranch=1"
-SRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254"
+SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3"
+SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1"
 
 DEPENDS = "libxkbcommon lvgl wayland"
 
meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb +2 -2
similarity index 89%
rename from meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb
index ea74c5918..a82ab3b74 100644
@@ -8,8 +8,8 @@ SUMMARY = "Light and Versatile Graphics Library"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 
-SRC_URI = "gitsm://github.com/lvgl/lvgl;protocol=https;nobranch=1"
-SRCREV = "d38eb1e689fa5a64c25e677275172d9c8a4ab2f0"
+SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3"
+SRCREV = "2b56e04205481daa6575bd5f7ab5df59d11676eb"
 
 REQUIRED_DISTRO_FEATURES = "wayland"
 
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/5 lvgl: Activate custom tick implementation

Use a custom tick source that tells the elapsed time in milliseconds. It removes the need to manually update the tick with lv_tick_inc(). This is the behavior which ought to be used for LVGL running on Linux compared to LVGL running on microcontroller.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb +5 -0
index a82ab3b74..5f3fc44cf 100644
@@ -28,6 +28,11 @@ do_configure:prepend() {
     [ -r "${S}/lv_conf.h" ] \
         || sed -e 's|#if 0 .*Set it to "1" to enable .*|#if 1 // Enabled|g' \
 	    -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
+	    \
+	    -e "s|\(#define LV_TICK_CUSTOM \).*|\1 1|g" \
+	    -e "s|\(#define LV_TICK_CUSTOM_INCLUDE \).*|\1 <stdint.h>|g" \
+	    -e "s|\(#define LV_TICK_CUSTOM_SYS_TIME_EXPR \).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \
+	    \
             < "${S}/lv_conf_template.h" > "${S}/lv_conf.h"
 }
 
Signature · 1 line
2.39.2
#2 lore raw

PATCH 3/5 lvgl: Add configurable color depth, default to 32bpp

In reply to Marek Vasut

Make color depth configurable and default to 32bpp .

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb +3 -0
index 5f3fc44cf..a3fd7e04c 100644
@@ -20,6 +20,7 @@ EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}"
 S = "${WORKDIR}/git"
 
 LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
+LVGL_CONFIG_LV_COLOR_DEPTH ?= "32"
 
 # Upstream does not support a default configuration
 # but propose a default "disabled" template, which is used as reference
@@ -27,6 +28,8 @@ LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
 do_configure:prepend() {
     [ -r "${S}/lv_conf.h" ] \
         || sed -e 's|#if 0 .*Set it to "1" to enable .*|#if 1 // Enabled|g' \
+	    -e "s|\(#define LV_COLOR_DEPTH \).*|\1 ${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
+	    \
 	    -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
 	    \
 	    -e "s|\(#define LV_TICK_CUSTOM \).*|\1 1|g" \
Signature · 1 line
2.39.2
#3 lore raw

PATCH 4/5 lvgl: Support both fbdev and wayland backends

In reply to Marek Vasut

The LVGL can be operated on top of fbdev as well as on WL compositor. Support both, which is a matter of configuring lv-drivers package per required backend. Determine the backend from DISTRO_FEATURES, since both 'wayland' and 'fbdev' are valid DISTRO_FEATURES. Add a bit more sed hacking of the configuration, which enables either FBDEV or WL backend. One notable item here is the enablement of EVDEV support, which is required for FBDEV backend, so in case FBDEV is enabled, so is EVDEV.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb | 15 +++++++++++----
 meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb       |  3 ---
 2 files changed, 11 insertions(+), 7 deletions(-)
meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb +11 -4
index d9cde497c..a0a2ee0aa 100644
@@ -11,12 +11,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2"
 SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3"
 SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1"
 
-DEPENDS = "libxkbcommon lvgl wayland"
+DEPENDS = "lvgl"
 
-REQUIRED_DISTRO_FEATURES = "wayland"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland fbdev', d)}"
+PACKAGECONFIG[fbdev] = ",,"
+PACKAGECONFIG[wayland] = ",,libxkbcommon wayland"
+LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}"
+LVGL_CONFIG_USE_WAYLAND = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', '1', '0', d)}"
 
 inherit cmake
-inherit features_check
 
 S = "${WORKDIR}/git"
 
@@ -34,7 +37,11 @@ TARGET_CFLAGS += "-I${STAGING_INCDIR}/lvgl"
 do_configure:append() {
     [ -r "${S}/lv_drv_conf.h" ] \
         || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \
-               -e "s|#  define USE_WAYLAND       0|#  define USE_WAYLAND       1|g" \
+	       \
+               -e "s|\(^#  define USE_FBDEV \).*|#  define USE_FBDEV ${LVGL_CONFIG_USE_FBDEV}|g" \
+               -e "s|\(^#  define USE_EVDEV \).*|#  define USE_EVDEV ${LVGL_CONFIG_USE_FBDEV}|g" \
+	       \
+               -e "s|\(^#  define USE_WAYLAND \).*|#  define USE_WAYLAND ${LVGL_CONFIG_USE_WAYLAND}|g" \
 	       -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \
  	       -e "s|\(^ *# *define *WAYLAND_VER_RES *\).*|\1${LVGL_CONFIG_WAYLAND_VER_RES}|g" \
           < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h"
meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb +0 -3
index a3fd7e04c..860ee7a33 100644
@@ -11,10 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3"
 SRCREV = "2b56e04205481daa6575bd5f7ab5df59d11676eb"
 
-REQUIRED_DISTRO_FEATURES = "wayland"
-
 inherit cmake
-inherit features_check
 
 EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}"
 S = "${WORKDIR}/git"
Signature · 1 line
2.39.2
#4 lore raw

PATCH 5/5 lvgl: Upgrade lvgl-demo-fb to 8.3 and decouple from submodules

In reply to Marek Vasut

The lvgl-demo-fb really contains its own copy of lvgl and lv-drivers, for which meta-openembedded already contains its own recipes. Stop pulling those as git submodules and instead only pull the example application, and compile it against the lvgl and lv-drivers from local recipes.

Upgrade the lvgl-demo-fb to 8.3.0 to match the lvgl and lv-drivers too.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 .../lvgl/{lvgl-demo-fb.bb => lvgl-demo-fb_8.3.0.bb}         | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-graphics/lvgl/{lvgl-demo-fb.bb => lvgl-demo-fb_8.3.0.bb} (72%)
meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb.bb +4 -2
similarity index 72%
rename from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb
index 3430c2491..6d9ff89f5 100644
@@ -5,8 +5,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=802d3d83ae80ef5f343050bf96cce3a4 \
                     file://lv_drivers/LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2 \
                     file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 
-SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
-SRCREV = "dd010430b959f40b8f25a51c76bc920cbc2550cc"
+DEPENDS = "lvgl lv-drivers"
+
+SRC_URI = "git://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
+SRCREV = "adf2c4490e17a1b9ec1902cc412a24b3b8235c8e"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.39.2
#5 lore raw

Re: [meta-oe][PATCH 5/5] lvgl: Upgrade lvgl-demo-fb to 8.3 and decouple from submodules

there is license mismatch perhaps as seen in this build

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2727

Quoted 44 lines · Marek Vasut

The lvgl-demo-fb really contains its own copy of lvgl and lv-drivers, for which meta-openembedded already contains its own recipes. Stop pulling those as git submodules and instead only pull the example application, and compile it against the lvgl and lv-drivers from local recipes.

Upgrade the lvgl-demo-fb to 8.3.0 to match the lvgl and lv-drivers too.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 .../lvgl/{lvgl-demo-fb.bb => lvgl-demo-fb_8.3.0.bb}         | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-graphics/lvgl/{lvgl-demo-fb.bb => lvgl-demo-fb_8.3.0.bb} (72%)
meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb.bb +4 -3
similarity index 72%
rename from meta-oe/recipes-graphics/lvgl/lvgl-demo-fb.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb
index 3430c2491..6d9ff89f5 100644
@@ -5,8 +5,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=802d3d83ae80ef5f343050bf96cce3a4 \
                     file://lv_drivers/LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2 \
                     file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 
-SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
-SRCREV = "dd010430b959f40b8f25a51c76bc920cbc2550cc"
+DEPENDS = "lvgl lv-drivers"
+
+SRC_URI = "git://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https"
+SRCREV = "adf2c4490e17a1b9ec1902cc412a24b3b8235c8e"
 
 S = "${WORKDIR}/git"
 
--

2.39.2

#6 lore raw

Re: [meta-oe][PATCH 5/5] lvgl: Upgrade lvgl-demo-fb to 8.3 and decouple from submodules

Quoted 3 lines · Khem Raj

there is license mismatch perhaps as seen in this build

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2727

I just sent a bunch of additional patches, sorry for the mess.

I managed to fix the dialog-lvgl , but that code seems unmaintained, so maybe we should drop it.

I partly rolled back the lvgl-demo-fb switch away from submodules, as I don't really know how to deal with this one quickly. It basically requires custom configuration of LVGL only for the sake of pulling in example widgets, which used to be in (now unmaintained) repo, but now are in LVGL proper, except they need to be enabled and built in, which for regular LVGL applications seem like the wrong default.

#7 lore raw
In reply to Marek Vasut

I am seeing a build failure across multiple builds with clang.

https://errors.yoctoproject.org/Errors/Details/703557/
https://errors.yoctoproject.org/Errors/Details/703481/

Quoted 59 lines · Marek Vasut

Both the LVGL and lv-drivers are now available in 8.3.y release, upgrade both to latest 8.3.y release version in lock step. Also, lvgl contains no submodules, drop the gitsm fetcher use.

---
Cc: Fabio Estevam <[email protected]>
Cc: Khem Raj <[email protected]>
Cc: Martin Jansa <[email protected]>
Cc: Philippe Coval <[email protected]>
Cc: Philippe Coval <[email protected]>

---
 .../lvgl/{lv-drivers_7.11.0.bb => lv-drivers_8.3.0.bb}       | 5 ++---
 .../recipes-graphics/lvgl/{lvgl_8.1.0.bb => lvgl_8.3.7.bb}   | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
 rename meta-oe/recipes-graphics/lvgl/{lv-drivers_7.11.0.bb => lv-drivers_8.3.0.bb} (89%)
 rename meta-oe/recipes-graphics/lvgl/{lvgl_8.1.0.bb => lvgl_8.3.7.bb} (89%)
meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb renamed from meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb +2 -3
similarity index 89%
rename from meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb
rename to meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb
index cf33c6904..d9cde497c 100644
@@ -8,9 +8,8 @@ DESCRIPTION = "Collection of drivers: SDL, framebuffer, wayland and more..."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2"
 
-# TODO: Pin upstream release (current v7.11.0-80-g419a757)
-SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;nobranch=1"
-SRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254"
+SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3"
+SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1"
 
 DEPENDS = "libxkbcommon lvgl wayland"
 
meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb renamed from meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb +2 -3
similarity index 89%
rename from meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb
rename to meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb
index ea74c5918..a82ab3b74 100644
@@ -8,8 +8,8 @@ SUMMARY = "Light and Versatile Graphics Library"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 
-SRC_URI = "gitsm://github.com/lvgl/lvgl;protocol=https;nobranch=1"
-SRCREV = "d38eb1e689fa5a64c25e677275172d9c8a4ab2f0"
+SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3"
+SRCREV = "2b56e04205481daa6575bd5f7ab5df59d11676eb"
 
 REQUIRED_DISTRO_FEATURES = "wayland"
 
--

2.39.2