Download raw body.
Porting framebuffer+libevdev (Linux) to framebuffer+libinput (OpenBSD)
Porting framebuffer+libevdev (Linux) to framebuffer+libinput (OpenBSD)
On Fri, Jun 13, 2025 at 10:33:51AM -0700, ken.dickey@whidbey.com wrote:
> Greetings,
>
> I am looking at getting a framebuffer back end for the OpenSmalltalk IDEs up
> on OpenBSD.
>
> So my question is "Is this a sensible thing to attempt?".
Well it depends on the meaning of sensible ?
>
> I am an old (read slow) guy who writes a small amount of C code about once a
> decade and don't have a lot of resources to apply, but I do have some
> persistence and can learn, sometimes.
>
> My ol' brain does not do grand plan projects anymore, but is OK with small
> projects + tinkering to success.
>
> I updated a port of OpenSmalltalkVM's fbdev back end to Linux a while back
> [tested on {Alpine,Armbian} Linux].
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/Cog/platforms/unix/vm-display-fbdev
>
>
> So my question is really to the libinput/framebuffer folks.
>
> Is this something I should get into, or is it too large for my ol' shrinking
> brain?
>
> Thanks in advance for any input.
>
There are at least 3 ways to get a fbdev like dumb framebuffer under
OpenBSD:
- use SDL2 which has a framebuffer mode (there as games using this
mode, and also mpv supported it to play videos on the console last
time I checked). SDL2 also manages input, so you'd have to use its API
for input too.
- wsdisplay(4) is capable of providing a dump framebuffer with different
pixel formats depending on the hardare. See
xenocara/driver/xf86-video-wsfb/ for the code of the X11 driver that
uses this feature for some code samples. In this case you can use the
functions from libinput-openbsd for the input side. libinput-openbsd
is not a complete libinput port, there are many stub function but it's
enough to handle one pointer and one keyboard.
- finally drm also provides a potentially accelrated
framebuffer. There are some examples in libdrm on how to use
it. Again with drm you can use libpintput-openbsd for input.
I hope that, whatever method you choose, you'll enjoy your project.
--
Matthieu Herrb
Porting framebuffer+libevdev (Linux) to framebuffer+libinput (OpenBSD)
Porting framebuffer+libevdev (Linux) to framebuffer+libinput (OpenBSD)