views:

1872

answers:

6

Hi folks,

I'm trying to develop a GUI application for an embedded platform, without any windowing whatsoever and I'm doing that with DirectFB, and it suits my needs very fine.

Since the embedded I develop for is not that powerful, I would really like to try to develop on my own Ubuntu desktop. The problem is Framebuffer is conflicting with X.org causing me to leave the whole desktop, and shutdown X.org just to see the result of my changes.

Is there a good framebuffer simulator that suits my needs? Qt has one, called QVFb, but it only works for developing Qt apps, and the VNC back-end of DirectFB always crash.

So, any ideas?

A: 

You could use Moblin Image Creator to create a disk image of Moblin, which you can then run inside a VM like QEMU. You can then test your DirectFB application inside the virtual machine.

codelogic
+9  A: 

DirectFB has a X11 backend.

$ sudo apt-get install libdirectfb-extra  # for Debian and Ubuntu, anyhow
$ cat ~/.directfbrc
system=x11
force-windowed

Also, DirectFB has a SDL backend, and SDL has a X11 backend. Also, SDL has a GGI backend, and GGI has an X backend. That's a bit circuitous, but it should work :)

I tested it with

$ SDL_VIDEODRIVER=directfb ffplay some_movie.avi

and got a nice 640x480 window with media playing and DirectFB handling layering and input, so I'm sure this works.

ephemient
force-windowed really worked for me. Thanks a lot!
Edu Felipe
A: 

You could develop (i.e. edit and compile) your application on your Ubuntu desktop, and test your application on the embedded platform that it is intended to run on.

If the embedded platform supports networking, you might be able to reduce the length of your edit-compile-test loop by running the application directly from an NFS share.

bk1e
That's what I'm doing right now, but the process takes too much time.
Edu Felipe
A: 

The three previous answers are all good suggestions. I'd suggest trying ephemient's answer because it's the simplest. For more details on setting up your .directfbrc file, check out "man directfbrc".

One other possibility would be to switch from X to another virtual terminal (using CTRL+ALT+F1), run your directfb program, and then switch back X (using CTRL+ALT+F7).

Does DirectFB play nice with recent KMS based X stuff?
Spudd86
A: 

I came to use ephemient's solution to run DirectFB applications inside a chroot environment (target filesystem as a courtesy of buildroot) in addition to Xnest, a separate X environment which runs in a window of the current X.

$ Xnest -ac :1 &
$ cd $TARGET_DIR # into the target file system root
$ DISPLAY=:1 sudo chroot . usr/bin/df_neo

This way you can assure not only your directfb installation is correct, but also all the required dependencies are installed inside the chroot'ed file system.

milton
A: 

Here is a nice example with qemu and directFB:

Johan