How to develop a DirectFB app without leaving X.11 environment

后端 未结 6 1506
难免孤独
难免孤独 2020-12-09 11:34

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.

相关标签:
6条回答
  • 2020-12-09 12:02

    Here is a nice example with qemu and directFB:

    • http://free-electrons.com/community/demos/qemu-arm-directfb/
    0 讨论(0)
  • 2020-12-09 12:05

    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.

    0 讨论(0)
  • 2020-12-09 12:08

    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.

    0 讨论(0)
  • 2020-12-09 12:08

    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).

    0 讨论(0)
  • 2020-12-09 12:12

    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.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题