From patchwork Tue May 9 02:43:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 23634 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98050C7EE25 for ; Tue, 9 May 2023 02:44:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by mx.groups.io with SMTP id smtpd.web10.6992.1683600256897231792 for ; Mon, 08 May 2023 19:44:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@denx.de header.s=phobos-20191101 header.b=jnFsi3Zn; spf=pass (domain: denx.de, ip: 85.214.62.61, mailfrom: marex@denx.de) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 0F90E8479C; Tue, 9 May 2023 04:44:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683600255; bh=8kyotzs9VAWrVJoj/FzuppPhpe/Sd5rLKNeLDHYKLxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jnFsi3Zn5Hhe7HLys8oiLyNfwsiKzBdSxdkHx5qnhmMro5m/jxS5FR+rLUSIGbB0O 8CK2jTbAcyGkwcc2ZmhRrQCkC7MK4O5A4JmVUdzuwpIcjVwJgylbRN/0FVgoob4akC rR+ihD9gADSgkkY+yhaXzHsiLZ5+tgExAvvsxvnCYzab/ithtbWpbYbD0se5jNTB5c F2AuaMGxu+Xe/I/+1CEecepSqTzlIlPk+T4DvWvIRxodzmpcHnKb1Ct8KIabvPcJ+u AgU54vJjoWaDndnOvlEv/bf9lvyFWUqN8FmH0yMmXi31W20Lv0LwPfrK13Zy2sYmdM Z8sSz3UZixrWQ== From: Marek Vasut To: openembedded-devel@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Khem Raj , Martin Jansa , Philippe Coval , Philippe Coval Subject: [meta-oe][PATCH v2 4/7] lvgl: Support both fbdev and wayland backends Date: Tue, 9 May 2023 04:43:52 +0200 Message-Id: <20230509024355.79006-4-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230509024355.79006-1-marex@denx.de> References: <20230509024355.79006-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 09 May 2023 02:44:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/102457 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 --- Cc: Fabio Estevam Cc: Khem Raj Cc: Martin Jansa Cc: Philippe Coval Cc: Philippe Coval --- V2: No change --- 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(-) 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 d9cde497c..a0a2ee0aa 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" 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" 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 a3fd7e04c..860ee7a33 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" 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"