分享

DirectFB porting to uCLinux/EM8620L platform(转)

 南园国际 2011-03-15

1.1 Development Environment

1.1.1 EM8620L target platform environment

Item Element Resources
Hardware EM8620L http://www.
Software kernel = uCLinux-2.4.22 ToolChains
DirectFB = DirectFB-0.9.22
freetype = freetype-2.1.3
libjpeg = jpeg-6b ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
libpng = png-1.2.2
zlib = zlib-1.1.4 http://www./zlib-1.1.4.tar.gz

1.1.2 x86 host machine environment

Item Element Resources
OS Linux ( Redhat FC3 ) http://ftp./pub/redhat/linux/
host compiler gcc 3.3.4 http://www./software/gcc/
cross compiler arm-elf-gcc

1.2 Install DirectFB

1.2.1 Prepare libraries used in DirectFB

  • Extract each source code
  • Make a directory to hold all libs and includes 
    # mkdir DFB
    # cd DFB
    # mkdir lib
    # mkdir include
     
  • create libjpeg
             
    # cd jpeg-6b
    # CC=arm-elf-gcc CXX=arm-elf-g++ AR=arm-elf-ar \
            RANLIB=arm-elf-ranlib LD=arm-elf-ld ./configure \
            --target arm-elf-linux --host x86-pc-linux \
            --disable-shared --enable-static

    Edit Makefile
    Change Line 39 from
    LIBTOOL = ./libtool  to LIBTOOL = libtool

    Replace all "--mode" with "--tag" in Makefile

    # make libjpeg.a
    # cp libjpeg.a ../DFB/lib/
    # cp jpeglib.h ../DFB/include/
  • create zlib

    # CC=arm-elf-gcc CXX=arm-elf-g++ AR=arm-elf-ar \
            RANLIB=arm-elf-ranlib LD=arm-elf-ld ./configure
           
    modify Makefile for cross compile
    line 30 : AR=arm-elf-ar  to AR=arm-elf-ar cr
    # make
    # cp libjz.a ../DFB/lib/
    # cp ../zlib-1.1.4/zconf.h ../DFB/include/
    # cp zlib.h ../DFB/include/
  • create libpng

    # cp scripts/makefile.linux Makefile 

    modify Makefile for cross compile
    line 11 : change "gcc" to "arm-elf-gcc" 
    line 39 : change "ranlib" to "arm-elf-ranlib"
    line 59 : change "ar" to "arm-elf-ar"
    line 20&21
    ZLIBLIB=../DFB/lib
    ZLIBINC=../DFB/include

    # make libpng.a
    # cp libpng.a ../DFB/lib/
    # cp png.h ../DFB/include/
  • create freetype

    # CC=arm-elf-gcc CXX=arm-elf-g++ AR=arm-elf-ar \
            RANLIB=arm-elf-ranlib LD=arm-elf-ld \
    ./configure
    # make 
    # cp objs/.libs/libfreetype.a ../DFB/lib/
    # cp -r include/* ../DFB/include
  • Cross Compile DirectFB for uCLinux

    # CFLAGS=-I/home/RMT/Project/Develop/DFB/include \
            LDFLAGS=-L/home/RMT/Project/Develop/DFB/lib \
            CC=arm-elf-gcc CXX=arm-elf-g++ AR=arm-elf-ar \
            RANLIB=arm-elf-ranlib LD=arm-elf-ld \
            ./configure --target arm-elf-linux --host x86-pc-linux \
            --disable-shared --enable-static --disable-sdl \
            --with-gfxdrivers=none --with-inputdrivers=none \
            --prefix=/home/RMT/Project/DFB

    # LD=arm-elf-ld make
    # make install
    # export PKG_CONFIG_PATH=(your pkgconfig):$PKG_CONFIG_PATH
    Now all DFB libs and includes are in /home/RMT/Project/DFB

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多