* [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc
@ 2024-03-16 10:00 Christophe Chapuis
2024-03-16 10:00 ` [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h Christophe Chapuis
` (6 more replies)
0 siblings, 7 replies; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
Fix a typo in the first sed instruction, where the #if 0 is
never changed to #if 1 at the beginning of lv_conf.h.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index cb676ac62..3dbdf769f 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -24,7 +24,7 @@ do_configure:append() {
# If there is a configuration template, start from that
[ -r "${S}/lv_conf_template.h" ] && cp -Lv "${S}/lv_conf_template.h" "${S}/lv_conf.h"
- sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \
+ sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
\
-e "s|\(^#define LV_USE_LINUX_DRM \).*|#define LV_USE_LINUX_DRM ${LVGL_CONFIG_USE_DRM}|g" \
\
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 20:41 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include Christophe Chapuis
` (5 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
Add an install append to copy the generated lv_conf.h as part of the
lvgl package, so that it will be found and used by the recipes that
want to use lvgl.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
index b84fc5a3d..58053d830 100644
--- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
+++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
@@ -26,6 +26,11 @@ ALLOW_EMPTY:${PN} = "1"
PACKAGECONFIG ??= "drm"
require lv-conf.inc
+do_install:append() {
+ install -d "${D}${includedir}/${PN}"
+ install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h"
+}
+
FILES:${PN}-dev += "\
${includedir}/${PN}/ \
${includedir}/${PN}/lvgl/ \
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
2024-03-16 10:00 ` [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 20:41 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc Christophe Chapuis
` (4 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
As ${includedir}${PN} is already listed in FILES, there is no
need to add one of its subdirectories.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
index 58053d830..8bd718efd 100644
--- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
+++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
@@ -33,7 +33,6 @@ do_install:append() {
FILES:${PN}-dev += "\
${includedir}/${PN}/ \
- ${includedir}/${PN}/lvgl/ \
"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
2024-03-16 10:00 ` [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h Christophe Chapuis
2024-03-16 10:00 ` [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 20:43 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc Christophe Chapuis
` (3 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
Use back reference instead of repeating the search pattern. Later on
this could lead to a more generic way of replacing values in the .h file.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lv-conf.inc | 28 +++++++++++------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index 3dbdf769f..e43a4d508 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -26,29 +26,29 @@ do_configure:append() {
sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
\
- -e "s|\(^#define LV_USE_LINUX_DRM \).*|#define LV_USE_LINUX_DRM ${LVGL_CONFIG_USE_DRM}|g" \
+ -e "s|\(^#define LV_USE_LINUX_DRM \).*|\1${LVGL_CONFIG_USE_DRM}|g" \
\
- -e "s|\(^#define LV_USE_LINUX_FBDEV \).*|#define LV_USE_LINUX_FBDEV ${LVGL_CONFIG_USE_FBDEV}|g" \
+ -e "s|\(^#define LV_USE_LINUX_FBDEV \).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
\
- -e "s|\(^#define LV_USE_SDL \).*|#define LV_USE_SDL ${LVGL_CONFIG_USE_SDL}|g" \
- -e "s|\(^#define LV_USE_DRAW_SDL \).*|#define LV_USE_DRAW_SDL ${LVGL_CONFIG_USE_SDL}|g" \
- -e "s|\(^ #define LV_SDL_BUF_COUNT \).*| #define LV_SDL_BUF_COUNT 2|g" \
- -e "s|\(^ #define LV_SDL_FULLSCREEN \).*| #define LV_SDL_FULLSCREEN ${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
+ -e "s|\(^#define LV_USE_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
+ -e "s|\(^#define LV_USE_DRAW_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
+ -e "s|\(^ \+#define LV_SDL_BUF_COUNT \).*|\1 2|g" \
+ -e "s|\(^ \+#define LV_SDL_FULLSCREEN \).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
\
- -e "s|\(^#define LV_COLOR_DEPTH \).*|#define LV_COLOR_DEPTH ${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
- -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
+ -e "s|\(^#define LV_COLOR_DEPTH \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
+ -e "s|\(#define LV_MEM_CUSTOM .*\).*|\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" \
\
- -e "s|\(^#define LV_USE_EVDEV \).*|#define LV_USE_EVDEV ${LVGL_CONFIG_USE_EVDEV}|g" \
+ -e "s|\(^#define LV_USE_EVDEV \).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
\
- -e "s|\(^#define LV_USE_ASSERT_NULL \).*|#define LV_USE_ASSERT_NULL ${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|#define LV_USE_ASSERT_MALLOC ${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|#define LV_USE_ASSERT_STYLE ${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|#define LV_USE_ASSERT_MEM_INTEGRITY ${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|#define LV_USE_ASSERT_OBJ ${DEBUG_BUILD}|g" \
+ -e "s|\(^#define LV_USE_ASSERT_NULL \).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
\
-i "${S}/lv_conf.h"
}
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
` (2 preceding siblings ...)
2024-03-16 10:00 ` [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 20:45 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include Christophe Chapuis
` (2 subsequent siblings)
6 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
As it can be usefull to customize these other variables, let's
add them in lv-conf.inc.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lv-conf.inc | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index e43a4d508..9ee9f283d 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -12,8 +12,17 @@ LVGL_CONFIG_USE_SDL = "${@bb.utils.contains('PACKAGECONFIG', 'sdl', '1', '0', d)
LVGL_CONFIG_SDL_FULLSCREEN ?= "0"
LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
+LVGL_CONFIG_LV_MEM_SIZE ?= "(64 * 1024U)"
LVGL_CONFIG_LV_COLOR_DEPTH ?= "32"
+LVGL_CONFIG_LV_USE_LOG ?= "0"
+LVGL_CONFIG_LV_LOG_LEVEL ?= "LV_LOG_LEVEL_WARN"
+LVGL_CONFIG_LV_LOG_PRINTF ?= "0"
+
+LVGL_CONFIG_LV_USE_FONT_COMPRESSED ?= "0"
+
+LVGL_CONFIG_LV_THEME_DEFAULT_DARK ?= "0"
+
DEBUG_BUILD ??= "0"
ALLOW_EMPTY:${PN} = "1"
@@ -37,6 +46,7 @@ do_configure:append() {
\
-e "s|\(^#define LV_COLOR_DEPTH \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
-e "s|\(#define LV_MEM_CUSTOM .*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
+ -e "s|\(^ \+#define LV_MEM_SIZE \).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|g" \
\
-e "s|\(#define LV_TICK_CUSTOM \).*|\1 1|g" \
-e "s|\(#define LV_TICK_CUSTOM_INCLUDE \).*|\1 <stdint.h>|g" \
@@ -50,5 +60,12 @@ do_configure:append() {
-e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|\1${DEBUG_BUILD}|g" \
-e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
\
+ -e "s|\(^#define LV_USE_LOG \).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
+ -e "s|\(^ \+#define LV_LOG_LEVEL \).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
+ -e "s|\(^ \+#define LV_LOG_PRINTF \).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
+ \
+ -e "s|\(^#define LV_USE_FONT_COMPRESSED \).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
+ -e "s|\(^ \+#define LV_THEME_DEFAULT_DARK \).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
+ \
-i "${S}/lv_conf.h"
}
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
` (3 preceding siblings ...)
2024-03-16 10:00 ` [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 16:08 ` Khem Raj
2024-03-16 20:42 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions Christophe Chapuis
2024-03-16 20:41 ` [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Marek Vasut
6 siblings, 2 replies; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
When DRM is activated for LVGL, it adds a dependency on drm.h.
As for lvgl-demo-fb, add an include path to fix this usecase.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
index 8bd718efd..6a9a7411b 100644
--- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
+++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
@@ -21,6 +21,8 @@ inherit cmake
EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
S = "${WORKDIR}/git"
+TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
+
ALLOW_EMPTY:${PN} = "1"
PACKAGECONFIG ??= "drm"
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
` (4 preceding siblings ...)
2024-03-16 10:00 ` [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include Christophe Chapuis
@ 2024-03-16 10:00 ` Christophe Chapuis
2024-03-16 20:44 ` Marek Vasut
2024-03-18 13:10 ` [oe] " Peter Kjellerstedt
2024-03-16 20:41 ` [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Marek Vasut
6 siblings, 2 replies; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 10:00 UTC (permalink / raw)
To: openembedded-devel
Cc: Marek Vasut, Khem Raj, Fabio Estevam, Christophe Chapuis
Use [ \t] to detect optionnal spaces at the beginning of each
line, and after the define.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
meta-oe/recipes-graphics/lvgl/lv-conf.inc | 46 +++++++++++------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index 9ee9f283d..2b5d4a14a 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -35,37 +35,37 @@ do_configure:append() {
sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
\
- -e "s|\(^#define LV_USE_LINUX_DRM \).*|\1${LVGL_CONFIG_USE_DRM}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_LINUX_DRM[ \t]\).*|\1${LVGL_CONFIG_USE_DRM}|g" \
\
- -e "s|\(^#define LV_USE_LINUX_FBDEV \).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_LINUX_FBDEV[ \t]\).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
\
- -e "s|\(^#define LV_USE_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
- -e "s|\(^#define LV_USE_DRAW_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
- -e "s|\(^ \+#define LV_SDL_BUF_COUNT \).*|\1 2|g" \
- -e "s|\(^ \+#define LV_SDL_FULLSCREEN \).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_DRAW_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
+ -e "s|\(^[ \t]*#define LV_SDL_BUF_COUNT[ \t]\).*|\1 2|g" \
+ -e "s|\(^[ \t]*#define LV_SDL_FULLSCREEN[ \t]\).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
\
- -e "s|\(^#define LV_COLOR_DEPTH \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
- -e "s|\(#define LV_MEM_CUSTOM .*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
- -e "s|\(^ \+#define LV_MEM_SIZE \).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|g" \
+ -e "s|\(^[ \t]*#define LV_COLOR_DEPTH[ \t]\).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
+ -e "s|\(^[ \t]*#define LV_MEM_CUSTOM[ \t].*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
+ -e "s|\(^[ \t]*#define LV_MEM_SIZE[ \t]\).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|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" \
+ -e "s|\(^[ \t]*#define LV_TICK_CUSTOM[ \t]\).*|\1 1|g" \
+ -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_INCLUDE[ \t]\).*|\1 <stdint.h>|g" \
+ -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_SYS_TIME_EXPR[ \t]\).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \
\
- -e "s|\(^#define LV_USE_EVDEV \).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_EVDEV[ \t]\).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
\
- -e "s|\(^#define LV_USE_ASSERT_NULL \).*|\1${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|\1${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|\1${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|\1${DEBUG_BUILD}|g" \
- -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_ASSERT_NULL[ \t]\).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_ASSERT_MALLOC[ \t]\).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_ASSERT_STYLE[ \t]\).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_ASSERT_MEM_INTEGRITY[ \t]\).*|\1${DEBUG_BUILD}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g" \
\
- -e "s|\(^#define LV_USE_LOG \).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
- -e "s|\(^ \+#define LV_LOG_LEVEL \).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
- -e "s|\(^ \+#define LV_LOG_PRINTF \).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_LOG[ \t]\).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
+ -e "s|\(^[ \t]*#define LV_LOG_LEVEL[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
+ -e "s|\(^[ \t]*#define LV_LOG_PRINTF[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
\
- -e "s|\(^#define LV_USE_FONT_COMPRESSED \).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
- -e "s|\(^ \+#define LV_THEME_DEFAULT_DARK \).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
+ -e "s|\(^[ \t]*#define LV_USE_FONT_COMPRESSED[ \t]\).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
+ -e "s|\(^[ \t]*#define LV_THEME_DEFAULT_DARK[ \t]\).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
\
-i "${S}/lv_conf.h"
}
--
2.44.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 10:00 ` [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include Christophe Chapuis
@ 2024-03-16 16:08 ` Khem Raj
2024-03-16 16:17 ` Christophe Chapuis
2024-03-16 20:42 ` Marek Vasut
1 sibling, 1 reply; 26+ messages in thread
From: Khem Raj @ 2024-03-16 16:08 UTC (permalink / raw)
To: Christophe Chapuis; +Cc: openembedded-devel, Marek Vasut, Fabio Estevam
does this fix
https://errors.yoctoproject.org/Errors/Details/758522/
On Sat, Mar 16, 2024 at 3:01 AM Christophe Chapuis
<chris.chapuis@gmail.com> wrote:
>
> When DRM is activated for LVGL, it adds a dependency on drm.h.
> As for lvgl-demo-fb, add an include path to fix this usecase.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
> meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> index 8bd718efd..6a9a7411b 100644
> --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> @@ -21,6 +21,8 @@ inherit cmake
> EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
> S = "${WORKDIR}/git"
>
> +TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
> +
> ALLOW_EMPTY:${PN} = "1"
>
> PACKAGECONFIG ??= "drm"
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 16:08 ` Khem Raj
@ 2024-03-16 16:17 ` Christophe Chapuis
2024-03-16 16:30 ` Khem Raj
0 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 16:17 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-devel, Marek Vasut, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
Yes, it fixes exactly this issue.
On Sat, Mar 16, 2024 at 5:09 PM Khem Raj <raj.khem@gmail.com> wrote:
> does this fix
>
> https://errors.yoctoproject.org/Errors/Details/758522/
>
> On Sat, Mar 16, 2024 at 3:01 AM Christophe Chapuis
> <chris.chapuis@gmail.com> wrote:
> >
> > When DRM is activated for LVGL, it adds a dependency on drm.h.
> > As for lvgl-demo-fb, add an include path to fix this usecase.
> >
> > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> > ---
> > meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > index 8bd718efd..6a9a7411b 100644
> > --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > @@ -21,6 +21,8 @@ inherit cmake
> > EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
> > S = "${WORKDIR}/git"
> >
> > +TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
> > +
> > ALLOW_EMPTY:${PN} = "1"
> >
> > PACKAGECONFIG ??= "drm"
> > --
> > 2.44.0
> >
>
[-- Attachment #2: Type: text/html, Size: 2203 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 16:17 ` Christophe Chapuis
@ 2024-03-16 16:30 ` Khem Raj
0 siblings, 0 replies; 26+ messages in thread
From: Khem Raj @ 2024-03-16 16:30 UTC (permalink / raw)
To: Christophe Chapuis; +Cc: Fabio Estevam, Marek Vasut, openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
Ok thx
On Sat, Mar 16, 2024 at 9:18 AM Christophe Chapuis <chris.chapuis@gmail.com>
wrote:
> Yes, it fixes exactly this issue.
>
> On Sat, Mar 16, 2024 at 5:09 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>> does this fix
>>
>> https://errors.yoctoproject.org/Errors/Details/758522/
>>
>> On Sat, Mar 16, 2024 at 3:01 AM Christophe Chapuis
>> <chris.chapuis@gmail.com> wrote:
>> >
>> > When DRM is activated for LVGL, it adds a dependency on drm.h.
>> > As for lvgl-demo-fb, add an include path to fix this usecase.
>> >
>> > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
>> > ---
>> > meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
>> b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
>> > index 8bd718efd..6a9a7411b 100644
>> > --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
>> > +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
>> > @@ -21,6 +21,8 @@ inherit cmake
>> > EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
>> > S = "${WORKDIR}/git"
>> >
>> > +TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
>> > +
>> > ALLOW_EMPTY:${PN} = "1"
>> >
>> > PACKAGECONFIG ??= "drm"
>> > --
>> > 2.44.0
>> >
>>
>
[-- Attachment #2: Type: text/html, Size: 2590 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
` (5 preceding siblings ...)
2024-03-16 10:00 ` [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions Christophe Chapuis
@ 2024-03-16 20:41 ` Marek Vasut
6 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:41 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> Fix a typo in the first sed instruction, where the #if 0 is
> never changed to #if 1 at the beginning of lv_conf.h.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Please retain the RB tags.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h
2024-03-16 10:00 ` [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h Christophe Chapuis
@ 2024-03-16 20:41 ` Marek Vasut
0 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:41 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> Add an install append to copy the generated lv_conf.h as part of the
> lvgl package, so that it will be found and used by the recipes that
> want to use lvgl.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
> meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> index b84fc5a3d..58053d830 100644
> --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> @@ -26,6 +26,11 @@ ALLOW_EMPTY:${PN} = "1"
> PACKAGECONFIG ??= "drm"
> require lv-conf.inc
>
> +do_install:append() {
> + install -d "${D}${includedir}/${PN}"
> + install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h"
> +}
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include
2024-03-16 10:00 ` [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include Christophe Chapuis
@ 2024-03-16 20:41 ` Marek Vasut
0 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:41 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> As ${includedir}${PN} is already listed in FILES, there is no
> need to add one of its subdirectories.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 10:00 ` [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include Christophe Chapuis
2024-03-16 16:08 ` Khem Raj
@ 2024-03-16 20:42 ` Marek Vasut
2024-03-16 21:55 ` Christophe Chapuis
1 sibling, 1 reply; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:42 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> When DRM is activated for LVGL, it adds a dependency on drm.h.
> As for lvgl-demo-fb, add an include path to fix this usecase.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
> meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> index 8bd718efd..6a9a7411b 100644
> --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> @@ -21,6 +21,8 @@ inherit cmake
> EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
> S = "${WORKDIR}/git"
>
> +TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
Shouldn't this be conditional only if PACKAGECONFIG contains 'drm' ?
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc
2024-03-16 10:00 ` [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc Christophe Chapuis
@ 2024-03-16 20:43 ` Marek Vasut
0 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:43 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> Use back reference instead of repeating the search pattern. Later on
> this could lead to a more generic way of replacing values in the .h file.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-16 10:00 ` [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions Christophe Chapuis
@ 2024-03-16 20:44 ` Marek Vasut
2024-03-18 13:10 ` [oe] " Peter Kjellerstedt
1 sibling, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:44 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> Use [ \t] to detect optionnal spaces at the beginning of each
> line, and after the define.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
You could've squashed this into 5/7, but either way is fine:
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc
2024-03-16 10:00 ` [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc Christophe Chapuis
@ 2024-03-16 20:45 ` Marek Vasut
0 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-16 20:45 UTC (permalink / raw)
To: Christophe Chapuis, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> As it can be usefull to customize these other variables, let's
> add them in lv-conf.inc.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 20:42 ` Marek Vasut
@ 2024-03-16 21:55 ` Christophe Chapuis
2024-03-17 5:44 ` Marek Vasut
0 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-16 21:55 UTC (permalink / raw)
To: Marek Vasut; +Cc: openembedded-devel, Khem Raj, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
It could be conditional eventually; I just took the line from lvgl-demo-fb,
where it wasn't.
Ideally, both should be moved in lv-conf.inc, where the lvgl drm setting is
activated. But I didn't want to expand again the scope of this patchset,
initially focused simply on adding some variables to lv-conf.inc.
On Sat, Mar 16, 2024 at 10:08 PM Marek Vasut <marex@denx.de> wrote:
> On 3/16/24 11:00 AM, Christophe Chapuis wrote:
> > When DRM is activated for LVGL, it adds a dependency on drm.h.
> > As for lvgl-demo-fb, add an include path to fix this usecase.
> >
> > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> > ---
> > meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > index 8bd718efd..6a9a7411b 100644
> > --- a/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > +++ b/meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb
> > @@ -21,6 +21,8 @@ inherit cmake
> > EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib} -DBUILD_SHARED_LIBS=ON"
> > S = "${WORKDIR}/git"
> >
> > +TARGET_CFLAGS += "-I${STAGING_INCDIR}/libdrm"
>
> Shouldn't this be conditional only if PACKAGECONFIG contains 'drm' ?
>
[-- Attachment #2: Type: text/html, Size: 2154 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-16 21:55 ` Christophe Chapuis
@ 2024-03-17 5:44 ` Marek Vasut
2024-03-17 7:46 ` [oe] " Martin Jansa
0 siblings, 1 reply; 26+ messages in thread
From: Marek Vasut @ 2024-03-17 5:44 UTC (permalink / raw)
To: Christophe Chapuis; +Cc: openembedded-devel, Khem Raj, Fabio Estevam
On 3/16/24 10:55 PM, Christophe Chapuis wrote:
> It could be conditional eventually; I just took the line from lvgl-demo-fb,
> where it wasn't.
>
> Ideally, both should be moved in lv-conf.inc, where the lvgl drm setting is
> activated. But I didn't want to expand again the scope of this patchset,
> initially focused simply on adding some variables to lv-conf.inc.
I think I will just defer that decision to Khem.
My concern is that a system with SDL or fbdev backend may not have
libdrm available, so I think it should be conditional.
I think this will handle that concern:
TARGET_CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'drm',
'-I${STAGING_INCDIR}/libdrm', '', d)}"
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [oe] [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-17 5:44 ` Marek Vasut
@ 2024-03-17 7:46 ` Martin Jansa
2024-03-17 16:02 ` Marek Vasut
0 siblings, 1 reply; 26+ messages in thread
From: Martin Jansa @ 2024-03-17 7:46 UTC (permalink / raw)
To: Marek Vasut
Cc: Christophe Chapuis, openembedded-devel, Khem Raj, Fabio Estevam
The extra -I flag won't harm even when libdrm isn't there.
lvgl-demo-fb also doesn't do it conditionally based on drm PACKAGECONFIG.
If someone want's to fix this properly then should also use pkg-config
(and tests/FindLibDRM.cmake in the lvgl repo), but lets not block this
fix based on that.
This whole issue is just revealed by the typo fix in
https://patchwork.yoctoproject.org/project/oe/patch/20240316100056.409758-1-chris.chapuis@gmail.com/
which fixed lv-conf.inc to work for lvgl resulting in LV_USE_LINUX_DRM
being respected based on PACKAGECONFIG drm.
Acked-by: Martin Jansa <martin.jansa@gmail.com>
On Sun, Mar 17, 2024 at 6:45 AM Marek Vasut <marex@denx.de> wrote:
>
> On 3/16/24 10:55 PM, Christophe Chapuis wrote:
> > It could be conditional eventually; I just took the line from lvgl-demo-fb,
> > where it wasn't.
> >
> > Ideally, both should be moved in lv-conf.inc, where the lvgl drm setting is
> > activated. But I didn't want to expand again the scope of this patchset,
> > initially focused simply on adding some variables to lv-conf.inc.
>
> I think I will just defer that decision to Khem.
>
> My concern is that a system with SDL or fbdev backend may not have
> libdrm available, so I think it should be conditional.
>
> I think this will handle that concern:
>
> TARGET_CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'drm',
> '-I${STAGING_INCDIR}/libdrm', '', d)}"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#109376): https://lists.openembedded.org/g/openembedded-devel/message/109376
> Mute This Topic: https://lists.openembedded.org/mt/104964303/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [oe] [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include
2024-03-17 7:46 ` [oe] " Martin Jansa
@ 2024-03-17 16:02 ` Marek Vasut
0 siblings, 0 replies; 26+ messages in thread
From: Marek Vasut @ 2024-03-17 16:02 UTC (permalink / raw)
To: Martin Jansa
Cc: Christophe Chapuis, openembedded-devel, Khem Raj, Fabio Estevam
On 3/17/24 8:46 AM, Martin Jansa wrote:
> The extra -I flag won't harm even when libdrm isn't there.
>
> lvgl-demo-fb also doesn't do it conditionally based on drm PACKAGECONFIG.
>
> If someone want's to fix this properly then should also use pkg-config
> (and tests/FindLibDRM.cmake in the lvgl repo), but lets not block this
> fix based on that.
The CMake fix is already being worked on upstream.
For completeness:
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-16 10:00 ` [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions Christophe Chapuis
2024-03-16 20:44 ` Marek Vasut
@ 2024-03-18 13:10 ` Peter Kjellerstedt
2024-03-18 14:01 ` Marek Vasut
1 sibling, 1 reply; 26+ messages in thread
From: Peter Kjellerstedt @ 2024-03-18 13:10 UTC (permalink / raw)
To: Tofe, openembedded-devel; +Cc: Marek Vasut, Khem Raj, Fabio Estevam
> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Tofe
> Sent: den 16 mars 2024 11:01
> To: openembedded-devel@lists.openembedded.org
> Cc: Marek Vasut <marex@denx.de>; Khem Raj <raj.khem@gmail.com>; Fabio Estevam <festevam@denx.de>; Christophe Chapuis <chris.chapuis@gmail.com>
> Subject: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
>
> Use [ \t] to detect optionnal spaces at the beginning of each
> line, and after the define.
>
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
> meta-oe/recipes-graphics/lvgl/lv-conf.inc | 46 +++++++++++------------
> 1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-
> graphics/lvgl/lv-conf.inc
> index 9ee9f283d..2b5d4a14a 100644
> --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> @@ -35,37 +35,37 @@ do_configure:append() {
>
> sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
> \
> - -e "s|\(^#define LV_USE_LINUX_DRM \).*|\1${LVGL_CONFIG_USE_DRM}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_LINUX_DRM[ \t]\).*|\1${LVGL_CONFIG_USE_DRM}|g" \
> \
> - -e "s|\(^#define LV_USE_LINUX_FBDEV \).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_LINUX_FBDEV[ \t]\).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
> \
> - -e "s|\(^#define LV_USE_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> - -e "s|\(^#define LV_USE_DRAW_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> - -e "s|\(^ \+#define LV_SDL_BUF_COUNT \).*|\1 2|g" \
> - -e "s|\(^ \+#define LV_SDL_FULLSCREEN \).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_DRAW_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> + -e "s|\(^[ \t]*#define LV_SDL_BUF_COUNT[ \t]\).*|\1 2|g" \
> + -e "s|\(^[ \t]*#define LV_SDL_FULLSCREEN[ \t]\).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
> \
> - -e "s|\(^#define LV_COLOR_DEPTH \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
> - -e "s|\(#define LV_MEM_CUSTOM .*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
> - -e "s|\(^ \+#define LV_MEM_SIZE \).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|g" \
> + -e "s|\(^[ \t]*#define LV_COLOR_DEPTH[ \t]\).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
> + -e "s|\(^[ \t]*#define LV_MEM_CUSTOM[ \t].*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
> + -e "s|\(^[ \t]*#define LV_MEM_SIZE[ \t]\).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|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" \
> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM[ \t]\).*|\1 1|g" \
> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_INCLUDE[ \t]\).*|\1 <stdint.h>|g" \
> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_SYS_TIME_EXPR[ \t]\).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \
> \
> - -e "s|\(^#define LV_USE_EVDEV \).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_EVDEV[ \t]\).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
> \
> - -e "s|\(^#define LV_USE_ASSERT_NULL \).*|\1${DEBUG_BUILD}|g" \
> - -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|\1${DEBUG_BUILD}|g" \
> - -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|\1${DEBUG_BUILD}|g" \
> - -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|\1${DEBUG_BUILD}|g" \
> - -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_NULL[ \t]\).*|\1${DEBUG_BUILD}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MALLOC[ \t]\).*|\1${DEBUG_BUILD}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_STYLE[ \t]\).*|\1${DEBUG_BUILD}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MEM_INTEGRITY[ \t]\).*|\1${DEBUG_BUILD}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g" \
> \
> - -e "s|\(^#define LV_USE_LOG \).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
> - -e "s|\(^ \+#define LV_LOG_LEVEL \).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
> - -e "s|\(^ \+#define LV_LOG_PRINTF \).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_LOG[ \t]\).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
> + -e "s|\(^[ \t]*#define LV_LOG_LEVEL[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
> + -e "s|\(^[ \t]*#define LV_LOG_PRINTF[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
> \
> - -e "s|\(^#define LV_USE_FONT_COMPRESSED \).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
> - -e "s|\(^ \+#define LV_THEME_DEFAULT_DARK \).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
> + -e "s|\(^[ \t]*#define LV_USE_FONT_COMPRESSED[ \t]\).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
> + -e "s|\(^[ \t]*#define LV_THEME_DEFAULT_DARK[ \t]\).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
> \
> -i "${S}/lv_conf.h"
> }
> --
> 2.44.0
I would recommend the following:
* Use "\s" instead of "[ \t]".
* Enable extended regular expressions (ERE) by adding the -r option.
Then you can change "\(...\)" to "(...)".
* Change "\(^....\)" to "^(...)" (with ERE enabled).
* Remove the "g" flag as none of the expressions are designed to match
multiple times per line.
//Peter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-18 13:10 ` [oe] " Peter Kjellerstedt
@ 2024-03-18 14:01 ` Marek Vasut
2024-03-18 15:42 ` Christophe Chapuis
0 siblings, 1 reply; 26+ messages in thread
From: Marek Vasut @ 2024-03-18 14:01 UTC (permalink / raw)
To: Peter Kjellerstedt, Tofe, openembedded-devel; +Cc: Khem Raj, Fabio Estevam
On 3/18/24 2:10 PM, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Tofe
>> Sent: den 16 mars 2024 11:01
>> To: openembedded-devel@lists.openembedded.org
>> Cc: Marek Vasut <marex@denx.de>; Khem Raj <raj.khem@gmail.com>; Fabio Estevam <festevam@denx.de>; Christophe Chapuis <chris.chapuis@gmail.com>
>> Subject: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
>>
>> Use [ \t] to detect optionnal spaces at the beginning of each
>> line, and after the define.
>>
>> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
>> ---
>> meta-oe/recipes-graphics/lvgl/lv-conf.inc | 46 +++++++++++------------
>> 1 file changed, 23 insertions(+), 23 deletions(-)
>>
>> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-
>> graphics/lvgl/lv-conf.inc
>> index 9ee9f283d..2b5d4a14a 100644
>> --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
>> +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
>> @@ -35,37 +35,37 @@ do_configure:append() {
>>
>> sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
>> \
>> - -e "s|\(^#define LV_USE_LINUX_DRM \).*|\1${LVGL_CONFIG_USE_DRM}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_LINUX_DRM[ \t]\).*|\1${LVGL_CONFIG_USE_DRM}|g" \
>> \
>> - -e "s|\(^#define LV_USE_LINUX_FBDEV \).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_LINUX_FBDEV[ \t]\).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
>> \
>> - -e "s|\(^#define LV_USE_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
>> - -e "s|\(^#define LV_USE_DRAW_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
>> - -e "s|\(^ \+#define LV_SDL_BUF_COUNT \).*|\1 2|g" \
>> - -e "s|\(^ \+#define LV_SDL_FULLSCREEN \).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_DRAW_SDL[ \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
>> + -e "s|\(^[ \t]*#define LV_SDL_BUF_COUNT[ \t]\).*|\1 2|g" \
>> + -e "s|\(^[ \t]*#define LV_SDL_FULLSCREEN[ \t]\).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
>> \
>> - -e "s|\(^#define LV_COLOR_DEPTH \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
>> - -e "s|\(#define LV_MEM_CUSTOM .*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
>> - -e "s|\(^ \+#define LV_MEM_SIZE \).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|g" \
>> + -e "s|\(^[ \t]*#define LV_COLOR_DEPTH[ \t]\).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
>> + -e "s|\(^[ \t]*#define LV_MEM_CUSTOM[ \t].*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
>> + -e "s|\(^[ \t]*#define LV_MEM_SIZE[ \t]\).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|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" \
>> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM[ \t]\).*|\1 1|g" \
>> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_INCLUDE[ \t]\).*|\1 <stdint.h>|g" \
>> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_SYS_TIME_EXPR[ \t]\).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \
>> \
>> - -e "s|\(^#define LV_USE_EVDEV \).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_EVDEV[ \t]\).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
>> \
>> - -e "s|\(^#define LV_USE_ASSERT_NULL \).*|\1${DEBUG_BUILD}|g" \
>> - -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|\1${DEBUG_BUILD}|g" \
>> - -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|\1${DEBUG_BUILD}|g" \
>> - -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY \).*|\1${DEBUG_BUILD}|g" \
>> - -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_NULL[ \t]\).*|\1${DEBUG_BUILD}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MALLOC[ \t]\).*|\1${DEBUG_BUILD}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_STYLE[ \t]\).*|\1${DEBUG_BUILD}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MEM_INTEGRITY[ \t]\).*|\1${DEBUG_BUILD}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g" \
>> \
>> - -e "s|\(^#define LV_USE_LOG \).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
>> - -e "s|\(^ \+#define LV_LOG_LEVEL \).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
>> - -e "s|\(^ \+#define LV_LOG_PRINTF \).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_LOG[ \t]\).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
>> + -e "s|\(^[ \t]*#define LV_LOG_LEVEL[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
>> + -e "s|\(^[ \t]*#define LV_LOG_PRINTF[ \t]\).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
>> \
>> - -e "s|\(^#define LV_USE_FONT_COMPRESSED \).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
>> - -e "s|\(^ \+#define LV_THEME_DEFAULT_DARK \).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
>> + -e "s|\(^[ \t]*#define LV_USE_FONT_COMPRESSED[ \t]\).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
>> + -e "s|\(^[ \t]*#define LV_THEME_DEFAULT_DARK[ \t]\).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
>> \
>> -i "${S}/lv_conf.h"
>> }
>> --
>> 2.44.0
>
> I would recommend the following:
> * Use "\s" instead of "[ \t]".
I didn't know \s , where is this documented ? Is this similar to
[[:space:]] ?
> * Enable extended regular expressions (ERE) by adding the -r option.
> Then you can change "\(...\)" to "(...)".
> * Change "\(^....\)" to "^(...)" (with ERE enabled).
> * Remove the "g" flag as none of the expressions are designed to match
> multiple times per line.
Chris, do you want to send a follow up patch (I think this series is
already applied), or shall I do that while preparing LVGL 9.1 series?
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-18 14:01 ` Marek Vasut
@ 2024-03-18 15:42 ` Christophe Chapuis
2024-03-18 21:59 ` Marek Vasut
0 siblings, 1 reply; 26+ messages in thread
From: Christophe Chapuis @ 2024-03-18 15:42 UTC (permalink / raw)
To: Marek Vasut
Cc: Peter Kjellerstedt, openembedded-devel, Khem Raj, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 6698 bytes --]
I avoided \s because it's not well known, and I would also prefer using
[[:space:]] as it is POSIX compliant.
I can propose a patch for this, taking Peter's remarks into account.
On Mon, Mar 18, 2024 at 3:46 PM Marek Vasut <marex@denx.de> wrote:
> On 3/18/24 2:10 PM, Peter Kjellerstedt wrote:
> >> -----Original Message-----
> >> From: openembedded-devel@lists.openembedded.org <
> openembedded-devel@lists.openembedded.org> On Behalf Of Tofe
> >> Sent: den 16 mars 2024 11:01
> >> To: openembedded-devel@lists.openembedded.org
> >> Cc: Marek Vasut <marex@denx.de>; Khem Raj <raj.khem@gmail.com>; Fabio
> Estevam <festevam@denx.de>; Christophe Chapuis <chris.chapuis@gmail.com>
> >> Subject: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed
> instructions
> >>
> >> Use [ \t] to detect optionnal spaces at the beginning of each
> >> line, and after the define.
> >>
> >> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> >> ---
> >> meta-oe/recipes-graphics/lvgl/lv-conf.inc | 46 +++++++++++------------
> >> 1 file changed, 23 insertions(+), 23 deletions(-)
> >>
> >> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> b/meta-oe/recipes-
> >> graphics/lvgl/lv-conf.inc
> >> index 9ee9f283d..2b5d4a14a 100644
> >> --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> >> +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> >> @@ -35,37 +35,37 @@ do_configure:append() {
> >>
> >> sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 //
> Enabled by ${PN}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_LINUX_DRM
> \).*|\1${LVGL_CONFIG_USE_DRM}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_LINUX_DRM[
> \t]\).*|\1${LVGL_CONFIG_USE_DRM}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_LINUX_FBDEV
> \).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_LINUX_FBDEV[
> \t]\).*|\1${LVGL_CONFIG_USE_FBDEV}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_SDL \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> >> - -e "s|\(^#define LV_USE_DRAW_SDL
> \).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> >> - -e "s|\(^ \+#define LV_SDL_BUF_COUNT \).*|\1 2|g" \
> >> - -e "s|\(^ \+#define LV_SDL_FULLSCREEN
> \).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_SDL[
> \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_DRAW_SDL[
> \t]\).*|\1${LVGL_CONFIG_USE_SDL}|g" \
> >> + -e "s|\(^[ \t]*#define LV_SDL_BUF_COUNT[ \t]\).*|\1 2|g" \
> >> + -e "s|\(^[ \t]*#define LV_SDL_FULLSCREEN[
> \t]\).*|\1${LVGL_CONFIG_SDL_FULLSCREEN}|g" \
> >> \
> >> - -e "s|\(^#define LV_COLOR_DEPTH
> \).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
> >> - -e "s|\(#define LV_MEM_CUSTOM
> .*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
> >> - -e "s|\(^ \+#define LV_MEM_SIZE
> \).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|g" \
> >> + -e "s|\(^[ \t]*#define LV_COLOR_DEPTH[
> \t]\).*|\1${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
> >> + -e "s|\(^[ \t]*#define LV_MEM_CUSTOM[
> \t].*\).*|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
> >> + -e "s|\(^[ \t]*#define LV_MEM_SIZE[
> \t]\).*|\1${LVGL_CONFIG_LV_MEM_SIZE}|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" \
> >> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM[ \t]\).*|\1 1|g" \
> >> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_INCLUDE[ \t]\).*|\1
> <stdint.h>|g" \
> >> + -e "s|\(^[ \t]*#define LV_TICK_CUSTOM_SYS_TIME_EXPR[
> \t]\).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_EVDEV
> \).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_EVDEV[
> \t]\).*|\1${LVGL_CONFIG_USE_EVDEV}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_ASSERT_NULL \).*|\1${DEBUG_BUILD}|g" \
> >> - -e "s|\(^#define LV_USE_ASSERT_MALLOC \).*|\1${DEBUG_BUILD}|g"
> \
> >> - -e "s|\(^#define LV_USE_ASSERT_STYLE \).*|\1${DEBUG_BUILD}|g" \
> >> - -e "s|\(^#define LV_USE_ASSERT_MEM_INTEGRITY
> \).*|\1${DEBUG_BUILD}|g" \
> >> - -e "s|\(^#define LV_USE_ASSERT_OBJ \).*|\1${DEBUG_BUILD}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_NULL[
> \t]\).*|\1${DEBUG_BUILD}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MALLOC[
> \t]\).*|\1${DEBUG_BUILD}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_STYLE[
> \t]\).*|\1${DEBUG_BUILD}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_MEM_INTEGRITY[
> \t]\).*|\1${DEBUG_BUILD}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[
> \t]\).*|\1${DEBUG_BUILD}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_LOG
> \).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
> >> - -e "s|\(^ \+#define LV_LOG_LEVEL
> \).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
> >> - -e "s|\(^ \+#define LV_LOG_PRINTF
> \).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_LOG[
> \t]\).*|\1${LVGL_CONFIG_LV_USE_LOG}|g" \
> >> + -e "s|\(^[ \t]*#define LV_LOG_LEVEL[
> \t]\).*|\1${LVGL_CONFIG_LV_LOG_LEVEL}|g" \
> >> + -e "s|\(^[ \t]*#define LV_LOG_PRINTF[
> \t]\).*|\1${LVGL_CONFIG_LV_LOG_PRINTF}|g" \
> >> \
> >> - -e "s|\(^#define LV_USE_FONT_COMPRESSED
> \).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
> >> - -e "s|\(^ \+#define LV_THEME_DEFAULT_DARK
> \).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
> >> + -e "s|\(^[ \t]*#define LV_USE_FONT_COMPRESSED[
> \t]\).*|\1${LVGL_CONFIG_LV_USE_FONT_COMPRESSED}|g" \
> >> + -e "s|\(^[ \t]*#define LV_THEME_DEFAULT_DARK[
> \t]\).*|\1${LVGL_CONFIG_LV_THEME_DEFAULT_DARK}|g" \
> >> \
> >> -i "${S}/lv_conf.h"
> >> }
> >> --
> >> 2.44.0
> >
> > I would recommend the following:
> > * Use "\s" instead of "[ \t]".
>
> I didn't know \s , where is this documented ? Is this similar to
> [[:space:]] ?
>
> > * Enable extended regular expressions (ERE) by adding the -r option.
> > Then you can change "\(...\)" to "(...)".
> > * Change "\(^....\)" to "^(...)" (with ERE enabled).
> > * Remove the "g" flag as none of the expressions are designed to match
> > multiple times per line.
>
> Chris, do you want to send a follow up patch (I think this series is
> already applied), or shall I do that while preparing LVGL 9.1 series?
>
[-- Attachment #2: Type: text/html, Size: 9014 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-18 15:42 ` Christophe Chapuis
@ 2024-03-18 21:59 ` Marek Vasut
2024-03-21 20:49 ` Peter Kjellerstedt
0 siblings, 1 reply; 26+ messages in thread
From: Marek Vasut @ 2024-03-18 21:59 UTC (permalink / raw)
To: Christophe Chapuis
Cc: Peter Kjellerstedt, openembedded-devel, Khem Raj, Fabio Estevam
On 3/18/24 4:42 PM, Christophe Chapuis wrote:
> I avoided \s because it's not well known, and I would also prefer using
> [[:space:]] as it is POSIX compliant.
>
> I can propose a patch for this, taking Peter's remarks into account.
Yes please, already reviewed too.
btw please stop top-posting .
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions
2024-03-18 21:59 ` Marek Vasut
@ 2024-03-21 20:49 ` Peter Kjellerstedt
0 siblings, 0 replies; 26+ messages in thread
From: Peter Kjellerstedt @ 2024-03-21 20:49 UTC (permalink / raw)
To: Marek Vasut, Christophe Chapuis
Cc: openembedded-devel, Khem Raj, Fabio Estevam
> -----Original Message-----
> From: Marek Vasut <marex@denx.de>
> Sent: den 18 mars 2024 23:00
> To: Christophe Chapuis <chris.chapuis@gmail.com>
> Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; openembedded-
> devel@lists.openembedded.org; Khem Raj <raj.khem@gmail.com>; Fabio Estevam
> <festevam@denx.de>
> Subject: Re: [oe] [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize
> sed instructions
>
> On 3/18/24 4:42 PM, Christophe Chapuis wrote:
> > I avoided \s because it's not well known, and I would also prefer using
> > [[:space:]] as it is POSIX compliant.
See chapter "5.6 regular expression extensions" in the sed info page for \s
and a number of other similar sequences (for anyone used to Perl's regular
expressions, \s is the normal way to match whitespace). And true, this is
not POSIX, but neither is the -i option that is also used by the same
command.
> >
> > I can propose a patch for this, taking Peter's remarks into account.
Thank you.
>
> Yes please, already reviewed too.
>
> btw please stop top-posting .
//Peter
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2024-03-21 20:50 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-16 10:00 [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Christophe Chapuis
2024-03-16 10:00 ` [meta-oe][PATCH v4 2/7] lvgl: install lv_conf.h Christophe Chapuis
2024-03-16 20:41 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 3/7] lvgl: remove useless FILES include Christophe Chapuis
2024-03-16 20:41 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 4/7] lvgl: cleanup sed instructions in lv-conf.inc Christophe Chapuis
2024-03-16 20:43 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 5/7] lvgl: add more variables to lv-conf.inc Christophe Chapuis
2024-03-16 20:45 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 6/7] lvgl: fix libdrm include Christophe Chapuis
2024-03-16 16:08 ` Khem Raj
2024-03-16 16:17 ` Christophe Chapuis
2024-03-16 16:30 ` Khem Raj
2024-03-16 20:42 ` Marek Vasut
2024-03-16 21:55 ` Christophe Chapuis
2024-03-17 5:44 ` Marek Vasut
2024-03-17 7:46 ` [oe] " Martin Jansa
2024-03-17 16:02 ` Marek Vasut
2024-03-16 10:00 ` [meta-oe][PATCH v4 7/7] lvgl: lv-conf.inc: generalize sed instructions Christophe Chapuis
2024-03-16 20:44 ` Marek Vasut
2024-03-18 13:10 ` [oe] " Peter Kjellerstedt
2024-03-18 14:01 ` Marek Vasut
2024-03-18 15:42 ` Christophe Chapuis
2024-03-18 21:59 ` Marek Vasut
2024-03-21 20:49 ` Peter Kjellerstedt
2024-03-16 20:41 ` [meta-oe][PATCH v4 1/7] lvgl: fix typo in lv-conf.inc Marek Vasut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.