OpenWrt Forum Archive

Topic: Add framebuffer to openwrt

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

Hello,

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

add the directfb package from the repository

more info about directfb can be found here http://directfb.org/

As far as I understand directfb is a library on top of linux framebuffer so it doesn't provide the linux framebuffer device driver directly. I hope I'm not wrong smile

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 ?

Hi bogdanul,
did you get the fbtft running?
I downloaded from git but make crashed:

bugs@debian:~/openwrt/trunk/tmp/fbtft/src$ make
make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64'
  CC [M]  /home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.o
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: In function ‘file_fb_info’:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:736:9: error: implicit declaration of function ‘file_inode’ [-Werror=implicit-function-declaration]
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:736:24: warning: initialization makes pointer from integer without a cast [enabled by default]
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: In function ‘fb_set_var’:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:980:17: error: ‘struct fb_fix_screeninfo’ has no member named ‘capabilities’
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:980:33: error: ‘FB_CAP_FOURCC’ undeclared (first use in this function)
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:980:33: note: each undeclared identifier is reported only once for each function it appears in
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: In function ‘fb_blank’:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1066:37: error: ‘FB_EARLY_EVENT_BLANK’ undeclared (first use in this function)
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1079:27: error: ‘FB_R_EARLY_EVENT_BLANK’ undeclared (first use in this function)
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: In function ‘do_register_framebuffer’:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1668:13: error: ‘struct fb_info’ has no member named ‘skip_vt_switch’
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1669:3: error: implicit declaration of function ‘pm_vt_switch_required’ [-Werror=implicit-function-declaration]
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: In function ‘do_unregister_framebuffer’:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1713:2: error: implicit declaration of function ‘pm_vt_switch_unregister’ [-Werror=implicit-function-declaration]
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c: At top level:
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1749:5: error: conflicting types for ‘remove_conflicting_framebuffers’
/usr/src/linux-headers-3.2.0-4-common/include/linux/fb.h:1001:13: note: previous declaration of ‘remove_conflicting_framebuffers’ was here
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1760:1: error: conflicting types for ‘remove_conflicting_framebuffers’
/usr/src/linux-headers-3.2.0-4-common/include/linux/fb.h:1001:13: note: previous declaration of ‘remove_conflicting_framebuffers’ was here
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1923:5: error: conflicting types for ‘fb_get_options’
/usr/src/linux-headers-3.2.0-4-common/include/linux/fb.h:1012:12: note: previous declaration of ‘fb_get_options’ was here
/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.c:1955:1: error: conflicting types for ‘fb_get_options’
/usr/src/linux-headers-3.2.0-4-common/include/linux/fb.h:1012:12: note: previous declaration of ‘fb_get_options’ was here
cc1: some warnings being treated as errors
make[4]: *** [/home/bugs/openwrt/trunk/tmp/fbtft/src/fbmem.o] Fehler 1
make[3]: *** [_module_/home/bugs/openwrt/trunk/tmp/fbtft/src] Fehler 2
make[2]: *** [sub-make] Fehler 2
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'
make: *** [default] Fehler 2

Regards, Bugs

The discussion might have continued from here.