LVGL Port for Linux Framebuffer in Beaglebone Black with Debian Buster

I’m starting to learn this excellent library. I own an old Beaglebone Black, with 2GB EMMC memory. Under these conditions, the installation of a system with a window manager and applications is quite limited. I was successful in porting the library to this platform, but I had to discover some things that are not clear in the documentation:

1- When I cloned the repository to my machine and tried to compile the library, I got errors. You must also clone the library repositories (LVGL), drivers (lv_drivers) and examples (lv_examples) as subdirectories of the port for linux framebuffer.

2- You must install libsdl, according to the installation guidelines for the micropython port (I had not installed it before and there were compilation errors due to lack of SDL): sudo apt-get install build-essential libreadline-dev libffi-dev git pkg-config libsdl2-2.0-0 libsdl2-dev python

3- I haven’t compiled any of my own projects yet. I just succeeded in compiling the library demo. But as I understand it, a project of its own needs to have in its subdirectory the repositories lv_drivers and lvgl to be compiled.

4- I’m trying to figure out how to make the touchscreen work without using the X server. The touchscreen present on the LCD is not even detected. But my touchpad keyboard does. I just haven’t found any way to use it with the library yet.

5- When I change the settings in lv_drv_conf.h, I get compilation errors. I already changed the USE_LIBINPUT and USE_EVDEV sections, putting the correct address (/ dev / event1) I get compilation errors.
lv_drivers / indev / libinput.c: 19: 10: fatal error: libinput.h: File or directory does not exist
#include <libinput.h>

6- I ran sudo apt install libelput1 libinput-bin libinput-dev libinput-tools libinput10

7- New errors, this time related to the device configuration:
libinput.c :(. text + 0x28): reference not defined for “libinput_device_unref”
/ usr / bin / ld: libinput.c :(. text + 0x2e): reference not defined for “libinput_path_remove_device”
/ usr / bin / ld: libinput.c :(. text + 0x3a): reference not defined for “libinput_path_add_device”
/ usr / bin / ld: libinput.c :(. text + 0x44): reference not defined for “libinput_device_ref”
/ usr / bin / ld: lv_drivers / indev / libinput.o: in the “libinput_init” function:
libinput.c :(. text + 0x90): reference not defined for “libinput_path_create_context”
/ usr / bin / ld: libinput.c :(. text + 0x9c): reference not defined for “libinput_device_unref”
/ usr / bin / ld: libinput.c :(. text + 0xa2): reference not defined for “libinput_path_remove_device”
/ usr / bin / ld: libinput.c :(. text + 0xae): reference not defined for “libinput_path_add_device”
/ usr / bin / ld: libinput.c :(. text + 0xb8): reference not defined for “libinput_device_ref”
/ usr / bin / ld: libinput.c :(. text + 0xc6): reference not defined for “libinput_get_fd”
/ usr / bin / ld: lv_drivers / indev / libinput.o: in the “libinput_read” function:
libinput.c :(. text + 0x12e): reference not defined for “libinput_dispatch”
/ usr / bin / ld: libinput.c :(. text + 0x134): reference not defined for “libinput_get_event”
/ usr / bin / ld: libinput.c :(. text + 0x166): reference not defined for “libinput_event_destroy”
/ usr / bin / ld: libinput.c :(. text + 0x16c): reference not defined for “libinput_get_event”
/ usr / bin / ld: libinput.c :(. text + 0x176): reference not defined for “libinput_event_get_type”
/ usr / bin / ld: libinput.c :(. text + 0x186): reference not defined for “libinput_event_get_touch_event”
/ usr / bin / ld: libinput.c :(. text + 0x198): reference not defined for “libinput_event_touch_get_x_transformed”
/ usr / bin / ld: libinput.c :(. text + 0x1b2): reference not defined for “libinput_event_touch_get_y_transformed”

You only need one of libinput or evdev, not both. I’d suggest using evdev since it doesn’t need any extra libraries.

Most of the repositories require you to download submodules. I’ve added a note here: https://github.com/lvgl/lv_port_linux_frame_buffer/commit/fc866ce725b89fbab8199a44373ea6b10fd8acab

You only need SDL if you’re using the PC simulator. The framebuffer port shouldn’t need SDL.

I tried both ways separately: evdev and libinput. With evdev, it didn’t show any errors, but it still doesn’t work.

Using evtest I can detect the touchpad functioning, even without the X installed. But I couldn’t get the touchpad to work in the demo.

There are some touchpad resolution and calibration settings that I haven’t touched yet. I also enabled keyboard and mouse in the lv_drv_conf.h file, but I still haven’t been able to make it work.

But I am assuming that evdev support is enabled in the demo … I just saw this thread here: https://github.com/lvgl/lvgl/issues/842 and thought that maybe the generated demo file does not detect events from evdev … I’ll check it out.

Another thing … anything I type on the keyboard is not captured by the demo, but by bash. When I type a linux command, the interface rendering is broken and the shell erase the interface. Could it be something not enabled in the demo?

This will be my Covid task. So I will keep posting here my experiences and errors, ok?

Did you initialize the driver using evdev_init? Did you register it with lv_indev_drv_register?

I think I lacked some contextual information about what I’m doing here. For now I have installed the library and am studying the sample files, changing some settings to see if I can make the widget demo work. I just noticed that in the main.c file there is no include for evdev. That’s probably why the demo doesn’t detect the touchpad. I’ll read the documentation and see if I can implement this in the demo to see if it works.

I am impressed by the speed and low memory usage. It will help me a lot in several projects that I’m playing. As soon as I am able to make these adjustments, I will test on Orange Pi (which is the platform I use most here).