OpenWrt Forum Archive

Topic: Add framebuffer to openwrt

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I also posted this on development page but no luck there and I hoped someone here encountered this problem.

I'm trying to connect a SPI TFT screen controlled by a ILI9341 controller. I found this driver https://github.com/GBert/openwrt-misc/tree/master/fbtft which I could compile for openwrt.
As far as I understand this driver works with linux framebuffer which I don't know how to put it in my openwrt image. I would need a framebuffer device in my /dev folder something like /dev/fb0.
I'm not very familiar with linux kernel and drivers system but I hope I managed to explain my problem. How can I get framebuffer in openwrt ?
Thanks,
Bogdan

The /dev/fb0 device is created automatically when the framebuffer device driver-- that you are about to compile-- successfully loads.  A kernel module is a binary file with the extension .ko.  You can either merge these into the kernel as you compile the whole kernel, or place them in the filesystem so they load and connect to the kernel later in the booting process.

In many routers, the SoC's SPI port is dedicated to driving the flash ROM.  You would need an additional chip select pin to use a second SPI device.

(Last edited by mk24 on 22 Jan 2015, 02:52)

I will use software SPI to communicate with the TFT controller IC, this part is taken care of.
@mk24: you said that I need to compile the framebuffer device driver .... where can I find it in menuconfig ? or do I need to find the source code and added in my menuconfig ?

Thanks.

After some digging around I managed to get fb.ko in my image (/lib/modules/3.14.28/fb.ko) but there is no device called /dev/fb0
When I try to load fb.ko (modprobe fb.ko) I get this error in dmesg: "[  438.670000] fb: exports duplicate symbol framebuffer_alloc (owned by kernel)"

I should understand that the module is already loaded ? If it is already loaded why don't I get a /dev/fb0 file ?

anyone was able to have a /dev/fb0 file on a ar71xx target system ?
I really need to get this working. Thanks.

bogdanul2003 wrote:

After some digging around I managed to get fb.ko in my image (/lib/modules/3.14.28/fb.ko) but there is no device called /dev/fb0
When I try to load fb.ko (modprobe fb.ko) I get this error in dmesg: "[  438.670000] fb: exports duplicate symbol framebuffer_alloc (owned by kernel)"

I should understand that the module is already loaded ? If it is already loaded why don't I get a /dev/fb0 file ?

No, it is not loaded, the error message explains why. I cannot tell you why the framebuffer_alloc is in your kernel and your fb.ko module, though... you'll have to dig in the source to understand why it's built in the two pieces of software...

bogdanul, have you got it working?
Bugs

framebuffer_alloc should not be duplicated in your driver's code, as its part of the kernel's frambuffer infrastructure, now in : drivers/video/fbdev/core/fbsysfs.c

I may speculate about its presence there : it was copied into that fb module before it was available in the generic core of the kernel fbdev infrastructure.

That means that the code you got is older than that, and to get it to work^Wcompile you'll have to forward port that code to the new kernel...

Maybe start by removing the module's copy of that function, and then see what's next...

The discussion might have continued from here.