 |
phoneME Advanced: Building DirectFB
|
Note:
DirectFB support is only used by the Jump architecture,
which is not under current development.
|
Introduction
DirectFB is an open source graphics hardware abstraction library that provides support for common graphics primitives available in contemporary graphics hardware. DirectFB is a thin software layer that maps graphics calls directly to hardware acceleration features. Otherwise, DirectFB provides backup software emulation.
These notes describe how to build DirectFB for use with a phoneME Advanced build system. Ubuntu Linux includes a Debian package management system that provides prebuilt packages for a variety of applications, libraries and other system resources. So ideally, this procedure would involve simply installing a set of prebuilt packages for Ubuntu. But DirectFB 1.0 has only been released within the last few months and so it isn't available yet within the Ubuntu package feed system.
In addition to the core DirectFB library, two supplementary libraries are needed:
-
Linux Fusion is a Linux kernel module that provides threading abstractions that allow multiple DirectFB applications to run concurrently.
-
Simple DirectMedia Layer (SDL) is an optional multimedia library that makes it easier to run and debug DirectFB-based applications. SDL allows a DirectFB application to appear in the same virtual console with the application console, so that screen switching is not necessary while the application is running. Also, root privileges are not needed when running DirectFB with SDL.
Building and Installing Linux Fusion
Note:
Linux Fusion requires the following packages:
-
gcc/g++ 4.x compilers
-
linux-headers 2.6.x
To build the Linux Fusion library:
-
Download the Linux Fusion source bundle from the DirectFB website.
% wget http://directfb.org/downloads/Core/linux-fusion-3.2.4.tar.gz
Then unbundle it into a suitable directory.
-
Change the current directory to the Linux Fusion build directory.
% cd linux-fusion-3.2.4
-
Build Linux Fusion.
% make
-
Install Linux Fusion.
% sudo make install
-
Load the Linux Fusion device modules.
% sudo modprobe fusion
If cvm complains about missing /dev/fusion0 devices, just run modprobe fusion again.
-
Change the file permissions for the /dev/fusion* device modules.
% sudo chmod 666 /dev/fusion*
Installing SDL
For DirectFB development you will need both the runtime and development libraries for SDL.
-
Install the following packages:
-
libsdl1.2debian
-
libsdl1.2debian-alsa
-
libsdl1.2-dev
-
Add the following options to /etc/directfbrc:
system=sdl
force-windowed
mode=240x320
Create the file if it doesn't exist.
Building and Installing DirectFB
To build the DirectFB library:
-
Download the DirectFB source bundle from the DirectFB website.
% wget http://directfb.org/downloads/Core/DirectFB-1.0.0.tar.gz
Then unbundle it into a suitable directory.
-
Change the current directory to the Linux Fusion build directory.
-
Run configure with the following options.
% ./configure \
--disable-x11 \
--enable-vnc \
--disable-osx \
--enable-fbdev \
--enable-sdl \
--enable-multi \
--enable-freetype \
--disable-video4linux \
--without-tools \
--disable-voodoo \
--disable-sysfs \
--with-gfxdrivers=none \
--with-inputdrivers=keyboard,linuxinput
By default, DirectFB will be configured to be installed in the /usr/local directory.
To change this, use the --prefix option.
-
Build DirectFB:
% make
-
Install the DirectFB library.
% sudo make install
|