Example of standard linux drivers

Hardware in linux such as the framebuffer is exposed through the devfs, e.g., /dev/fb0. Is there an example project which provides the necessary driver configurations to operate on a standard linux device?

This blog seems close but I don’t see how to “back out” the SDL2 simulator portion and use the real linux framebuffer: https://blog.littlevgl.com/2018-01-03/linux_fb

The blog post you linked explains everything and provides an example project with the required driver.


Thank you. You are correct. My initial query had asked the wrong question. Allow me to ask anew.

Once you have a working linux framebuffer application, as the blog shows, is there an example of how to change that to an SDL implementation, hopefully with just a few conditional compiles?

I’d like to be able to test my application on my desktop machine, then deploy the same code to our actual target without modification.


There is already an SDL project as well: https://github.com/littlevgl/pc_simulator_sdl_eclipse

Right, I’ve built and run that and had a cursory look at the code. The problem for me is that these two projects (pc_simulator and blog code) appear quite different, use different drivers, etc.

It seems starting off with the simple-as-possible code in the blog code and then “morphing” that into an SDL project would be the easiest route from here to there.

They’re really not that different. The main difference is that they have different configurations in lv_drv_conf.h and therefore they initialize different drivers in main.