DirectFB-1.5.0 porting supports 3D hardware support

Source: Internet
Author: User
Tags create directory volatile


I. DIRECTFB INTRODUCTION

DIRECTFB is a lightweight graphics library that provides hardware graphics acceleration, input device processing, and abstraction, which integrates support for semi-transparent windows and multi-layer display on Linuxframebuffer drives. It is a layer that uses software to encapsulate graphics algorithms that are not supported by the current hardware to accomplish hardware acceleration. DIRECTFB is designed for embedded systems. It achieves the highest hardware acceleration performance with minimal resource overhead.

Two. DIRECTFB Transplant preparation

DIRECTFB Dependent libraries: freetype-2.4.4.tar.gz,jpegsrc.v8c.tar.gz,libpng-1.2.44.tar.gz,zlib-1.2.5.tar.gz

freetype-2.4.4.tar.gz, jpegsrc.v8c.tar.gz, libpng-1.2.44.tar.gz, zlib-1.2.5.tar.gz download Address:


Three. DIRECTFB Transplant steps

Environment variable configuration:

Export PREFIX=/USR

Export Dest_dir=/home/d above two environment variables is the location of the post transplant library, preferably the library to be mentioned in the future to be stored in the/home directory

Export path= $PATH:/home/opt/friendlyarm/toolschain/4.5.1/bin
Export CC=ARM-NONE-LINUX-GNUEABI-GCC
Export Ldflags=-l$dest_dir$prefix/lib
Export cflags= "-g-i$dest_dir$prefix/include"
Export Pkg_config_path= $DEST _dir$prefix/lib/pkgconfig
Export freetype_cflags= "-i${dest_dir}${prefix}/include/freetype2-i${dest_dir}${prefix}/include"
Export Pkg_config_path=${dest_dir}${prefix}/lib/pkgconfig
Export pkg_config_libdir= $PKG _config_path
Export cflags= "-i${dest_dir}${prefix}/include/"
Export ldflags= "-l${dest_dir}${prefix}/lib"
Export libpng_cflags= "-i${dest_dir}${prefix}/include/libpng12"
Export libpng_libs= "-l${dest_dir}${prefix}/lib-lpng12"
Export freetype_cflags= "-i${dest_dir}${prefix}/include/freetype2-i${dest_dir}${prefix}/include"
Export directfb_cflags= "-i${dest_dir}${prefix}/include/directfb-i${dest_dir}${prefix}/include"
Export freetype_libs= "-l${dest_dir}${prefix}/lib-lfreetype"

Porting steps:

1.

#Make zlib

CD $ZLIB

./configure--prefix= $PREFIX

Make

Make destdir= $DEST _dir install

2.

CD $LIBPNG

./configure--prefix= $PREFIX--host=arm-none-linux-gnueabi

Make

Make destdir= $DEST _dir install

3.

CD $LIBJPEG

./configure--prefix= $PREFIX--host=arm-none-linux-gnueabi

Make

Make destdir= $DEST _dir install

4.

CD $FREETYPE

./configure--prefix= $PREFIX--host=arm-none-linux-gnueabi

Make

Make destdir= $DEST _dir install

5.

CD $DFB

./configure--host=arm-none-linux-gnueabi--prefix= $PREFIX--disable-x11--with-gfxdrivers=none--enable-jpeg- Enable-png--enable-freetype--with-inputdrivers=linuxinput

Make

Make destdir= $DEST _dir install

Errors and Solutions:

1.. /.. /lib/direct/atomic.h:188:70:error:expected ', ' or ' ... ' before ' new '

Solution: Into the atomic.h file, the key word new to new_1, such as arbitrary is not a keyword.

2.. /.. /lib/direct/serial.h:112:14:error:invalid conversion from ' void* ' to ' volatile int* '

.. /.. /lib/direct/serial.h:112:14:error:initializing argument 2 of ' int _d__atomic_add_return (int, volatile int*) '

Solution: Enter into the atomic.h file, put the transfer in this area through the Force conversion (void *)-> (volatile int *)

6.

CD $DFBEXAMPLE

./configure--prefix= $PREFIX--host=arm-none-linux-gnueabi

Make

Make destdir= $DEST _dir install

This completes the basic DIRECTFB transplant, copies all the files under the/HOME/USR directory to the Development Board, and runs the test cases to know that it is unsuccessful.

Four. DIRECTFB Hardware acceleration Configuration

Environment Description: So fast you have a transplant successful DIRECTFB, and your development Board supports the hardware acceleration feature. Different hardware platforms have different configurations, I'll talk about my configuration here. The directory described here is all under the/HOME/USR.

Steps:

Compile your hardware accelerator module and generate the corresponding library file. Put all the generated libraries under/home/usr/lib.

In the/home/usr/lib/directfb-1.5-0 directory, create the directory gfxdrivers, and put the compiled hardware module of the DIRECTFB library into this directory, my library file here is libdirectfb_gal.so.

In/home/usr directory, create directory etc

Enter into the/HOME/USR directory at the terminal input: NO-SOFTWARE>>DIRECTFBRC

After completing the steps above, DIRECTFB can support the corresponding hardware acceleration.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.