User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

DirectFB on Raspberry Pi

Thu Aug 30, 2012 10:47 am

Hi, everybody!

I got directfb compiled on the raspberry pi (with EGL support).

I attached the PKGBUILD. You may want to use the git version of fusion as the PKGBUILD of it in AUR does work out of the box. Every other dependency is either availeble as package or the PKGBUILD in AUR does work out of the box.

I also managed to get gtk for directfb compiled (with the current version). The PKGBUILDs for gtk2-dfb and it's dependencys installt the libs in /opt/gtkdfb in order to make gtk2 for X and gtk2 for DirectFB coexist. I'm now changing the PKGBUILDs so the packages are using the the /usr prefix instead of /opt/gtkdfb. By this it will be easier to recompile gtk programs with the existing PKGBUILDs against gtk-dfb.

My goal is to replace X.org completely with directfb. And I hope the PKGBUILDs which work against gtk and X will work against gtk and DirectFB without any modifications.

Regards,
Maribu
Attachments
directfb-1.6.1-1.src.tar.gz
(1.09 KiB) Downloaded 1162 times

User avatar
katjap
Posts: 3
Joined: Fri Jul 20, 2012 11:09 pm

Re: DirectFB on Raspberry Pi

Thu Aug 30, 2012 7:22 pm

Oh, highfive! I stayed up until 3 last night working on that and was still working on it today :D Thanks :)

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Thu Aug 30, 2012 10:07 pm

I also got gtk2, cairo and poppler compiled against DirectFB.

I'll provide the PKGBUILDs here right after I can confirm that it works. But I haven't found a simple "gtk-only" application right now.

I'm looking for a replacement of the DirectFB Terminal Emulator as it seems not to support UTF-8 properly. (It behaves strange when typing "special characeters", but still they are displayed correctly.)

At the moment I started to compile WebKit for DirectFB. I hope to provide a usable browser this way. After that all I need is file manager and a text editor with syntax highlighting to be happy :-)

Regards,
Maribu

User avatar
katjap
Posts: 3
Joined: Fri Jul 20, 2012 11:09 pm

Re: DirectFB on Raspberry Pi

Fri Aug 31, 2012 7:16 pm

I'm trying to get this working in rasbpian, but i think i have to rebuild my kernel first before fusion will build because raspian doesn't provide you with module.symvers. That takes ridiculously long on the pi though.. if it doesn't work the first time, i'll setup a crossbuild environment on my laptop.

I admit i have ulterior motives for this, my goal is actually to get gtk2 for directfb working on a Zipit Z2 running debian, I figured i would practice on the pi first. Although i don't need hardware acceleration (and don't believe the zipit offers any) the option of having it available on the Pi is too tempting to pass up ;-)

EDIT: Still building the kernel but decided to give making fusion another try. It builds now :)

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Sat Sep 01, 2012 7:19 am

Fusion builds out of the box on Arch Linux with -git PKGBUILD. But if you don't need it to run multiple applications at the same time, you build it without fusion.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Sun Sep 02, 2012 10:34 am

Ok, I got everthing compiled. Even netsurf did compile against gtk-dfb (I know that netsurf is able to use the framebuffer directly without directfb, but against gtk-dfb I could use more than one program at the same time.)

