diff options
| author | Marek Vasut <marex@denx.de> | 2023-05-09 04:43:52 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-05-09 10:12:44 -0700 |
| commit | dbf8086926100904a0b4bb125592c70fe8708864 (patch) | |
| tree | e36f31f914e0616128c37d6e8895f4d88a63d874 | |
| parent | 1278e8cfcab28219136bc7ee7e12fd6460f11985 (diff) | |
| download | meta-openembedded-dbf8086926100904a0b4bb125592c70fe8708864.tar.gz | |
lvgl: Support both fbdev and wayland backends
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.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb | 15 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb | 3 |
2 files changed, 11 insertions, 7 deletions
diff --git a/meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb b/meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb index d9cde497c9..a0a2ee0aa9 100644 --- a/meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lv-drivers_8.3.0.bb | |||
| @@ -11,12 +11,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2" | |||
| 11 | SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3" | 11 | SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3" |
| 12 | SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1" | 12 | SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1" |
| 13 | 13 | ||
| 14 | DEPENDS = "libxkbcommon lvgl wayland" | 14 | DEPENDS = "lvgl" |
| 15 | 15 | ||
| 16 | REQUIRED_DISTRO_FEATURES = "wayland" | 16 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland fbdev', d)}" |
| 17 | PACKAGECONFIG[fbdev] = ",," | ||
| 18 | PACKAGECONFIG[wayland] = ",,libxkbcommon wayland" | ||
| 19 | LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}" | ||
| 20 | LVGL_CONFIG_USE_WAYLAND = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', '1', '0', d)}" | ||
| 17 | 21 | ||
| 18 | inherit cmake | 22 | inherit cmake |
| 19 | inherit features_check | ||
| 20 | 23 | ||
| 21 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
| 22 | 25 | ||
| @@ -34,7 +37,11 @@ TARGET_CFLAGS += "-I${STAGING_INCDIR}/lvgl" | |||
| 34 | do_configure:append() { | 37 | do_configure:append() { |
| 35 | [ -r "${S}/lv_drv_conf.h" ] \ | 38 | [ -r "${S}/lv_drv_conf.h" ] \ |
| 36 | || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ | 39 | || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ |
| 37 | -e "s|# define USE_WAYLAND 0|# define USE_WAYLAND 1|g" \ | 40 | \ |
| 41 | -e "s|\(^# define USE_FBDEV \).*|# define USE_FBDEV ${LVGL_CONFIG_USE_FBDEV}|g" \ | ||
| 42 | -e "s|\(^# define USE_EVDEV \).*|# define USE_EVDEV ${LVGL_CONFIG_USE_FBDEV}|g" \ | ||
| 43 | \ | ||
| 44 | -e "s|\(^# define USE_WAYLAND \).*|# define USE_WAYLAND ${LVGL_CONFIG_USE_WAYLAND}|g" \ | ||
| 38 | -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \ | 45 | -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \ |
| 39 | -e "s|\(^ *# *define *WAYLAND_VER_RES *\).*|\1${LVGL_CONFIG_WAYLAND_VER_RES}|g" \ | 46 | -e "s|\(^ *# *define *WAYLAND_VER_RES *\).*|\1${LVGL_CONFIG_WAYLAND_VER_RES}|g" \ |
| 40 | < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" | 47 | < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" |
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb b/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb index a3fd7e04cb..860ee7a33e 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb | |||
| @@ -11,10 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" | |||
| 11 | SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3" | 11 | SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3" |
| 12 | SRCREV = "2b56e04205481daa6575bd5f7ab5df59d11676eb" | 12 | SRCREV = "2b56e04205481daa6575bd5f7ab5df59d11676eb" |
| 13 | 13 | ||
| 14 | REQUIRED_DISTRO_FEATURES = "wayland" | ||
| 15 | |||
| 16 | inherit cmake | 14 | inherit cmake |
| 17 | inherit features_check | ||
| 18 | 15 | ||
| 19 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}" | 16 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}" |
| 20 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
