Linux DirectFB(一)

http://www.directfb.org/index.php?path=Main%2FDownloads&page=1

 

http://tieba.baidu.com/f?ct=335544320&lm=0&rn=30&tn=postBrowserN&sc=3539492632&z=345164921&pn=0&word=linux#3539492632

 

按 esc 进入普通状态
然后输入:
:wq (保存退出)
:wq!(保存强制退出)
:q(不保存退出)
:q!(不保存强制退出)

 

命令是可以组合的
q: quit 退出
w: write 保存
!: 强制
常用命令:
按ESC会NOMAL模式
ZZ 保存退出且无备份文件
:wq 保存退出
:q! 不保存退出,必须加‘!’号

 

http://www.directfb.com.cn/archiver/?tid-822.html

 

http://lyj2682.spaces.live.com/Blog/cns!177B1314D2038BE4!616.entry

 

Ubuntu下DirectFB的安装

1、下载下面两个包并解压

tar -xzf DirectFB-1.4.1.tar.gz
tar -xzf DirectFB-examples-1.2.0.tar.gz

2、安装DirectFB-1.4.1

cd /home/DirectFB-1.4.1
./configure
sudo make
sudo make install

注:如果在./configure这步出现下面的提示:
PNG support is missing - many applications won't work correctly!
JPEG support is missing - many applications won't work correctly!
FreeType2 support is missing - many applications won't work correctly!

sdal@sdal_dev:/mnt/share$ export http_proxy=http://172.28.15.24:8080

sudo apt-cache search libpng
sduo apt-get install libpng12-dev

sudo apt-cache search libjpeg
sudo apt-get install libjpeg62-dev

sudo apt-cache search freetype
sudo apt-get install libfreetype6-dev

然后再重新./configure,make,make install就可以通过了。

3、安装DirectFB-examples-1.0.0

a) sudo vi /boot/grub/menu.lst在kernel后面加上vga=0x0317(分辨率1024*768)或者vga=788(分辨率800*600)把frambuffer启动,如:
#****************start*************#
title           Ubuntu, kernel 2.6.17-10-generic
root            (hd0,6)
kernel          /vmlinuz-2.6.17-10-generic root=/dev/sda8 ro quiet splash locale=zh_CN vga=0x0317
initrd          /initrd.img-2.6.17-10-generic
quiet
savedefault
boot
#****************stop**************#
b) sudo updatedb
c) locate directfb.pc
找到directfb.pc的路径,例如我的是这样的:
/usr/lib/pkgconfig/directfb.pc
/usr/lib/pkgconfig/cairo-directfb.pc
/usr/local/lib/pkgconfig/directfb.pc
d) 接着设置环境,将第3步得到的pkgconfig库目录加入环境之中:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
(这样只能在当前终端可以运行,关机后还得自已运行些命令,才能运行dfb程序,如要永久性加入可这样:
如你用的是root用户,可以vi /root/.profile中加入:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig )
e) sudo make
f) sudo make install
g) 将指定directfb的库目录:
    sudo vi /etc/ld.so.conf在最后一行加入:/usr/local/lib,保存退出。
    sudo ldconfig
h) 重启计算机。 如果不重启,我的机子出现下面的错误:
(*) DirectFB/Core: Single Application Core. (2007-10-22 15:48)
(!) Direct/Util: opening '/dev/fb0' failed
    --> No such device
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> Initialization error!
df_andi.c <462>:
        (#) DirectFBError [DirectFBCreate( &dfb )]: Initialization error!

4、测试例子

cd DirectFB-examples-1.4.1/src/
sudo ./df_andi
安装完成!

 

 

http://cid-fc7d91d51e30b93b.spaces.live.com/blog/cns!FC7D91D51E30B93B!206.entry

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值