Drop directfb
We're currently using the directfb backend of sdl2 to get osk-sdl running on downstream kernels, which only have framebuffer drivers. directfb upstream has been dead for a while now, it would be great if we could get rid of that component, but still support framebuffer. (In fact, directfb is only carried in Alpine, because we use it... it would be great to remove that piece of technical debt.)
Some ideas from the chat:
-
@minlexx and @IdanHoro have been working on directly implementing framebuffer into SDL2, but that is WIP: https://gitlab.com/IdanHoro/SDL/commits/video_fbdev. Apparently it would get accepted upstream if implemented properly (and that's what we would want, we don't want to fork sdl2 long-term obviously.) If going down this route, maybe we benefit from using tslib? directfb uses it too, but in contrary to directfb, tslib seems much more maintained.
-
@MartijnBraam proposed making my fbdev backend for wlroots work with cage, and then using that. While the backend works as proof of concept in my wlroots branch, there are quite some things that need to be resolved to make it work like that (IIRC it breaks when rebasing on master, it would need to be turned into an external module - see end of related PR - , cage would need to be adjusted to load that external module). A downside of this approach is, that we add more components to the initramfs, potentially making it start a bit slower and increasing the size.
-
Replace SDL2 dependency and custom keyboard with lvgl. It would look something like what NixOS Mobile has here. Some notes:
- lvgl is not packaged in alpine. It seems to be quite the feature-rich framework, a potential downside might be a long build time (not verified!)
- The linked PR is written against ruby bindings of lvgl, we would use C / C++ just like the existing osk-sdl codebase.
- We would have to replace our custom keyboard with the one from lvgl. I think our custom keyboard is pretty nice by now, and a few people have put a lot of work into it, so this wouldn't be an easy decision. If we do that, we should make sure that the lvgl keyboard is as least as good as our keyboard in every aspect.
- The keyboard layout seen on the screenshot isn't mobile friendly, how do we customize that? (our keyboard has the same layout as the one from phosh by now, and typing in a keyboard is quite convenient with it)
Let's discuss here!