Bladeren bron

lvgl: set the C library allocator in lv_conf.h

The LVGL recipes in scarthgap configure LVGL by editing lv_conf.h and
do not use Kconfig fragments: clib-malloc.cfg is fetched but ignored,
and LVGL still uses its builtin pool of 64 KB.

Select the C library allocator directly in lv_conf.h and drop the
fragment.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
Stefano Babic 2 dagen geleden
bovenliggende
commit
37dc4bda27
2 gewijzigde bestanden met toevoegingen van 7 en 7 verwijderingen
  1. 0 4
      recipes-graphics/lvgl/files/clib-malloc.cfg
  2. 7 3
      recipes-graphics/lvgl/lvgl_%.bbappend

+ 0 - 4
recipes-graphics/lvgl/files/clib-malloc.cfg

@@ -1,4 +0,0 @@
-# Use the C library allocator instead of LVGL's builtin pool. The builtin
-# pool has a fixed size (64 KB by default) and running out of it ends in
-# LV_ASSERT_HANDLER (while(1)): the recovery GUI hangs at 100% CPU.
-CONFIG_LV_USE_CLIB_MALLOC=y

+ 7 - 3
recipes-graphics/lvgl/lvgl_%.bbappend

@@ -1,5 +1,9 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-
 PACKAGECONFIG += "fbdev gridnav"
 
-SRC_URI += "file://clib-malloc.cfg"
+# Use the C library allocator instead of LVGL's builtin pool. The builtin
+# pool has a fixed size (64 KB by default) and running out of it ends in
+# LV_ASSERT_HANDLER (while(1)): the recovery GUI hangs at 100% CPU.
+do_configure:append() {
+    sed -r -e "s|^([[:space:]]*#define LV_USE_STDLIB_MALLOC[[:space:]]).*|\1LV_STDLIB_CLIB|" \
+        -i "${S}/lv_conf.h"
+}