lvgl: fix typo in lv-conf.inc
PATCH v3 1/5 lvgl: fix typo in lv-conf.inc
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.
--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-graphics/lvgl/lv-conf.inc +1 -1
@@ -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" \ \
Signature · 1 line
2.44.0
PATCH v3 2/5 lvgl: install lv_conf.h
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.
--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta-oe/recipes-graphics/lvgl/lv-conf.inc +5 -0
@@ -52,3 +52,8 @@ do_configure:append() { \ -i "${S}/lv_conf.h" } + +do_install:append() { + install -d "${D}${includedir}/${PN}" + install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h" +}
Signature · 1 line
2.44.0
Re: [meta-oe][PATCH v3 2/5] lvgl: install lv_conf.h
Quoted 5 lines · Christophe Chapuis
Add an install append to copy the generated
lv_conf.has 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 <[email protected]>
PATCH v3 3/5 lvgl: remove useless FILES include
In reply to Christophe ChapuisAs ${includedir}${PN} is already listed in FILES, there is no need to add one of its subdirectories.
--- meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb | 1 - 1 file changed, 1 deletion(-)
meta-oe/recipes-graphics/lvgl/lvgl_9.0.0.bb +0 -1
@@ -28,7 +28,6 @@ require lv-conf.inc FILES:${PN}-dev += "\ ${includedir}/${PN}/ \ - ${includedir}/${PN}/lvgl/ \ " SOLIBS = ".so" FILES_SOLIBSDEV = ""
Signature · 1 line
2.44.0
Re: [meta-oe][PATCH v3 3/5] lvgl: remove useless FILES include
Quoted 4 lines · 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 <[email protected]>
PATCH v3 4/5 lvgl: cleanup sed instructions in lv-conf.inc
In reply to Christophe ChapuisUse 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.
--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-)
meta-oe/recipes-graphics/lvgl/lv-conf.inc +14 -14
@@ -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" }
Signature · 1 line
2.44.0
Re: [meta-oe][PATCH v3 4/5] lvgl: cleanup sed instructions in lv-conf.inc
Quoted 20 lines · 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 <[email protected]>--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-)meta-oe/recipes-graphics/lvgl/lv-conf.inc +1
-2@@ -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" \
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 36
Quoted 10 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +5
-4+ -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" \
Wouldn't it be better to use '^ *#define...' here to catch the case where there are no spaces between start of line and #define ?
Quoted 12 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +3
-3- -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" \ \
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 51
Quoted 10 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +5
-5- -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" \
btw if you want this to be extra accurate, you could do also:
"s|\(^#define \<LV_USE_ASSERT_OBJ\>\).*|\1 ${DEBUG_BUILD}|g"
which would handle '#define LV_USE_ASSERT_OBJ<TAB>' as well .
PATCH v3 5/5 lvgl: add more variables to lv-conf.inc
In reply to Christophe ChapuisAs it can be usefull to customize these other variables, let's add them in lv-conf.inc.
--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
meta-oe/recipes-graphics/lvgl/lv-conf.inc +17 -0
@@ -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,6 +60,13 @@ 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" }
Signature · 1 line
2.44.0
Re: [meta-oe][PATCH v3 5/5] lvgl: add more variables to lv-conf.inc
Quoted 39 lines · 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 <[email protected]>--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)meta-oe/recipes-graphics/lvgl/lv-conf.inc +10
-0@@ -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" \
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 68
Quoted 9 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +6
-0@@ -50,6 +60,13 @@ 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" \
Similar concerns as in 4/5 , but aside from that:
Thanks !
Quoted 13 lines · 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 <[email protected]>--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-oe/recipes-graphics/lvgl/lv-conf.inc +0
-0
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 27
Quoted 5 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +1
-1@@ -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" \
Just to be on the safe side, can you please check if this also modifies the lv_conf.h in lvgl-demo-fb recipe correctly ? (I think it does not, but the fix is something like:
sed -e "s|#if 0 .*Set it to \"1\" to enable.*content.*|#if 1 // Enabled by ${PN}|g" \
Quoted 19 lines · Marek Vasut
Review
Quoted 9 lines · 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 <[email protected]>--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 25
Quoted 6 lines
index
cb676ac62..3dbdf769f100644meta-oe/recipes-graphics/lvgl/lv-conf.inc +0
-0@@ -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"Quoted 1 line
Quoted 9 lines
Quoted 1 line
- 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" \Just to be on the safe side, can you please check if this also modifies the
lv_conf.hin lvgl-demo-fb recipe correctly ? (I think it does not,
It does not, but this won't be a problem: it's already activated in lvgl-demo-fb's source code. More generally, if a lv_conf.h file already exists, it means the app has already customized it a bit, so we can consider it to be already active.
However, this pointed to a little issue I introduced: the do_install:append for lv_conf.h is only needed for lvgl.bb, not for other recipes that use lv-conf.inc. I'll move it to the main lvgl recipe.
I'll also generalize the sed instructions a bit more, to catch spaces and tabs. So in the end, each sed line would look like this:
-e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g"
What is the preferred way to do this ? Do I do a v4, or do I add two more patches?
Quoted 26 lines · Christophe Chapuis
Quoted 24 lines · Marek Vasut
Review
Quoted 9 lines · 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 <[email protected]>--- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 25
Quoted 6 lines
index
cb676ac62..3dbdf769f100644meta-oe/recipes-graphics/lvgl/lv-conf.inc +0
-0@@ -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"meta-oe/recipes-graphics/lvgl/lv-conf.inc do_configure:append() { · line 26
Quoted 2 lines
meta-oe/recipes-graphics/lvgl/lv-conf.inc +0
-1- 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" \
Quoted 8 lines
Quoted 4 lines
Just to be on the safe side, can you please check if this also modifies the
lv_conf.hin lvgl-demo-fb recipe correctly ? (I think it does not,It does not, but this won't be a problem: it's already activated in lvgl-demo-fb's source code. More generally, if a
lv_conf.hfile already exists, it means the app has already customized it a bit, so we can consider it to be already active.
OK
Quoted 10 lines
However, this pointed to a little issue I introduced: the do_install:append for
lv_conf.his only needed for lvgl.bb, not for other recipes that use lv-conf.inc. I'll move it to the main lvgl recipe.I'll also generalize the sed instructions a bit more, to catch spaces and tabs. So in the end, each sed line would look like this:
-e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g"What is the preferred way to do this ? Do I do a v4, or do I add two more patches?
V4 please.
Also please collect Reviewed-by tags in each new version .