The problem is, that gtk programs don't seem to work. All I get is a black screen. The problem is, that I can't run directfb from ssh and it also does not start correctly with strace. So I have no idea what the problem is :-(

Any suggestions?

Regards,
Maribu

PS: I tried besides of netsurf a gtk hello world program and also got a black screen.

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Sun Sep 02, 2012 10:37 am

Ok, adding:

no-vt

to .directfbrc in your home directory does the trick. Now I can run it from ssh. I got

DirectFBError [gdk_display_open: GetInputDevice]: No resource has been found by the specified id

as error on my gtk hello world program. Lets see what I find about this.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Sun Sep 02, 2012 10:57 am

ok, fiddling with .directfbrc does help with this problem, but another error occurs:

Could not lock region surface for SetRegion()!

I will work on this.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Sun Sep 09, 2012 4:19 pm

Ok, I got it. Now I have netsurf working on directfb via gtk. It is really fast, but the color depth themes not to be correct. Everything looks a bit strange. I will work on this.

I got it working by playing with ~/.directfbrc:

Code: Select all

mode=1280x720
depth=32
#no-vt
pixelformat=RGB332
disable-module=linux_input
I attached the PKGBUILDs I needed to modify. If a package depends on an other package I did not include, the ABS or AUR version should work. If you have problems building the package, leave a message.

Good luck!
Attachments
PKGBUILDS.tar.gz
(9.43 KiB) Downloaded 490 times

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 7:17 am

Code: Select all

mode=1280x720
depth=16
#no-vt
pixelformat=RGB16
disable-module=linux_input
This also works. You want this configuration, as RGB332 only has 8 bit color depth.

Some text rendering does look ugly. Some sites, like google, are almost unusable due to this. Other work fine. Maybe there is also a fix for this.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 7:18 am

It comes to my mind, that I have almost no fonts installed. Maybe this is the reason ;-) I try to find out.

gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 12:04 pm

Maribu, great work!! I spent on this very long time as well... but it looks like I missed the right directfbrc configuration!

Have you tried compiling ilixi or some demos?

I will give it a try later on today.

Thanks again and keep it up!

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 1:47 pm

No, I didn't. I just compiled emelfm2, which works out of the box with the PKGBUILD in abs.

