Cross compiling directfb for ARM

Download directfb from here and extract the archive. You have to set up the cross-compile tool chain. Now its time to compile the directfb itself.

Set the required environment variables,

CC=arm-linux-gcc
CXX=arm-linux-g++
AR=arm-linux-ar
RANLIB=arm-linux-ranlib
LD=arm-linux-ld

Next step is configuring the directfb. We have to choose which features to enable. In this post, Let us compile a very bare basic version. We have to specify –prefix option which specifies rootfs directory to install directfb libraries. –libdir and –include specifies directories to install libraries and include files which we use later for compiling applications based on directfb.

PREFIX=/usr/dfb
./configure --host=arm-linux --build=i386-linux --target=arm-linux --disable-jpeg --disable-png --disable-gif --enable-fbdev=yes --disable-freetype --prefix=$PREFIX --disable-devmem --with-gfxdrivers='none' --with-inputdrivers='none' --enable-static --disable-shared

Now is the time for actual compilation and installation.

make
make install

Check your $PREFIX/lib directory for directfb libraries.

tejainece

Ravi Teja is a technology entrepreneur with interest in Embedded Systems, Software engineering, Operating Systems, Web development, Cloud computing, Machine learning, etc.

More Posts - Website

Follow Me:
LinkedInGoogle Plus

  • Hii Ravi:

    i m trying to cross compile DirectFB to CodeSourcery Tool chain

    i have set up the environment variable and configured the ./config file as listed in your blog. when i tried to make it ended up with the following error.

    windows.c: In function ‘windowstack_new':
    windows.c:60: warning: implicit declaration of function ‘memset’
    windows.c:60: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c:85: error: label at end of compound statement
    windows.c: In function ‘windowstack_destroy':
    windows.c:110: error: label at end of compound statement
    windows.c: In function ‘window_create':
    windows.c:233: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c: In function ‘window_append_event':
    windows.c:686: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c: In function ‘windowstack_input_notify':
    windows.c:883: error: label at end of compound statement
    make[4]: *** [windows.lo] Error 1
    make[4]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src/core’
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src/core’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0′
    make: *** [all-recursive-am] Error 2

    can u please suggest me some help to compile this to arm target

    regards
    vamsi k neelam
    vamsineelam@gmail.com

  • Hii huynh nguyen :

    i m trying to cross compile DirectFB to CodeSourcery Tool chain

    i have set up the environment variable and configured the ./config file as listed in your blog. when i tried to make it ended up with the following error.

    windows.c: In function ‘windowstack_new’:
    windows.c:60: warning: implicit declaration of function ‘memset’
    windows.c:60: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c:85: error: label at end of compound statement
    windows.c: In function ‘windowstack_destroy’:
    windows.c:110: error: label at end of compound statement
    windows.c: In function ‘window_create’:
    windows.c:233: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c: In function ‘window_append_event’:
    windows.c:686: warning: incompatible implicit declaration of built-in function ‘memset’
    windows.c: In function ‘windowstack_input_notify’:
    windows.c:883: error: label at end of compound statement
    make[4]: *** [windows.lo] Error 1
    make[4]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src/core’
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src/core’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/krishna/Desktop/DirectFB-0.9.0′
    make: *** [all-recursive-am] Error 2

    Did u get any error during make of the direct FB.can u please suggest me some help to compile this to arm target

    regards
    vamsi k neelam
    vamsineelam@gmail.com

  • Hi Ravi,
    Can you help me in the following error while cross compiling the DirectFB with ARM
    I am trying to compile as you posted.but with the CodeSourcery/bin/arm-none-eabi-
    configure: WARNING:
    *** no Carbon/Carbon.h found — building without Mac OS X support.
    checking for X11… yes
    checking for X11VDPAU… no
    configure: WARNING: *** no X11/VDPAU found — building without X11/VDPAU support
    checking linux/compiler.h usability… no
    checking linux/compiler.h presence… no
    checking for linux/compiler.h… no
    checking linux/unistd.h usability… no
    checking linux/unistd.h presence… no
    checking for linux/unistd.h… no
    checking asm/page.h usability… no
    checking asm/page.h presence… no
    checking for asm/page.h… no
    checking signal.h usability… yes
    checking signal.h presence… yes
    checking for signal.h… yes
    checking for pthread_attr_init in -lpthread… no
    configure: error:
    *** DirectFB requires libpthread.