移植DirectFB-1.3.0到GEC2440开发板
1,下载解压源码:
root@yuanxh-desktop:/home/yuanxh/s3c2410# wget http://www.directfb.org/downloads/Core/DirectFB-1.3.0.tar.gz
root@yuanxh-desktop:/home/yuanxh/s3c2410# tar xzvf DirectFB-1.3.0.tar.gz
root@yuanxh-desktop:/home/yuanxh/s3c2410# mv DirectFB-1.3.0 DirectFB-1.3.0-9g24x0
2,建立编译脚本:
root@yuanxh-desktop:/home/yuanxh/s3c2410# cd DirectFB-1.3.0-9g24x0
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# ./configure --help
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# vi mkall
在脚本中填入以下内容:
CC=arm-linux-gcc LD=arm-linux-ld ./configure --prefix=/usr/directfb\
--host=arm-linux --target=arm-linux\
--enable-png=no --enable-jpeg \
--enable-fbdev --enable-freetype=no --sysconfdir=/etc
make
make install
3,去掉OMAP驱动:
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# cp gfxdrivers/Makefile.in gfxdrivers/Makefile.in.org
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# cp gfxdrivers/Makefile.am gfxdrivers/Makefile.am.org
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# vi gfxdrivers/Makefile.in
把其中299行:$(OMAP_DIR) \ 删除
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# vi gfxdrivers/Makefile.am
把其中144行:$(OMAP_DIR) \ 删除
(OMAP驱动是TI的OMAP系列CPU专用的,在此应用中缺少头文件,引起编译出错)
4,配置编译安装:
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# chmod 777 mkall
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# ./mkall
root@yuanxh-desktop:/home/yuanxh/s3c2410/DirectFB-1.3.0-9g24x0# ll /usr/
5,添加到文件系统:
root@yuanxh-desktop:/usr# cd /nfsboot/rootfs/usr/
root@yuanxh-desktop:/nfsboot/rootfs/usr# mkdir directfb
root@yuanxh-desktop:/nfsboot/rootfs/usr# cp -av /usr/directfb/* directfb/
root@yuanxh-desktop:/nfsboot/rootfs/usr# cd ../lib/
root@yuanxh-desktop:/nfsboot/rootfs/lib# cp -av ../usr/directfb/lib/libdirect-1.3.so.0* .
root@yuanxh-desktop:/nfsboot/rootfs/lib# cp -av ../usr/directfb/lib/libdirectfb-1.3.so.0* .
root@yuanxh-desktop:/nfsboot/rootfs/lib# cp -av ../usr/directfb/lib/libfusion-1.3.so.0* .
6,建立directfb配置脚本:
root@yuanxh-desktop:/nfsboot/rootfs/usr# cd /nfsboot/rootfs
root@yuanxh-desktop:/nfsboot/rootfs# vi etc/directfbrc
在脚本中填入以下内容:
system=fbdev
fbdev=/dev/fb0
mode=320x240
depth=16
pixelformat=RGB16
离线