lvgl icon indicating copy to clipboard operation
lvgl copied to clipboard

[buildroot] Need help to create LVGL package

Open legerch opened this issue 2 years ago • 2 comments

Introduce the problem

Hello everyone, I'm currently trying to port LVGL to buildroot but I'm stuck, I'm not very experienced with buildroot packing, furthermore, very few are using kconfig build system. And, for packages which currently used KConfig build system... they are the big one : busybox, linux, zephyr, uclibc, etc... So I don't have any simple example to help me.

This issues is related to lv_port_linux_frame_buffer - Issue 17 - Packing for buildroot.

Examples and cases

Current examples are :

  • Buildroot manual (KConfig part) : https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_packages_using_kconfig_for_configuration_files
  • Yocto meta-package : https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb
  • Busybox repository : https://github.com/mirror/busybox
  • SWUpdate repository : https://github.com/sbabic/swupdate

Suggested solution

So far, I have proper Config.in, lvgl.config (which is default config file generated with kconfig-qconf utility) and lvgl.hash. Main troubles are in lvgl.mk.
I'm joining my current patch to this issue (at txt format because github doesn't support patch.

When trying to run lvgl-rebuild or even lvgl-menuconfig in my buildroot directory, I got those errors :

>>> lvgl 8.3.1 Patching
Using /home/<userpath>/bsp-output/build/lvgl-8.3.1/.config as base
#
# merged configuration written to /home/<userpath>/bsp-output/build/lvgl-8.3.1/.config (needs make)
#
make[4]: *** No rule to make target « oldconfig ». Stop.
make[3]: *** [package/lvgl/lvgl.mk:18 : /home/<userpath>/bsp-output/build/lvgl-8.3.1/.stamp_dotconfig] Error 2
make[2]: *** [Makefile:84 : _all] Error 2

If anyone have more experience with buildroot packages and can help me to add support for LVGL, that will be appreciated ! Thank you for your time 0001-package-lvgl-new-package.patch.txt

legerch avatar Sep 04 '22 15:09 legerch

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot avatar Sep 19 '22 02:09 lvgl-bot

I'm commenting this issue to keep it open, I didn't have time to continue the support but I will, ASAP...

legerch avatar Sep 19 '22 11:09 legerch

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot avatar Oct 05 '22 02:10 lvgl-bot

Hello to all,

So I tried with CMake build system but I'm still struggling, especially with lv_conf.hfile (new patch can be found attached). I'm using option -DLV_CONF_PATH to set custom LVGL config file path but I'm still getting those errors:

src/core/../lv_conf_internal.h:46:17: note: « #pragma message: Possible failure to include lv_conf.h, please read the comment in this file if you get errors »
   46 |         #pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
      |                 ^~~~~~~

I don't understand why specified file can't be found, my CMake output is correct:

/home/<user>/Documents/buildroot/bsp-output/host/bin/cmake /home/<user>/Documents/buildroot/bsp-output/build/lvgl-8.3.1/ -DCMAKE_TOOLCHAIN_FILE="/home/<user>/Documents/buildroot/bsp-output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON  -DLV_CONF_PATH="/home/<user>/Documents/buildroot/bsp-external/lvgl/lvgl_conf.h"

Does anyone have any idea on this behaviour ? Did I missed a CMake option ? I don't see any in custom.cmake file.

Bonus question : Can I disable example build ? CMake file doesn't seem to have such option. 0001-package-lvgl-new-package.patch.txt

legerch avatar Oct 08 '22 15:10 legerch

-DLV_CONF_PATH="/home/<user>/Documents/buildroot/bsp-external/lvgl/lvgl_conf.h"

It's not lvgl_conf.h but lv_conf.h.

kisvegabor avatar Oct 10 '22 13:10 kisvegabor

It's not lvgl_conf.h but lv_conf.h.

Oh ! Thank you for your response, I though than since we can add our custom path for lvgl configuration, filename were not important... This fix the behaviour ! I push a pull request two days ago (https://github.com/lvgl/lvgl/pull/3733), since we found the issue, not sure if this is pertinent.

EDIT: I saw than pull request have been merged, thank you for your review ! (I keep the issue open for now just in case, once buildroot patch will be submit, I'm gonna close it)

legerch avatar Oct 11 '22 07:10 legerch

Happy to hear that it solved the issue!

(I keep the issue open for now just in case, once buildroot patch will be submit, I'm gonna close it)

Is there anything we can do on LVGL's side?

kisvegabor avatar Oct 12 '22 08:10 kisvegabor

Is there anything we can do on LVGL's side?

Currently, I think I have all I need with submitted pull request (https://github.com/lvgl/lvgl/pull/3733 and https://github.com/lvgl/lvgl/pull/3738), I had some trouble to understand at first how LVGL configuration was included, but now this is good to go 😄

For this repository, I'am able to built it with buildroot, now I have to include LVGL drivers but I saw than configuration file is required too without option to use an external one, I think I'm gonna submit a pull request with same behaviour than this repository to use external config (but this is not sure, maybe I'm gonna generate it automatically on buildroot side at compilation by using buildroot configuration infos, I need to do some tests before).

legerch avatar Oct 12 '22 10:10 legerch

Currently, I think I have all I need with submitted pull request (https://github.com/lvgl/lvgl/pull/3733 and https://github.com/lvgl/lvgl/pull/3738)

Great, both are merged now.

now I have to include LVGL drivers

Please wait a little bit with it. I'm almost ready with a new driver architecture. With this all the drivers will be hosted in LVGL.

kisvegabor avatar Oct 13 '22 10:10 kisvegabor

Great, both are merged now.

Perfect, thank you !

Please wait a little bit with it. I'm almost ready with a new driver architecture. With this all the drivers will be hosted in LVGL.

Oh, that's great news ! I didn't know than driver restructuration was in pending, I'm gonna take a look at it. Is this restructuration planned for v9.x ?

legerch avatar Oct 13 '22 11:10 legerch

Among many other restructuring it's planned for v9.0.

kisvegabor avatar Oct 13 '22 12:10 kisvegabor

Noted, thank you for those informations and all your support !
I'm gonna wait a little in this case to make buildroot port 😉

legerch avatar Oct 13 '22 12:10 legerch

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot avatar Oct 28 '22 02:10 lvgl-bot

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

So feel free to comment if you have remarks or ideas on this topic.

lvgl-bot avatar Nov 05 '22 02:11 lvgl-bot

由于这里有一段时间没有活动,我们关闭了这个问题。但别担心,对话仍然在这里,你可以随时回到它。

所以 ,如果你对这个话题有意见或想法,请随时发表评论。

where is patch

yangkkokk avatar Jun 29 '24 09:06 yangkkokk