Action Item #309
Investigate use of directFB instead of X for fbtft
|Status:||In Progress||Start date:||05 Apr 2014|
|Category:||04 - Root File System|
|Target version:||2.0 - Harkonnen|
|Severity:||03 - Medium|
I can't get the touch screen input to work correctly with X, but the ts_test program works fine. So I thought I might try switching to directFB and see if that works better. If it does, I'll try to get gtk+ running on it and build the UI that way.
If not, I may drop back to writing low level framebuffer utilities. Since I know this works (see ts_test) I at least have a fallback if I can't get more sophisticated toolsets working.
#1 Updated by Hammel over 6 years ago
- % Done changed from 0 to 10
I compiled gtk+-2.x for use with DirectFB by porting the X11 build in Buildroot to a DirectFB package. The compile completes cleanly and I have a DirectFB-GTK2 installation on the rootfs, but this doesn't seem to work. I can start gtk-demo but it segfaults after putting a mouse pointer on the display.
So I went back to ts_calibrate and ts_test. These work perfectly. They also work directly on the framebuffer, without DirectFB (which offers a bit of windowing and application support on top of the framebuffer). So I googled "TSLIB + DirectFB" and found that these two should work together just fine.So now I want to write a hello world program that tests this. In order, it should:
- Open a window with a button on the display without tslib
- Open a window with a button that accepts input on the button with tslib.
If I can get this to work then I'll need to spec out how to build a UI for the fbtft display, something akin to Matchbox/BUI. But it will have to be written from scratch unless SawMan can be used instead.See
- http://directfb.org/downloads/Extras/DirectFB-examples-1.6.0.tar.gz (Buildroot has 1.6.x though DirectFB is at 1.7.0)
#2 Updated by Hammel over 6 years ago
I think I see the trick here: you can't use both the X.org server over the framebuffer and the fbtft DirectFB interface at the same time. This would probably be true of using fbdev or fbturbo for X.org. I had disabled fbturbo so need to rebuild it and test that theory. If fbturbo doesn't use the fb (which seems unlikely since its prefixed with fb) then having both at the same time might work.Barring both working, I've updated the init scripts on the current test board to deal with using one or the other based on
- if tvservice says the HDMI is there
- if the /etc/init.d/fbtft stamp file exists
So, knowing this (and after saving off the modified init scripts) I can move on to writing directfb apps for the version of PiBox that will provide media services and BLE-based sensor info.
#4 Updated by Hammel about 6 years ago
- Priority changed from Immediate to Normal
- Target version changed from 0.9.0 to 0.10.0
- Severity changed from 01 - Critical to 03 - Medium
Additional work on this is being pushed to 0.10.0 so I can get the media specific stuff completed in time for camping season.