Setting up a DirectFB dev environment

Moderators: mdrjr, odroid

Setting up a DirectFB dev environment

Unread postby zed » Wed Dec 13, 2017 12:47 am

Hi all,

I am interested in working with DirectFB and tried to set up a dev environment on my XU4, but it was a miserable failure when I tried to compile the examples. My understanding is I can use the Mali with DirectFB so I can have hardware accelerated GUIs etc without needing a desktop environment. My goal is just to get to the point where I can get the DirectFB examples working, then I can get my hands dirty and learn how to really use it. Can I have some directions on what I did wrong, or a step-by-step from scratch? Here is what I did:

Installed the Ubuntu 16.04 Kernel 4.9 minimal image on my emmc.
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install linux-image-xu3
apt-get install libdirectfb-dev

with reboots where necessary.

I then tried to compile the spacedream example and run it. The screen flickered to black then returned with a lot of output on the console saying 'Panning display failed (x=0 y=1080 ywrap=0 vb=0)'

I was not able to get a screen grab of the entire message. However I am pretty sure I messed up at a much earlier stage of the entire process and not even sure I was working with the Mali enabled and all that good stuff. Please help!
zed
 
Posts: 5
Joined: Sat Nov 21, 2015 9:47 am
languages_spoken: english
ODROIDs: XU4

Re: Setting up a DirectFB dev environment

Unread postby meveric » Wed Dec 13, 2017 12:52 am

Mali has X11 and fbdev drivers.
To run applications without X11 you have to install fbdev drivers and wise versa, you can not run fbdev applications with X11 drivers.

I'm not sure how "libdirectfb" works, but I guess it requires fbdev drivers as well and does not work with X11 GPU drivers.
Try to install mali-fbdev.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8098
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Setting up a DirectFB dev environment

Unread postby odroid » Wed Dec 13, 2017 11:52 am

Mali GPU driver for fbdev can be installed with “apt-get install mali-fbdev” on the minimal image.

DirectFB doesn't work as meveric explained.
User avatar
odroid
Site Admin
 
Posts: 25804
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Setting up a DirectFB dev environment

Unread postby zed » Sun Dec 17, 2017 9:59 am

Alright! I install the mali drivers and I now see libEGL is symlinked to libmali and all that good stuff.

I just programmed cairo api to load and display a png image on the screen, so this is a very exciting advancement for me. There is an issue though - the console cursor is still there when the image is displayed and clearly I do not have the frame buffer all to myself. After looking around I found out all about fbcon and how that is related to what I am seeing. I played with fbcon rotation and turning off the cursor etc. One thing I have noticed but not discovered the solution to yet is this: even when the cursor is turned off, I can still type and the text will show up. If I want to create a program that accepts text input I don't want text intruding on the frame buffer console style. Can anyone tell me how I can temporarily turn off fbcon when I run my program, and restore it on exit? I looked through /sys/class/graphics etc etc but found nothing yet. Thank you in advance for any help! Z.
zed
 
Posts: 5
Joined: Sat Nov 21, 2015 9:47 am
languages_spoken: english
ODROIDs: XU4

Re: Setting up a DirectFB dev environment

Unread postby crashoverride » Sun Dec 17, 2017 6:54 pm

crashoverride
 
Posts: 3156
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Setting up a DirectFB dev environment

Unread postby zed » Mon Dec 18, 2017 2:39 am

@crashoverride

Setting the tty0 to mode KD_GRAPHICS on entry and setting it back to mode KD_TEXT on exit works perfectly with the most recent kernel (as of this date). Thank you!

Z.
zed
 
Posts: 5
Joined: Sat Nov 21, 2015 9:47 am
languages_spoken: english
ODROIDs: XU4


Return to General Chat

Who is online

Users browsing this forum: No registered users and 3 guests