SDL2 KMSDRM Linux x86/x64?

I’m trying to build a smallest possible linux OS backend for sdl2 for a stadard PC. At present time I have working setup based on Mesa + gles2, but the Mesa is too bloated and most of its drivers depend on the llvm, which is another bloatware I’d like to avoid.

I tried to compile libsdl2 with the kmsdrm video only. But it requires libgbm and the only package, that provides libgbm on x86/x94 is, again, Mesa. And Measas libgbm still needs DRI and/or Gallium drivers to work. So I’m stuck here. Any advice?

If your package is requiring LLVM, then is it a source only distribution and no compiling tools are installed on your system right now? Can you simply uninstall the LLVM package after you get everything working properly? What flavor of Linux are you using?

Please, jut forget the the LLVM as this is just a minor issue for me. The main question is: Do I need mesa and its dri/gallium drivers for SDL2 KMSDRM backend? Because if so, I can use GLES and don’t need to bother with KMSDRM. Or it is only usable for (mostly ARM) drivers, that ship with their own GBM?

I use gentoo portage for building the target OS (+ additional manual trimming) and last couple of weeks I’m triyng to use Buildroot for the same thing.

No clue about the requirements of each, sorry. :pensive: I haven’t tried to roll my own small version of Linux since DSL and Puppy Linux are available.