diff options
Diffstat (limited to 'meta-oe/recipes-graphics/lvgl')
12 files changed, 84 insertions, 430 deletions
diff --git a/meta-oe/recipes-graphics/lvgl/files/0001-thorvg-fix-build-with-gcc-15.patch b/meta-oe/recipes-graphics/lvgl/files/0001-thorvg-fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..e61b5224aa --- /dev/null +++ b/meta-oe/recipes-graphics/lvgl/files/0001-thorvg-fix-build-with-gcc-15.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From a9e41f7e9590c757e74877cace6442dd676223ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Fri, 21 Mar 2025 10:25:43 +0000 | ||
4 | Subject: [PATCH] thorvg: fix build with gcc-15 | ||
5 | |||
6 | * add missing include to fix: | ||
7 | src/libs/thorvg/thorvg.h:357:20: error: 'uint8_t' has not been declared | ||
8 | 357 | Result opacity(uint8_t o) noexcept; | ||
9 | | ^~~~~~~ | ||
10 | |||
11 | * not needed with latest master where it was resolved differently in | ||
12 | fc5c15638 feat(thorvg): use LVGL's malloc/realloc/zalloc/free (#7772) | ||
13 | which includes stdlib/lv_string.h which includes misc/lv_types.h which | ||
14 | includes stdint | ||
15 | |||
16 | Upstream-Status: Pending [not needed with latest master where it was resolved differently in fc5c15638 feat(thorvg): use LVGL's malloc/realloc/zalloc/free (#7772)] | ||
17 | |||
18 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
19 | --- | ||
20 | src/libs/thorvg/thorvg.h | 1 + | ||
21 | 1 file changed, 1 insertion(+) | ||
22 | |||
23 | --- a/src/libs/thorvg/thorvg.h | ||
24 | +++ b/src/libs/thorvg/thorvg.h | ||
25 | @@ -12,6 +12,7 @@ | ||
26 | #define TVG_BUILD 1 | ||
27 | |||
28 | |||
29 | +#include <cstdint> | ||
30 | #include <functional> | ||
31 | #include <memory> | ||
32 | #include <string> | ||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch b/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch deleted file mode 100644 index bd619b1572..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 5b7f657e8ad656e0854f2252b3bd482b966d650c Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Wed, 13 Mar 2024 02:12:30 +0100 | ||
4 | Subject: [PATCH 2/2] fix(sdl): handle both LV_IMAGE_SRC_FILE and | ||
5 | LV_IMAGE_SRC_VARIABLE | ||
6 | |||
7 | The SDL image draw code currently assumes that the image source is a | ||
8 | filename and attempts to open that filename. This is not necessarily | ||
9 | the case, e.g. the lv_demo_fb uses encoded images which are of type | ||
10 | LV_IMAGE_SRC_VARIABLE and instead of filename, come with a buffer of | ||
11 | pixels. Handle the later using SDL_CreateRGBSurfaceFrom(). | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/5852] | ||
14 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
15 | --- | ||
16 | src/draw/sdl/lv_draw_sdl.c | 30 +++++++++++++++++++++++++++--- | ||
17 | 1 file changed, 27 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/src/draw/sdl/lv_draw_sdl.c b/src/draw/sdl/lv_draw_sdl.c | ||
20 | index cbb555d94..5eee5b725 100644 | ||
21 | --- a/src/draw/sdl/lv_draw_sdl.c | ||
22 | +++ b/src/draw/sdl/lv_draw_sdl.c | ||
23 | @@ -224,10 +224,34 @@ static bool draw_to_texture(lv_draw_sdl_unit_t * u, cache_data_t * data) | ||
24 | break; | ||
25 | case LV_DRAW_TASK_TYPE_IMAGE: { | ||
26 | lv_draw_image_dsc_t * image_dsc = task->draw_dsc; | ||
27 | - const char * path = image_dsc->src; | ||
28 | - SDL_Surface * surface = IMG_Load(&path[2]); | ||
29 | + lv_image_src_t type = lv_image_src_get_type(image_dsc->src); | ||
30 | + SDL_Surface * surface = NULL; | ||
31 | + if(type == LV_IMAGE_SRC_FILE) { | ||
32 | + const char * path = image_dsc->src; | ||
33 | + surface = IMG_Load(&path[2]); | ||
34 | + } | ||
35 | + else if(type == LV_IMAGE_SRC_VARIABLE) { | ||
36 | + lv_image_dsc_t * lvd = image_dsc->src; | ||
37 | + surface = SDL_CreateRGBSurfaceFrom(lvd->data, | ||
38 | + lvd->header.w, lvd->header.h, | ||
39 | + LV_COLOR_FORMAT_GET_BPP(lvd->header.cf), | ||
40 | + lvd->header.stride, | ||
41 | +#if SDL_BYTEORDER == SDL_LIL_ENDIAN | ||
42 | + 0x00FF0000, | ||
43 | + 0x0000FF00, | ||
44 | + 0x000000FF, | ||
45 | + 0xFF000000 | ||
46 | +#else | ||
47 | + 0x0000FF00, | ||
48 | + 0x00FF0000, | ||
49 | + 0xFF000000, | ||
50 | + 0x000000FF | ||
51 | +#endif | ||
52 | + ); | ||
53 | + } | ||
54 | + | ||
55 | if(surface == NULL) { | ||
56 | - fprintf(stderr, "could not load image: %s\n", IMG_GetError()); | ||
57 | + fprintf(stderr, "could not load image\n"); | ||
58 | return false; | ||
59 | } | ||
60 | |||
61 | -- | ||
62 | 2.43.0 | ||
63 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch b/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch deleted file mode 100644 index 73c01cb590..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 85d90749a10b5f91741d37b75825935bf7cc4fb3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Tue, 12 Mar 2024 03:00:37 +0100 | ||
4 | Subject: [PATCH 3/6] Make fbdev device node runtime configurable via | ||
5 | environment variable | ||
6 | |||
7 | Test whether $LV_VIDEO_CARD environment variable is non-NULL and in | ||
8 | case it is, use it as the video card file in lv_linux_fbdev_set_file(). | ||
9 | Otherwise fall back to /dev/fb0, i.e. the current behavior. This way, | ||
10 | it is possible to test LVGL on systems with multiple fbdev devices. | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] | ||
13 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
14 | --- | ||
15 | main.c | 8 +++++++- | ||
16 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/main.c b/main.c | ||
19 | index 9775b9c..b64a098 100644 | ||
20 | --- a/main.c | ||
21 | +++ b/main.c | ||
22 | @@ -4,13 +4,19 @@ | ||
23 | #include <pthread.h> | ||
24 | #include <time.h> | ||
25 | |||
26 | +static const char *lv_linux_get_video_card_node(const char *videocard_default) | ||
27 | +{ | ||
28 | + return getenv("LV_VIDEO_CARD") ? : videocard_default; | ||
29 | +} | ||
30 | + | ||
31 | int main(void) | ||
32 | { | ||
33 | + const char *videocard = lv_linux_get_video_card_node("/dev/fb0"); | ||
34 | lv_init(); | ||
35 | |||
36 | /*Linux frame buffer device init*/ | ||
37 | lv_display_t * disp = lv_linux_fbdev_create(); | ||
38 | - lv_linux_fbdev_set_file(disp, "/dev/fb0"); | ||
39 | + lv_linux_fbdev_set_file(disp, videocard); | ||
40 | |||
41 | /*Create a Demo*/ | ||
42 | lv_demo_widgets(); | ||
43 | -- | ||
44 | 2.43.0 | ||
45 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch b/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch deleted file mode 100644 index d24d150c06..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0004-Factor-out-fbdev-initialization-code.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 593da8e11cc5029773ad330b5d7633ee9f2fba95 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Tue, 12 Mar 2024 18:09:42 +0100 | ||
4 | Subject: [PATCH 4/6] Factor out fbdev initialization code | ||
5 | |||
6 | Pull fbdev initialization code into separate function and add ifdef | ||
7 | around it, so it can be conditionally compiled in. This is done in | ||
8 | preparation for addition of other backend initialization example | ||
9 | code. | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] | ||
12 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
13 | --- | ||
14 | main.c | 18 ++++++++++++++---- | ||
15 | 1 file changed, 14 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/main.c b/main.c | ||
18 | index b64a098..288519c 100644 | ||
19 | --- a/main.c | ||
20 | +++ b/main.c | ||
21 | @@ -9,14 +9,24 @@ static const char *lv_linux_get_video_card_node(const char *videocard_default) | ||
22 | return getenv("LV_VIDEO_CARD") ? : videocard_default; | ||
23 | } | ||
24 | |||
25 | -int main(void) | ||
26 | +#if LV_USE_LINUX_FBDEV | ||
27 | +static void lv_linux_disp_init(void) | ||
28 | { | ||
29 | const char *videocard = lv_linux_get_video_card_node("/dev/fb0"); | ||
30 | - lv_init(); | ||
31 | - | ||
32 | - /*Linux frame buffer device init*/ | ||
33 | lv_display_t * disp = lv_linux_fbdev_create(); | ||
34 | + | ||
35 | lv_linux_fbdev_set_file(disp, videocard); | ||
36 | +} | ||
37 | +#else | ||
38 | +#error Unsupported configuration | ||
39 | +#endif | ||
40 | + | ||
41 | +int main(void) | ||
42 | +{ | ||
43 | + lv_init(); | ||
44 | + | ||
45 | + /*Linux display device init*/ | ||
46 | + lv_linux_disp_init(); | ||
47 | |||
48 | /*Create a Demo*/ | ||
49 | lv_demo_widgets(); | ||
50 | -- | ||
51 | 2.43.0 | ||
52 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch b/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch deleted file mode 100644 index 9ee7a7f19d..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0005-Add-DRM-KMS-example-support.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From dabf40559428733413432afa29598bc145aa6636 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Tue, 12 Mar 2024 03:08:13 +0100 | ||
4 | Subject: [PATCH 5/6] Add DRM/KMS example support | ||
5 | |||
6 | Extend the main.c to support both legacy fbdev and DRM/KMS initialization. | ||
7 | |||
8 | To use legacy fbdev support, adjust lv_conf.h as follows: | ||
9 | LV_USE_LINUX_FBDEV=1 | ||
10 | LV_USE_LINUX_DRM=0 | ||
11 | |||
12 | To use DRM/KMS support, adjust lv_conf.h as follows: | ||
13 | LV_USE_LINUX_FBDEV=0 | ||
14 | LV_USE_LINUX_DRM=1 | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] | ||
17 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
18 | --- | ||
19 | CMakeLists.txt | 5 ++++- | ||
20 | main.c | 8 ++++++++ | ||
21 | 2 files changed, 12 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
24 | index d91b196..c1cfb7f 100644 | ||
25 | --- a/CMakeLists.txt | ||
26 | +++ b/CMakeLists.txt | ||
27 | @@ -12,6 +12,9 @@ target_include_directories(lvgl PUBLIC ${PROJECT_SOURCE_DIR}) | ||
28 | |||
29 | add_executable(main main.c mouse_cursor_icon.c) | ||
30 | |||
31 | -target_link_libraries(main lvgl lvgl::examples lvgl::demos lvgl::thorvg ${SDL2_LIBRARIES} m pthread) | ||
32 | +include(${CMAKE_CURRENT_LIST_DIR}/lvgl/tests/FindLibDRM.cmake) | ||
33 | +include_directories(${Libdrm_INCLUDE_DIRS}) | ||
34 | + | ||
35 | +target_link_libraries(main lvgl lvgl::examples lvgl::demos lvgl::thorvg ${SDL2_LIBRARIES} ${Libdrm_LIBRARIES} m pthread) | ||
36 | add_custom_target (run COMMAND ${EXECUTABLE_OUTPUT_PATH}/main DEPENDS main) | ||
37 | |||
38 | diff --git a/main.c b/main.c | ||
39 | index 288519c..ab4e936 100644 | ||
40 | --- a/main.c | ||
41 | +++ b/main.c | ||
42 | @@ -17,6 +17,14 @@ static void lv_linux_disp_init(void) | ||
43 | |||
44 | lv_linux_fbdev_set_file(disp, videocard); | ||
45 | } | ||
46 | +#elif LV_USE_LINUX_DRM | ||
47 | +static void lv_linux_disp_init(void) | ||
48 | +{ | ||
49 | + const char *videocard = lv_linux_get_video_card_node("/dev/dri/card0"); | ||
50 | + lv_display_t * disp = lv_linux_drm_create(); | ||
51 | + | ||
52 | + lv_linux_drm_set_file(disp, videocard, -1); | ||
53 | +} | ||
54 | #else | ||
55 | #error Unsupported configuration | ||
56 | #endif | ||
57 | -- | ||
58 | 2.43.0 | ||
59 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch b/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch deleted file mode 100644 index 691ee80b59..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0006-Add-SDL2-example-support.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | From b202ce51f7b68c460fcd1b6d9c3ffa8aaf2baaf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Tue, 12 Mar 2024 19:05:38 +0100 | ||
4 | Subject: [PATCH 6/6] Add SDL2 example support | ||
5 | |||
6 | Extend the main.c to support both legacy fbdev, DRM/KMS, SDL2 initialization. | ||
7 | The SDL2 window resolution can be configured using environment variables | ||
8 | LV_VIDEO_WIDTH and LV_VIDEO_HEIGHT and defaults to 800 x 480 . | ||
9 | |||
10 | To use legacy fbdev support, adjust lv_conf.h as follows: | ||
11 | LV_USE_LINUX_FBDEV=1 | ||
12 | LV_USE_LINUX_DRM=0 | ||
13 | LV_USE_SDL=0 | ||
14 | |||
15 | To use DRM/KMS support, adjust lv_conf.h as follows: | ||
16 | LV_USE_LINUX_FBDEV=0 | ||
17 | LV_USE_LINUX_DRM=1 | ||
18 | LV_USE_SDL=0 | ||
19 | |||
20 | To use SDL2 support, adjust lv_conf.h as follows: | ||
21 | LV_USE_LINUX_FBDEV=0 | ||
22 | LV_USE_LINUX_DRM=0 | ||
23 | LV_USE_SDL=1 | ||
24 | |||
25 | Upstream-Status: Submitted [https://github.com/lvgl/lv_port_linux_frame_buffer/pull/47] | ||
26 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
27 | --- | ||
28 | CMakeLists.txt | 6 +++++- | ||
29 | main.c | 8 ++++++++ | ||
30 | 2 files changed, 13 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
33 | index c1cfb7f..658193f 100644 | ||
34 | --- a/CMakeLists.txt | ||
35 | +++ b/CMakeLists.txt | ||
36 | @@ -15,6 +15,10 @@ add_executable(main main.c mouse_cursor_icon.c) | ||
37 | include(${CMAKE_CURRENT_LIST_DIR}/lvgl/tests/FindLibDRM.cmake) | ||
38 | include_directories(${Libdrm_INCLUDE_DIRS}) | ||
39 | |||
40 | -target_link_libraries(main lvgl lvgl::examples lvgl::demos lvgl::thorvg ${SDL2_LIBRARIES} ${Libdrm_LIBRARIES} m pthread) | ||
41 | +find_package(SDL2) | ||
42 | +find_package(SDL2_image) | ||
43 | +include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIRS}) | ||
44 | + | ||
45 | +target_link_libraries(main lvgl lvgl::examples lvgl::demos lvgl::thorvg ${SDL2_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} ${Libdrm_LIBRARIES} m pthread) | ||
46 | add_custom_target (run COMMAND ${EXECUTABLE_OUTPUT_PATH}/main DEPENDS main) | ||
47 | |||
48 | diff --git a/main.c b/main.c | ||
49 | index ab4e936..4b66ebc 100644 | ||
50 | --- a/main.c | ||
51 | +++ b/main.c | ||
52 | @@ -25,6 +25,14 @@ static void lv_linux_disp_init(void) | ||
53 | |||
54 | lv_linux_drm_set_file(disp, videocard, -1); | ||
55 | } | ||
56 | +#elif LV_USE_SDL | ||
57 | +static void lv_linux_disp_init(void) | ||
58 | +{ | ||
59 | + const int width = atoi(getenv("LV_VIDEO_WIDTH") ? : "800"); | ||
60 | + const int height = atoi(getenv("LV_VIDEO_HEIGHT") ? : "480"); | ||
61 | + | ||
62 | + lv_sdl_window_create(width, height); | ||
63 | +} | ||
64 | #else | ||
65 | #error Unsupported configuration | ||
66 | #endif | ||
67 | -- | ||
68 | 2.43.0 | ||
69 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch b/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch deleted file mode 100644 index 6997d84153..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0007-fix-cmake-generate-versioned-shared-libraries.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From 40657a770baadfff30abfecf7638e7b1c340db4d Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Thu, 14 Mar 2024 03:23:10 +0100 | ||
4 | Subject: [PATCH] fix(cmake): generate versioned shared libraries | ||
5 | |||
6 | Add missing version suffix to shared libraries. Currently the filename of | ||
7 | generated shared libraries is only liblvgl.so, which prevents coexistence | ||
8 | of different versions of LVGL on the same system. Set VERSION and SOVERSION | ||
9 | to make cmake add the version suffix to generated shared libraries. That | ||
10 | changes the filename to liblvgl.so.9.0.0 and includes symlink with major | ||
11 | ABI version, i.e. liblvgl.so.9 . | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/5865] | ||
14 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
15 | --- | ||
16 | env_support/cmake/custom.cmake | 11 +++++++++++ | ||
17 | 1 file changed, 11 insertions(+) | ||
18 | |||
19 | diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake | ||
20 | index 9800468eb..6f33f1cc8 100644 | ||
21 | --- a/env_support/cmake/custom.cmake | ||
22 | +++ b/env_support/cmake/custom.cmake | ||
23 | @@ -1,3 +1,6 @@ | ||
24 | +set(LVGL_VERSION "9.0.0") | ||
25 | +set(LVGL_SOVERSION "9") | ||
26 | + | ||
27 | # Option to define LV_LVGL_H_INCLUDE_SIMPLE, default: ON | ||
28 | option(LV_LVGL_H_INCLUDE_SIMPLE | ||
29 | "Use #include \"lvgl.h\" instead of #include \"../../lvgl.h\"" ON) | ||
30 | @@ -119,6 +122,8 @@ install( | ||
31 | set_target_properties( | ||
32 | lvgl | ||
33 | PROPERTIES OUTPUT_NAME lvgl | ||
34 | + VERSION ${LVGL_VERSION} | ||
35 | + SOVERSION ${LVGL_SOVERSION} | ||
36 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
37 | LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
38 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
39 | @@ -137,6 +142,8 @@ if(NOT LV_CONF_BUILD_DISABLE_THORVG_INTERNAL) | ||
40 | set_target_properties( | ||
41 | lvgl_thorvg | ||
42 | PROPERTIES OUTPUT_NAME lvgl_thorvg | ||
43 | + VERSION ${LVGL_VERSION} | ||
44 | + SOVERSION ${LVGL_SOVERSION} | ||
45 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
46 | LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
47 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
48 | @@ -155,6 +162,8 @@ if(NOT LV_CONF_BUILD_DISABLE_DEMOS) | ||
49 | set_target_properties( | ||
50 | lvgl_demos | ||
51 | PROPERTIES OUTPUT_NAME lvgl_demos | ||
52 | + VERSION ${LVGL_VERSION} | ||
53 | + SOVERSION ${LVGL_SOVERSION} | ||
54 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
55 | LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
56 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
57 | @@ -173,6 +182,8 @@ if(NOT LV_CONF_BUILD_DISABLE_EXAMPLES) | ||
58 | set_target_properties( | ||
59 | lvgl_examples | ||
60 | PROPERTIES OUTPUT_NAME lvgl_examples | ||
61 | + VERSION ${LVGL_VERSION} | ||
62 | + SOVERSION ${LVGL_SOVERSION} | ||
63 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
64 | LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" | ||
65 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" | ||
66 | -- | ||
67 | 2.43.0 | ||
68 | |||
diff --git a/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch b/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch deleted file mode 100644 index 449db53dfb..0000000000 --- a/meta-oe/recipes-graphics/lvgl/files/0008-fix-fbdev-set-resolution-prior-to-buffer.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From a6f822f75b3ba01b00c028608c93160d09a6ffd1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jaeyoon Jung <jaeyoon.jung@lge.com> | ||
3 | Date: Mon, 1 Apr 2024 18:00:39 +0900 | ||
4 | Subject: [PATCH] fix(fbdev): set resolution prior to buffer | ||
5 | |||
6 | Otherwise it ends up with using the default value 800x480 and may fail | ||
7 | at lv_display_set_buffers due to incorrect resolution. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/lvgl/lvgl/pull/6004] | ||
10 | Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> | ||
11 | --- | ||
12 | |||
13 | src/drivers/display/fb/lv_linux_fbdev.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/drivers/display/fb/lv_linux_fbdev.c b/src/drivers/display/fb/lv_linux_fbdev.c | ||
17 | index b3cc89199..5fb4c5c9f 100644 | ||
18 | --- a/src/drivers/display/fb/lv_linux_fbdev.c | ||
19 | +++ b/src/drivers/display/fb/lv_linux_fbdev.c | ||
20 | @@ -233,8 +233,8 @@ void lv_linux_fbdev_set_file(lv_display_t * disp, const char * file) | ||
21 | draw_buf_2 = malloc(draw_buf_size); | ||
22 | } | ||
23 | |||
24 | - lv_display_set_buffers(disp, draw_buf, draw_buf_2, draw_buf_size, LV_LINUX_FBDEV_RENDER_MODE); | ||
25 | lv_display_set_resolution(disp, hor_res, ver_res); | ||
26 | + lv_display_set_buffers(disp, draw_buf, draw_buf_2, draw_buf_size, LV_LINUX_FBDEV_RENDER_MODE); | ||
27 | |||
28 | if(width > 0) { | ||
29 | lv_display_set_dpi(disp, DIV_ROUND_UP(hor_res * 254, width * 10)); | ||
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc index 8fd3412c04..69e42af922 100644 --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc | |||
@@ -2,6 +2,8 @@ PACKAGECONFIG ??= "drm" | |||
2 | 2 | ||
3 | PACKAGECONFIG[drm] = ",,libdrm" | 3 | PACKAGECONFIG[drm] = ",,libdrm" |
4 | PACKAGECONFIG[fbdev] = ",," | 4 | PACKAGECONFIG[fbdev] = ",," |
5 | PACKAGECONFIG[gridnav] = ",," | ||
6 | PACKAGECONFIG[thorvg] = ",," | ||
5 | PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" | 7 | PACKAGECONFIG[sdl] = ",,virtual/libsdl2 libsdl2-image" |
6 | 8 | ||
7 | # Add libdrm include if drm is selected in PACKAGECONFIG | 9 | # Add libdrm include if drm is selected in PACKAGECONFIG |
@@ -14,6 +16,7 @@ LVGL_CONFIG_USE_EVDEV = "${@bb.utils.contains_any('PACKAGECONFIG', 'drm fbdev', | |||
14 | LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}" | 16 | LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}" |
15 | 17 | ||
16 | LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)}" | 18 | LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)}" |
19 | |||
17 | LVGL_CONFIG_SDL_FULLSCREEN ?= "0" | 20 | LVGL_CONFIG_SDL_FULLSCREEN ?= "0" |
18 | 21 | ||
19 | LVGL_CONFIG_LV_MEM_CUSTOM ?= "0" | 22 | LVGL_CONFIG_LV_MEM_CUSTOM ?= "0" |
@@ -26,8 +29,20 @@ LVGL_CONFIG_LV_LOG_PRINTF ?= "0" | |||
26 | 29 | ||
27 | LVGL_CONFIG_LV_USE_FONT_COMPRESSED ?= "0" | 30 | LVGL_CONFIG_LV_USE_FONT_COMPRESSED ?= "0" |
28 | 31 | ||
32 | LVGL_CONFIG_LV_USE_GRIDNAV = "${@bb.utils.contains('PACKAGECONFIG', 'gridnav', '1', '0', d)}" | ||
33 | |||
29 | LVGL_CONFIG_LV_THEME_DEFAULT_DARK ?= "0" | 34 | LVGL_CONFIG_LV_THEME_DEFAULT_DARK ?= "0" |
30 | 35 | ||
36 | LVGL_CONFIG_USE_LOTTIE = "${@bb.utils.contains('PACKAGECONFIG', 'thorvg', '1', '0', d)}" | ||
37 | |||
38 | LVGL_CONFIG_USE_VECTOR_GRAPHICS = "${@bb.utils.contains('PACKAGECONFIG', 'thorvg', '1', '0', d)}" | ||
39 | |||
40 | LVGL_CONFIG_USE_THORVG_INTERNAL = "${@bb.utils.contains('PACKAGECONFIG', 'thorvg', '1', '0', d)}" | ||
41 | |||
42 | LVGL_CONFIG_USE_MATRIX = "${@bb.utils.contains('PACKAGECONFIG', 'thorvg', '1', '0', d)}" | ||
43 | |||
44 | LVGL_CONFIG_USE_FLOAT = "${@bb.utils.contains('PACKAGECONFIG', 'thorvg', '1', '0', d)}" | ||
45 | |||
31 | DEBUG_BUILD ??= "0" | 46 | DEBUG_BUILD ??= "0" |
32 | 47 | ||
33 | ALLOW_EMPTY:${PN} = "1" | 48 | ALLOW_EMPTY:${PN} = "1" |
@@ -70,7 +85,14 @@ do_configure:append() { | |||
70 | -e "s|^([[:space:]]*#define LV_LOG_PRINTF[[:space:]]).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|" \ | 85 | -e "s|^([[:space:]]*#define LV_LOG_PRINTF[[:space:]]).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|" \ |
71 | \ | 86 | \ |
72 | -e "s|^([[:space:]]*#define LV_USE_FONT_COMPRESSED[[:space:]]).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|" \ | 87 | -e "s|^([[:space:]]*#define LV_USE_FONT_COMPRESSED[[:space:]]).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|" \ |
88 | -e "s|^([[:space:]]*#define LV_USE_GRIDNAV[[:space:]]).*|\1${LVGL_CONFIG_LV_USE_GRIDNAV}|" \ | ||
73 | -e "s|^([[:space:]]*#define LV_THEME_DEFAULT_DARK[[:space:]]).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|" \ | 89 | -e "s|^([[:space:]]*#define LV_THEME_DEFAULT_DARK[[:space:]]).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|" \ |
74 | \ | 90 | \ |
91 | -e "s|^([[:space:]]*#define LV_USE_VECTOR_GRAPHIC[[:space:]]).*|\1${LVGL_CONFIG_USE_VECTOR_GRAPHICS}|" \ | ||
92 | -e "s|^([[:space:]]*#define LV_USE_THORVG_INTERNAL[[:space:]]).*|\1${LVGL_CONFIG_USE_THORVG_INTERNAL}|" \ | ||
93 | -e "s|^([[:space:]]*#define LV_USE_MATRIX[[:space:]]).*|\1${LVGL_CONFIG_USE_MATRIX}|" \ | ||
94 | -e "s|^([[:space:]]*#define LV_USE_FLOAT[[:space:]]).*|\1${LVGL_CONFIG_USE_FLOAT}|" \ | ||
95 | \ | ||
96 | -e "s|^([[:space:]]*#define LV_USE_LOTTIE[[:space:]]).*|\1${LVGL_CONFIG_USE_LOTTIE}|" \ | ||
75 | -i "${S}/lv_conf.h" | 97 | -i "${S}/lv_conf.h" |
76 | } | 98 | } |
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.1.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.2.2.bb index 6e8371baad..ede5c16f3f 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.1.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_9.2.2.bb | |||
@@ -5,18 +5,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=802d3d83ae80ef5f343050bf96cce3a4 \ | |||
5 | file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" | 5 | file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" |
6 | 6 | ||
7 | SRC_URI = "\ | 7 | SRC_URI = "\ |
8 | git://github.com/lvgl/lv_port_linux_frame_buffer.git;protocol=https;branch=master;name=demo \ | 8 | git://github.com/lvgl/lv_port_linux_frame_buffer.git;protocol=https;branch=release/v9.2;name=demo \ |
9 | git://github.com/lvgl/lvgl;protocol=https;branch=master;name=lvgl;subdir=git/lvgl \ | 9 | git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.2;name=lvgl;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/lvgl \ |
10 | file://0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch;patchdir=lvgl \ | 10 | file://0001-thorvg-fix-build-with-gcc-15.patch;patchdir=lvgl \ |
11 | file://0003-Make-fbdev-device-node-runtime-configurable-via-envi.patch \ | ||
12 | file://0004-Factor-out-fbdev-initialization-code.patch \ | ||
13 | file://0005-Add-DRM-KMS-example-support.patch \ | ||
14 | file://0006-Add-SDL2-example-support.patch \ | ||
15 | file://0007-fix-cmake-generate-versioned-shared-libraries.patch;patchdir=lvgl \ | ||
16 | file://0008-fix-fbdev-set-resolution-prior-to-buffer.patch;patchdir=lvgl \ | ||
17 | " | 11 | " |
18 | SRCREV_demo = "dccc6a1ca48372aa993dbea7a8e17dec6f42df6a" | 12 | SRCREV_demo = "c924e24c7aa55317521bcd9dd75ce9337508f5a5" |
19 | SRCREV_lvgl = "e1c0b21b2723d391b885de4b2ee5cc997eccca91" | 13 | SRCREV_lvgl = "7f07a129e8d77f4984fff8e623fd5be18ff42e74" |
20 | SRCREV_FORMAT = "demo_lvgl" | 14 | SRCREV_FORMAT = "demo_lvgl" |
21 | 15 | ||
22 | EXTRA_OEMAKE = "DESTDIR=${D}" | 16 | EXTRA_OEMAKE = "DESTDIR=${D}" |
@@ -30,7 +24,6 @@ require lv-conf.inc | |||
30 | 24 | ||
31 | inherit cmake | 25 | inherit cmake |
32 | 26 | ||
33 | S = "${WORKDIR}/git" | ||
34 | 27 | ||
35 | do_configure:prepend() { | 28 | do_configure:prepend() { |
36 | if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then | 29 | if [ "${LVGL_CONFIG_USE_SDL}" -eq 1 ] ; then |
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb deleted file mode 100644 index 4435c40777..0000000000 --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.1.0.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | # SPDX-FileCopyrightText: Huawei Inc. | ||
2 | # | ||
3 | # SPDX-License-Identifier: MIT | ||
4 | |||
5 | HOMEPAGE = "https://lvgl.io/" | ||
6 | DESCRIPTION = "LVGL is an OSS graphics library to create embedded GUI" | ||
7 | SUMMARY = "Light and Versatile Graphics Library" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" | ||
10 | |||
11 | SRC_URI = "\ | ||
12 | git://github.com/lvgl/lvgl;protocol=https;branch=master \ | ||
13 | file://0002-fix-sdl-handle-both-LV_IMAGE_SRC_FILE-and-LV_IMAGE_S.patch \ | ||
14 | file://0007-fix-cmake-generate-versioned-shared-libraries.patch \ | ||
15 | file://0008-fix-fbdev-set-resolution-prior-to-buffer.patch \ | ||
16 | " | ||
17 | SRCREV = "e1c0b21b2723d391b885de4b2ee5cc997eccca91" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON" | ||
22 | S = "${WORKDIR}/git" | ||
23 | |||
24 | require lv-conf.inc | ||
25 | |||
26 | do_install:append() { | ||
27 | install -d "${D}${includedir}/${PN}" | ||
28 | install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h" | ||
29 | } | ||
30 | |||
31 | FILES:${PN}-dev += "\ | ||
32 | ${includedir}/${PN}/ \ | ||
33 | " | ||
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.2.2.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.2.2.bb new file mode 100644 index 0000000000..28306a1101 --- /dev/null +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.2.2.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | # SPDX-FileCopyrightText: Huawei Inc. | ||
2 | # | ||
3 | # SPDX-License-Identifier: MIT | ||
4 | |||
5 | HOMEPAGE = "https://lvgl.io/" | ||
6 | DESCRIPTION = "LVGL is an OSS graphics library to create embedded GUI" | ||
7 | SUMMARY = "Light and Versatile Graphics Library" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" | ||
10 | |||
11 | SRC_URI = "\ | ||
12 | git://github.com/lvgl/lvgl;protocol=https;branch=release/v9.2 \ | ||
13 | file://0001-thorvg-fix-build-with-gcc-15.patch \ | ||
14 | " | ||
15 | SRCREV = "7f07a129e8d77f4984fff8e623fd5be18ff42e74" | ||
16 | |||
17 | inherit cmake | ||
18 | |||
19 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON" | ||
20 | |||
21 | require lv-conf.inc | ||
22 | |||
23 | do_install:append() { | ||
24 | install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${BPN}/lv_conf.h" | ||
25 | } | ||