`

Get DirectFB 1.2.* running on Ubuntu 9.04 (with multi app support)

阅读更多
引用
http://blog.mageprojects.com/2009/05/12/get-directfb-12-running-on-ubuntu-904-with-multi-app-support/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi,

 

Since there is no guide anywhere on the internet that tells you how you can get DirectFB working on ubuntu, i will make one.

 

I expect you know how you compile things in this article. If you don’t follow some guide that explains how to do that.

 

The very first thing you have to do is get ubuntu (9.04 but the last few versions should all work fine).
next is setting up your “framebuffer” at boot time. To do this restart your pc. while in grub press “e” to edit that boot line. Then select the kernel line and again press “e” to edit that line. Now add (at the end of that line) vga=ask . Right after that it will ask you which resolution you want. See if yours is in that list and anter the number that’s standing infront of it. Now just let it boot. Once booted you will have to edit your grub menu file (sudo nano /boot/grub/menu.lst) and add vga=0xthe number you picked ) and then when you reboot you should have the framebuffer stuff. If you don’t have it look for a solution somewhere on the internet. Problems with framebuffers can be quite hard to understand or find solutions for. I don’t know much more about those framebuffers then this.

 

Once that’s all done you will have to setup your build environment. run the following commands:

 

sudo apt-get install linux-source // Will install the actual linux source of your current kernel
sudo apt-get build-dep linux // Will get your linux kernel source dependencies installed on your system
sudo apt-get build-dep libdirectfb-1.0-0 // We are going to use a later version of DirectFB but this will do fine to install the requirements
wget http://www.directfb.org/downloads/Core/DirectFB-1.2.8.tar.gz
wget http://www.directfb.org/downloads/Core/linux-fusion-8.1.1.tar.gz
wget http://www.directfb.org/downloads/Extras/DirectFB-examples-1.2.0.tar.gz

 

Note: go to: http://www.directfb.org/index.php?path=Main%2FDownloads to download the latest DirectFB 1.2.* (do not download the 1.3.* versions because that’s still in development) release and the latest linux-fusion file.

 

Once you’ve done the two apt-get lines and downloaded the files you will have to extract those later two.
Do that by running:

 

tar -xvf DirectFB-1.2.8.tar.gz
tar -xvf linux-fusion-8.1.1.tar.gz
tar -xvf DirectFB-Examples-1.2.0.tar.gz

 

The first thing we’re going to do now is getting that fusion module compiled and loaded at boot time.
Here is the list of commands to do that:

 

cd linux-fusion-8.1.1 make && sudo make install
sudo su -
echo fusion >> /etc/initramfs-tools/modules // this adds the text “fusion” at the end of the modules file
exit
sudo update-initramfs -u // This updates your initramfs file
sudo modprobe fusion // Only needed if you didn’t restart after you changed initramfs. Otherwise this module will be loaded anyway beacayse it’s done so during boot.

 

Now fusion is done.
Next is compiling DirectFB with multi application support.

 

Here is the list of commands needed for that:


cd DirectFB-1.2.8
./configure –enable-multi –libdir=/usr/lib64 –bindir=/usr/bin // note the libdir is /usr/lib64 for x86_64 distributions and just /usr/lib for the rest. Change it to your needs
make && sudo make install

 

Now it should be compiling for a few minutes. Depending on your cpu. My quadcore does this in a few minutes.
Once it’s done DirectFB is installed and (if all previous steps worked fine) can be used.

 

Now to see it in use we need some examples.
here is the command list for that:

 

cd DiirectFB-Examples-1.2.0
./configure –bindir=/usr/bin // note no need to set a libdir because it’s not making libs
make && sudo make install

Now the examples are also ready to use.
You can now switch to another tty (CTRL + ALT + F<number>), login and run something like df_window.
Be sure to type df_ followed by a hit on the tab button. It will give you all run commands that start with df_ and all the results that  you get to see are DirectFB examples.

 

But this didn’t show you a multi-app environment yet.

 

Log in into your gnome or kde or whatever graphical environment you use. Open up a terminal in there and type:

 

nano ~/.directfbrc

 

What we’re going to do now is change a few directfb settings to run it under X11. (see man directfbrc for more settings)
Just plain copy and paste the following settings in that file:

 

mode=1024×768
pixelformat=RGB32
system=x11

 

You can change the resolution to your

liking if you want.

 

Now type (still in that same console that’s running inside your graphical environment):

 

df_window & // runs it in the background
df_cpuload &

 

And you will see the df_window example with in there the cpuload graphic. Nifty huh?
Just be carefull here. save all your data before you start with this because if you do anything wrong it COULD completely crash your system in a way that you just have to reboot to get it back. While writing this howto i experienced this myself because i did do df_window & but i didn’t add the “&” to df_cpuload

 

This was it for the DirectFB howto.
I might post more stuff about DirectFB in the future.

 

I hope it was useful to you,
Mark

 

分享到:
评论

相关推荐

    DirectFB-1.4.2.tar.gz_DirectFB-1.4.0.tar._DirectFB-1.7.0.tar_dir

    DirectFB(Direct FrameBuffer)是一个开源的Linux框架,它允许开发者直接访问操作系统的帧缓冲区进行图形绘制和显示。这个框架使得在Linux系统上构建图形用户界面、游戏和其他图形密集型应用变得更加简单和高效,...

    DirectFB-1.4.3.tar.gz

    DirectFB 是一个开源的、轻量级的图形框架,它为Linux和其他类Unix系统提供了高效且直接的帧缓冲层操作。DirectFB-1.4.3.tar.gz 是这个项目的源代码压缩包,版本号为1.4.3,通常通过下载此文件,开发者可以获取到...

    DirectFB-1.3.0.tar.gz

    DirectFB(Direct Frame Buffer)是一个开源的、轻量级的图形用户界面系统,它主要针对嵌入式系统和低资源设备。DirectFB-1.3.0是该库的一个开发者版本,提供了对底层硬件图形加速的直接访问,提高了在这些平台上的...

    DirectFB-1.6.1.tar.gz

    DirectFB 是一个开源的、轻量级的图形框架,它为Linux和其他类Unix系统提供了高效、低级别的图形处理能力。DirectFB-1.6.1.tar.gz 是该库的一个特定版本,即1.6.1版的源代码压缩包。在深入探讨这个版本之前,我们先...

    DirectFB-examples-1.5.2.tar.gz

    DirectFB(Direct Frame Buffer)是一个开源的、轻量级的图形用户界面系统,它提供了一个直接访问硬件帧缓冲的库,使得开发人员可以高效地在Linux等操作系统上进行图形渲染和用户界面编程。"DirectFB-examples-1.5.2...

    DirectFB-1.4.0.tar.gz

    DirectFB是Linux操作系统下的一款轻量级图形用户界面框架,其主要目的是为了提供高效、低级别的硬件访问,以便在嵌入式系统上构建图形应用程序。DirectFB-1.4.0.tar.gz是一个包含DirectFB 1.4.0版本源代码的压缩包,...

    DirectFB-1.1.1.tar.gz.rar_DirectFB-1.1.1_directfb

    DirectFB(Direct Frame Buffer)是一个开源的、轻量级的图形用户界面系统,它提供了一个在各种嵌入式和移动设备上高效处理图形硬件的框架。DirectFB-1.1.1是DirectFB的一个稳定版本,它包含了对多种硬件平台的支持...

    DirectFB库

    8. **Integration with Other Systems**:DirectFB可以与其他系统组件结合,例如与Linux内核的帧缓冲子系统配合,或者与X Window System共存,提供不同的显示解决方案。 9. **Multithreading**:DirectFB库是线程...

    DirectFB-1.7.0.tar.gz_directfb

    DirectFB是一种轻量级、高效的图形用户界面框架,它允许开发者在不依赖X Window System(X11)的情况下,在Linux和其他类Unix系统上构建图形应用。"DirectFB-1.7.0.tar.gz_directfb"这个文件是DirectFB 1.7.0版本的...

    directfb documents

    DirectFB 是一个开源的图形库,它为嵌入式系统提供了高效的图形用户界面(GUI)支持。这个压缩包包含了一系列关于DirectFB的文档,涵盖了DirectFB的基础知识、图形处理技术以及源码解析等方面,旨在帮助开发者更好地...

    DirectFB-1.1.1.tar.gz_directfb

    DirectFB是Linux操作系统中一个重要的硬件加速绘图API(应用程序编程接口),它的全称为Direct FrameBuffer。这个软件库设计的目的是为了提供高效、快速的图形渲染能力,特别适合那些需要实时图形处理的应用,如游戏...

    DirectFB-1.6.3.tar.gz_directfb_fb1.6

    DirectFB 是一个开源的、轻量级的图形框架,它为Linux和其他类Unix系统提供了低级别的硬件抽象层,使得开发者可以高效地利用系统的图形硬件资源。DirectFB-1.6.3.tar.gz 是该框架的一个特定版本,包含了DirectFB ...

    DirectFB-1.6.0.tar.gz_directfb

    DirectFB(Direct Frame Buffer)是Linux操作系统下的一款开源、高效的图形库,主要目的是为了提供一个轻量级且高性能的图形用户界面。DirectFB-1.6.0.tar.gz 是这个库的一个具体版本,包含了DirectFB的源代码和其他...

    DirectFB-1.5.2.tar.gz_DirectFB-1.5_directfb_framebuffer

    这个名为"DirectFB-1.5.2.tar.gz_DirectFB-1.5_directfb_framebuffer"的压缩包包含了DirectFB的1.5.2版本源代码,允许开发者在他们的应用程序中利用Linux的Framebuffer设备驱动进行图形处理。下面将详细介绍DirectFB...

    DirectFB-examples-1.2.0.tar.gz

    DirectFB(Direct Frame Buffer)是一个开源的图形库,它提供了对Linux系统上的帧缓冲设备的直接访问,使得开发者能够高效地进行图形用户界面的开发。这个"DirectFB-examples-1.2.0.tar.gz"文件是一个包含DirectFB库...

    directfb官方论坛历史帖子整理

    DirectFB 是一个开源的、轻量级的图形框架,它为Linux和其他类Unix系统提供了一个直接访问硬件图形加速器的接口。这个框架的核心目标是优化性能,减少系统资源的消耗,使得在嵌入式设备和低性能计算机上运行图形应用...

    Directfb LiTE最新版本例子

    DirectFB (Direct FrameBuffer) 是一个开源的图形库,它允许开发者在Linux系统上高效地处理图形用户界面,尤其适用于嵌入式设备。LiTE(Lightweight Terminal Emulator)是DirectFB的一个扩展,专为创建轻量级终端...

    DirectFB 开源库的源代码(稀缺资源,开源学习利器)

    DirectFB 是一个开源的图形框架库,主要用于提供低级别的硬件访问和图形用户界面管理,尤其适合在嵌入式系统和Linux环境下使用。它为开发者提供了一个高效、轻量级的平台,可以在没有X Window System的情况下直接...

    DirectFB-1.4.9.tar.gz_DirectFB-examples_directfb_linux fb

    在标题“DirectFB-1.4.9.tar.gz_DirectFB-examples_directfb_linux fb”中,我们可以看到DirectFB的版本号是1.4.9,表明这是一个软件的源代码包,格式为tar.gz,通常用于在Linux环境中解压和编译。"DirectFB-...

    DirectFB-examples-0.9.10.tar.gz_DirectFB-examples_directfb_frame

    DirectFB-examples-0.9.10.tar.gz是一个包含DirectFB示例代码的压缩包,主要用于演示如何在Linux环境下利用DirectFB库进行图形界面的开发。DirectFB(Direct FrameBuffer)是一个开源的、高性能的图形用户界面系统,...

Global site tag (gtag.js) - Google Analytics