> -----Original Message-----
> From: [email protected] <[email protected]> On Behalf
> Of Bartosz Golaszewski
> Sent: Tuesday, November 9, 2021 10:43 PM
> To: [email protected]
> Cc: Bartosz Golaszewski <[email protected]>; Eilís Ní
> Fhlannagáin <[email protected]>
> Subject: [yocto] [meta-zephyr][PATCH v2 4/4] zephyr-lvgl: new recipe
>
> From: Bartosz Golaszewski <[email protected]>
>
> This adds a recipe for building the lvgl sample from mainline zephyr source.
> We need to include one upstream patch that fixes a build problem with lvgl
> and pull in two other modules or otherwise the default config will fail to
> build. Currently only the nordic reference devkit for
> nrf52840 is supported.
>
> Big thanks to Eilís Ní Fhlannagáin <[email protected]> for
> helping me with that.
>
> Signed-off-by: Bartosz Golaszewski <[email protected]>
> Signed-off-by: Eilís Ní Fhlannagáin <[email protected]>
> ---
> ...0001-cmake-added-missing-file-ext-to.patch | 42 +++++++++++++++++++
> .../zephyr-kernel/zephyr-kernel-common.inc | 1 +
> .../zephyr-kernel/zephyr-kernel-src-2.6.1.inc | 3 ++ .../zephyr-
> kernel/zephyr-kernel-src-2.7.0.inc | 3 ++
> .../zephyr-kernel/zephyr-kernel-src.inc | 3 ++
> recipes-kernel/zephyr-kernel/zephyr-lvgl.bb | 11 +++++
> 6 files changed, 63 insertions(+)
> create mode 100644 recipes-kernel/zephyr-kernel/files/0001-cmake-added-
> missing-file-ext-to.patch
> create mode 100644 recipes-kernel/zephyr-kernel/zephyr-lvgl.bb
>
> diff --git a/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-
> file-ext-to.patch b/recipes-kernel/zephyr-kernel/files/0001-cmake-added-
> missing-file-ext-to.patch
> new file mode 100644
> index 0000000..6aeca14
> --- /dev/null
> +++ b/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-file-e
> +++ xt-to.patch
> @@ -0,0 +1,42 @@
> +From 783c1f78c8e39751fe89d0883c8bce7336f55e94 Mon Sep 17 00:00:00
> 2001
> +From: Torsten Rasmussen <[email protected]>
> +Date: Thu, 19 Aug 2021 08:53:00 +0200
> +Subject: [PATCH] cmake: added missing file ext to
> +lv_font_dejavu_16_persian_hebrew.c
> +
> +CMake >= 3.20 requires file extensions explicitly added to source files.
> +
> +See CMP0115:
> +> Starting in CMake 3.20, CMake prefers all source files to have their
> +> extensions explicitly listed:
> +
> +In the CMakeLists.txt, the file lv_font_dejavu_16_persian_hebrew.c
> +was added without its .c extension, causing never CMakes ti fail
> +discovering the file.
> +
> +This has been fixed by correctly add the file as:
> +lv_font_dejavu_16_persian_hebrew.c
> +
> +Signed-off-by: Torsten Rasmussen <[email protected]>
> +---
> +Upstream-status: Accepted
> +
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt index 57b07c84..0f433edc
> +100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -58,7 +58,7 @@ zephyr_library_sources(
> + src/lv_misc/lv_utils.c
> +
> + src/lv_font/lv_font.c
> +- src/lv_font/lv_font_dejavu_16_persian_hebrew
> ++ src/lv_font/lv_font_dejavu_16_persian_hebrew.c
> + src/lv_font/lv_font_fmt_txt.c
> + src/lv_font/lv_font_loader.c
> + src/lv_font/lv_font_montserrat_12.c
> +--
> +Gitee
> +
> diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
> b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
> index 5ae7504..04eb72b 100644
> --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
> +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
> @@ -31,6 +31,7 @@ ZEPHYR_MODULES:append:arm =
> "\;${S}/modules/cmsis"
> ZEPHYR_MODULES:append:nordic = "\;${S}/modules/hal/nordic"
> ZEPHYR_MODULES:append:stm32 = "\;${S}/modules/hal/stm32"
> ZEPHYR_MODULES:append:openamp = "\;${S}/modules/lib/open-
> amp\;${S}/modules/hal/libmetal"
> +ZEPHYR_MODULES:append:zsegger = "\;${S}/modules/debug/segger"
[Naveen] zsegger is not defined as override, it causing build failure. If
module is required only for lvgl sample, it can move into sample recipe !
|
build/tmp-newlib/work/armv7m-yocto-eabi/zephyr-lvgl/2.7.0+gitAUTOINC+3f826560aa_b0612c97c1-r0/git/subsys/logging/log_backend_rtt.c:12:10:
fatal error: SEGGER_RTT.h: No such file or directory
| 12 | #include <SEGGER_RTT.h>
| | ^~~~~~~~~~~~~~
| compilation terminated.
It can be checked with $ bitbake zephyr-lvgl -e | grep ^ZEPHYR_MODULES=
>
> EXTRA_OECMAKE:append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
>
> diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc
> b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc
> index 9f28df7..a7289f1 100644
> --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc
> +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc
> @@ -2,12 +2,15 @@ SRCREV_FORMAT = "default_cmsis"
> SRCREV_cmsis = "c3bd2094f92d574377f7af2aec147ae181aa5f8e"
> SRCREV_default = "2d6322d74aaac838ead46bfcba0db619cff4b534"
> SRCREV_libmetal = "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb"
> +SRCREV_lvgl = "31acbaa36e9e74ab88ac81e3d21e7f1d00a71136"
> SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7"
> SRCREV_nordic = "574493fe29c79140df4827ab5d4a23df79d03681"
> SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef"
> SRCREV_openthread = "385e19da1ae15f27872c2543b97276a42f102ead"
> +SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
> SRCREV_stm32 = "f8ff8d25aa0a9e65948040c7b47ec67f3fa300df"
> SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
> +SRCREV_TraceRecorderSource =
> "36c577727642457b0db7274298a4b96558374832"
>
> ZEPHYR_BRANCH = "v2.6-branch"
> PV = "2.6.1+git${SRCPV}"
> diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.0.inc
> b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.0.inc
> index f425d9f..1cc9a4e 100644
> --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.0.inc
> +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.0.inc
> @@ -2,12 +2,15 @@ SRCREV_FORMAT = "default_cmsis"
> SRCREV_cmsis = "b0612c97c1401feeb4160add6462c3627fe90fc7"
> SRCREV_default = "3f826560aaf81a444018293bd6acce3c339fe150"
> SRCREV_libmetal = "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb"
> +SRCREV_lvgl = "31acbaa36e9e74ab88ac81e3d21e7f1d00a71136"
> SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7"
> SRCREV_nordic = "a6e5299041f152da5ae0ab17b2e44e088bb96d6d"
> SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef"
> SRCREV_openthread = "5d706547ebcb0a85e11412bcd88e80e2af98c74d"
> +SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
> SRCREV_stm32 = "5c8275071ec1cf160bfe8c18bbd9330a7d714dc8"
> SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
> +SRCREV_TraceRecorderSource =
> "36c577727642457b0db7274298a4b96558374832"
>
> ZEPHYR_BRANCH = "v2.7-branch"
> PV = "2.7.0+git${SRCPV}"
> diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc b/recipes-
> kernel/zephyr-kernel/zephyr-kernel-src.inc
> index d8b086b..21ba208 100644
> --- a/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc
> +++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc
> @@ -14,10 +14,13 @@ SRC_URI = "\
> git://github.com/zephyrproject-
> rtos/hal_nordic.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/n
> ordic;name=nordic \
> git://github.com/zephyrproject-
> rtos/hal_stm32.git;protocol=https;branch=main;destsuffix=git/modules/hal/
> stm32;name=stm32 \
> git://github.com/zephyrproject-
> rtos/libmetal.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/lib
> metal;name=libmetal \
> +
> + git://github.com/zephyrproject-rtos/lvgl.git;branch=zephyr;protocol=ht
> + tps;destsuffix=git/modules/lib/gui/lvgl;name=lvgl \
> git://github.com/zephyrproject-
> rtos/mbedtls.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/mbe
> dtls;name=mbedtls \
> git://github.com/zephyrproject-rtos/open-
> amp.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/open-
> amp;name=open-amp \
> git://github.com/zephyrproject-
> rtos/openthread.git;protocol=https;nobranch=1;branch=zephyr;destsuffix=gi
> t/modules/lib/openthread;name=openthread \
> +
> + git://github.com/zephyrproject-rtos/segger.git;protocol=https;nobranch
> + =1;destsuffix=git/modules/debug/segger;name=segger \
> git://github.com/zephyrproject-
> rtos/tinycrypt.git;protocol=https;nobranch=1;destsuffix=git/modules/crypto/
> tinycrypt;name=tinycrypt \
> +
> + git://github.com/zephyrproject-rtos/TraceRecorderSource.git;branch=zep
> +
> hyr;protocol=https;destsuffix=git/modules/debug/TraceRecorder;name=Tra
> + ceRecorderSource \
> "
> S = "${WORKDIR}/git"
>
> diff --git a/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb b/recipes-
> kernel/zephyr-kernel/zephyr-lvgl.bb
> new file mode 100644
> index 0000000..29d1c5f
> --- /dev/null
> +++ b/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb
> @@ -0,0 +1,11 @@
> +include zephyr-sample.inc
> +
> +ZEPHYR_SRC_DIR = "${S}/samples/subsys/display/lvgl"
> +ZEPHYR_MODULES:append = "\;${S}/modules/lib/gui/lvgl"
> +
> +# TODO Once more machines and displays are supported, add a
> PACKAGECONFIG.
> +EXTRA_OECMAKE:append =" -DSHIELD=adafruit_2_8_tft_touch_v2"
> +
> +SRC_URI:append = " file://0001-cmake-added-missing-file-ext-
> to.patch;patchdir=modules/lib/gui/lvgl"
> +
> +COMATIBLE_MACHINE = "(nrf52840dk-nrf52840)"
> --
> 2.30.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55303): https://lists.yoctoproject.org/g/yocto/message/55303
Mute This Topic: https://lists.yoctoproject.org/mt/86932441/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-