SDL2 vs Framebuffer

Hello,

I’m trying to make SDL2 working on my BananaPI under Gentoo using directly the FrameBuffer as X isn’t installed.

1/ I build it without X flags which lead to
/var/tmp/portage/media-libs/libsdl2-2.0.10/work/SDL2-2.0.10/configure --prefix=/usr --build=armv7a-hardfloat-linux-gnueabi --host=armv7a-hardfloat-linux-gnueabi --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/libsdl2-2.0.10 --htmldir=/usr/share/doc/libsdl2-2.0.10/html --with-sysroot=/ --libdir=/usr/lib -
-disable-static --enable-atomic
–enable-audio --enable-video
–enable-render --enable-events --disable-joystick
–disable-haptic --enable-power --enable-filesystem
–enable-threads --enable-timers --enable-file
–enable-loadso --enable-cpuinfo --enable-assembly
–disable-ssemath --disable-mmx --disable-3dnow
–disable-sse --disable-sse2 --disable-altivec
–disable-oss --disable-alsa --disable-alsa-shared
–disable-esd --enable-pulseaudio
–disable-pulseaudio-shared --disable-arts --disable-libsamplerate --disable-nas --disable-nas-shared --disable-sndio --disable-sndio-shared --enable-diskaudio --enable-dummyaudio --disable-video-wayland --disable-wayland-shared --disable-video-rpi --disable-video-x11 --disable-x11-shared --disable-video-x11-xcursor --disable-video-x11-xdbe --disable-video-x11-xinerama --disable-video-x11-xinput --disable-video-x11-xrandr --disable-video-x11-scrnsaver --disable-video-x11-xshape --disable-video-x11-vm
–disable-video-cocoa --disable-video-directfb
–disable-fusionsound --disable-fusionsound-shared
–disable-video-kmsdrm --disable-kmsdrm-shared
–enable-video-dummy --disable-video-opengl
–disable-video-opengles1 --disable-video-opengles2
–disable-video-vulkan --disable-libudev
–enable-dbus --disable-ibus --disable-input-tslib
–disable-directx --disable-rpath
–disable-render-d3d --without-x

and setting
export SDL_VIDEODRIVER=fbcon
but
./HelloWorld
Could not init SDL: fbcon not available

Compiling with KMS doesn’t work ether
/var/tmp/portage/media-libs/libsdl2-2.0.10/work/SDL2-2.0.10/configure --prefix=/usr --build=armv7a-hardfloat-linux-gnueabi --host=armv7a-hardfloat-linux-gnueabi --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/libsdl2-2.0.10 --htmldir=/usr/share/doc/libsdl2-2.0.10/html --with-sysroot=/ --libdir=/usr/lib --disable-static --enable-atomic --enable-audio --enable-video --enable-render --enable-events --disable-joystick --disable-haptic --enable-power --enable-filesystem --enable-threads --enable-timers --enable-file --enable-loadso --enable-cpuinfo --enable-assembly --disable-ssemath --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-altivec --disable-oss --disable-alsa --disable-alsa-shared --disable-esd --enable-pulseaudio --disable-pulseaudio-shared --disable-arts --disable-libsamplerate --disable-nas --disable-nas-shared --disable-sndio --disable-sndio-shared --enable-diskaudio --enable-dummyaudio --disable-video-wayland --disable-wayland-shared --disable-video-rpi --disable-video-x11 --disable-x11-shared --disable-video-x11-xcursor --disable-video-x11-xdbe --disable-video-x11-xinerama --disable-video-x11-xinput --disable-video-x11-xrandr --disable-video-x11-scrnsaver --disable-video-x11-xshape --disable-video-x11-vm --disable-video-cocoa --disable-video-directfb --disable-fusionsound --disable-fusionsound-shared --enable-video-kmsdrm --disable-kmsdrm-shared --enable-video-dummy --disable-video-opengl --disable-video-opengles1 --disable-video-opengles2 --disable-video-vulkan --disable-libudev --enable-dbus --disable-ibus --disable-input-tslib --disable-directx --disable-rpath --disable-render-d3d --without-x

but :
export SDL_VIDEODRIVER=kmsdrm
torchwood /home/laurent/Projets/Tests/SDL # ./HelloWorld
Could not init SDL: kmsdrm not available

Any tips idea or whatever ?

My goal : I created an dashboard application that use DirectFB. But as DirectFB is deprected and not anymore supported by Gentoo (and I’m facing some bug as well, I’m looking for a replacement :slight_smile: )

Thanks

Laurent