Netsurf works very quick and scrolling work like you expect it. But on some pages the text rendering doesn't work at all. I can read my favorite news site without problems, but my second favorite one doesn't work at all :-(

Another thing missing is a window manager which works with gtk under DFB. There is a additional window manager called sawman (start program with --dfb:wm=sawman if you have installed sawman) but it doesn't work for me.

I'm looking into providing also the binarys, as it takes ages to build all packages. Has anyone a suggestion where I can upload my binarys for free to give others free access to it?

Regards,
Maribu

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5106
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 2:06 pm

maribu wrote:No, I didn't. I just compiled emelfm2, which works out of the box with the PKGBUILD in abs.

Netsurf works very quick and scrolling work like you expect it. But on some pages the text rendering doesn't work at all. I can read my favorite news site without problems, but my second favorite one doesn't work at all :-(

Another thing missing is a window manager which works with gtk under DFB. There is a additional window manager called sawman (start program with --dfb:wm=sawman if you have installed sawman) but it doesn't work for me.

I'm looking into providing also the binarys, as it takes ages to build all packages. Has anyone a suggestion where I can upload my binarys for free to give others free access to it?

Regards,
Maribu
@maribu. This sounds very interesting. I wonder if you could post a video of this running?
Dropbox is good for sharing binary files, if 10G bandwidth per day is sufficient. If not the bittorrent is an option.

gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 3:02 pm

Maribu, I just gave it a try and it does not look like EGL acceleration is working...

What you have is rendering over linux fbdev and not EGL...

If you add to your .directfbrc:
system=egl

and try run something you will see what I mean

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 3:23 pm

Hi gregd72002!

This is normal. With system you can choose a backend of directfb. For example you can use sdl as backend to draw in a window within X11 for testing purpose. On the Raspberry Pi you have to use fbdev as backend. My PKGBUILD does compile directfb with EGL and GLES support, but there is no EGL backend.

But there is no harm in it, as the fbdev backend is accelerated. I feel no difference in scrolling speed between browsing on a Raspberry Pi and Laptop. Of course loading the sites does take much longer (ca. 2 sec on BIG websites). If the problem with the font rendering on some sites could be solved, there would be no reason for me for not using the Pi instead of my Laptop for surfing.

(Ok, ok, netsurf also lacks support for Java Script. But I think the Raspberry Pi is not capable of playing flash videos and Java Script is (almost) only used for youtube, for advertising and for viruses. As you can get the first running on the Pi and you don't want to see the second and the third, I'm perfectly fine the lack of javascript.)

I'll try to make a video of my Pi browsing a few sites with my phone's camera. (Next I'll start to make duckface-photos with it ;-D But as I have nothing else capable of recording videos I have no choice than using my phone.) In my opinion speed is definitely not with directfb.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 3:57 pm

Here is the link to my dropbox:

https://www.dropbox.com/sh/8ac0n5pqzpoyks3/O4H9VGLdaH

If there is something missing or wrong, please comment. There is no binary of the fusion package, as this has to be compiled against the current kernel. (It takes about 30 seconds to compile.) As you have to recompile it with every kernel update, I won't provide any binary of this at all. Try the fusion-git package of AUR. If you have yaourt, just type:

yaourt -SA fusion-git

With the same command you can update the package against the current kernel.

You may want to add fusion to the modules() array in /etc/rc.conf if you don't want to type in "sudo modprobe fusion" after every restart.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 5:18 pm

Here is the video: http://youtu.be/OgXpjH-XsUI

The quality is quite low, but you'll see that it is fast. The issue with the font rendering you can see best on the google website, where is actually none of the text is readable. On the raspberrypi.org website the menu is not readable, but everything else does work. There are also websites which do work perfectly, and others (like google) which doesn't work at all.

This does not happen with netsurf compiled against the X version of gtk :-(

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Mon Sep 10, 2012 7:29 pm

I have forgotten to tell you that the binary packages are for the hard float version of Arch Linux, which is not public right now. But it looks like there new version will be out soon.

Regards,
Maribu

PS: Look in the search Linux hard float threat fire status updates on the new version

gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

Re: DirectFB on Raspberry Pi

Tue Sep 11, 2012 9:56 pm

Maribu, can you confirm that DirectFB examples work on your version?
in particular I am interested in df_andi

In the past I was successful to get this running with 50% cpu usage @ 60fps when using EGL however something was not right with the background - it was missing.

If you could fix this (so df_andi works) than you are definitely on the right track!

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Tue Sep 11, 2012 10:29 pm

I think DirectFB does work fine. Could you please point a link to the source of your test?

Regards,
Maribu

gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

Re: DirectFB on Raspberry Pi

Tue Sep 11, 2012 10:33 pm

git.directfb.org/git/directfb/extras/DirectFB-examples.git

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5106
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: DirectFB on Raspberry Pi

Tue Sep 11, 2012 11:58 pm

maribu wrote:Here is the video: http://youtu.be/OgXpjH-XsUI
Thanks. Keep posting, I'm watching with interest.

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Thu Sep 13, 2012 11:23 am

Hey, gregd72002!

For me, df_andi doesn't start at all. I even don't get an error, it just quits.

I haven't compiled it with much care. Maybe I should have pointed to the the include files and librarys in /opt/vc.

Some other examples (like an skull which you can rotate with your mouse) do work. At the moment it is not a priority of me to get 3D run under DirectFB. I just want to get a basic set of Desktop applications run as fast as they would do under X11 with proper xorg drivers.

If you're using Arch, feel free to try me PKGBUILD. If you can provide changes to it, which makes DirectFB work better with 3D applications, I would be happy to include them and provide the new PKGBUILD and the resultion binarys.

Regards,
Maribu

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: DirectFB on Raspberry Pi

Thu Sep 13, 2012 11:33 am

New binary packages!

If you want to do some coding on the Raspberry Pi and you don't want to wait seconds between typing and seeing your words on the display, you may want to try out leafpad compiled against gtk-dfb. The ABS PKGBUILD does work out of the box and leafpad seems to work fine :-).

With winefish the also is a LaTeX Editor and with epdfview a PDF viewer for gtk-dfb (both now as binary package for armv6h on my dropbox). Both compiled with PKGBUILDs from ABS and in both cases the PKGBUILDs compiled without modification.

Cheers,
Maribu

Return to “Arch”

Who is online

Users browsing this forum: No registered users and 5 guests