Message ID | 20240314192153.202513-3-chris.chapuis@gmail.com |
---|---|
State | New |
Headers | show |
Series | [meta-oe,PATCHv2,1/3] lvgl: fix typo and install lv_conf.h | expand |
On 3/14/24 8:21 PM, Christophe Chapuis wrote: > As it can be usefull to customize these other variables, let's > add them in lv-conf.inc. > > Also, fix the install path to use ${PN} instead of "lvgl". Separate commit would be nice. btw when sending V3, please CC Khem and co. if you didn't yet. Also, I'll likely be sending LVGL 9.1 update next week, it should be out then. > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com> > --- > meta-oe/recipes-graphics/lvgl/lv-conf.inc | 49 +++++++++++++++-------- > 1 file changed, 33 insertions(+), 16 deletions(-) > > diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc > index cd14412e1..088842490 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" > @@ -26,34 +35,42 @@ 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" \ I'd say, make this clean up a separate patch, otherwise this is difficult to review. Then, add the extra features on top. Thanks !
Sure, I agree with your comments; I'll propose a patch v3 tonight or during the week-end, taking all this into consideration. On Fri, Mar 15, 2024 at 1:34 AM Marek Vasut <marex@denx.de> wrote: > On 3/14/24 8:21 PM, Christophe Chapuis wrote: > > As it can be usefull to customize these other variables, let's > > add them in lv-conf.inc. > > > > Also, fix the install path to use ${PN} instead of "lvgl". > > Separate commit would be nice. > > btw when sending V3, please CC Khem and co. if you didn't yet. > > Also, I'll likely be sending LVGL 9.1 update next week, it should be out > then. > > > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com> > > --- > > meta-oe/recipes-graphics/lvgl/lv-conf.inc | 49 +++++++++++++++-------- > > 1 file changed, 33 insertions(+), 16 deletions(-) > > > > diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc > b/meta-oe/recipes-graphics/lvgl/lv-conf.inc > > index cd14412e1..088842490 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" > > @@ -26,34 +35,42 @@ 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" \ > > I'd say, make this clean up a separate patch, otherwise this is > difficult to review. > > Then, add the extra features on top. > > Thanks ! >
On 3/15/24 9:16 AM, Christophe Chapuis wrote: > Sure, I agree with your comments; I'll propose a patch v3 tonight or during > the week-end, taking all this into consideration. Thank you ! I'll CC you on the LVGL 9.1 update once that is available too.
diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc index cd14412e1..088842490 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" @@ -26,34 +35,42 @@ 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_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" \ -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 \).*|\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|\(^#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_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_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" } do_install:append() { - install -d "${D}${includedir}/lvgl" - install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/lvgl/lv_conf.h" + install -d "${D}${includedir}/${PN}" + install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/${PN}/lv_conf.h" }
As it can be usefull to customize these other variables, let's add them in lv-conf.inc. Also, fix the install path to use ${PN} instead of "lvgl". Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com> --- meta-oe/recipes-graphics/lvgl/lv-conf.inc | 49 +++++++++++++++-------- 1 file changed, 33 insertions(+), 16 deletions(-)