Re: Query- Gtk on Framebuffer



yes, this is how to compile gtkdfb on intel machines; mike emmel, gdk dfb developer, said he's going to port gdk library to match gtk 2.8.x libraries API, so i hope we'll have soon a newer version to test

ciao

attilio


Albert Veli wrote:
Hi Hazzy.

I wrote down the steps when I compiled GTK+ for DirectFB.
This was on intel, maybe it will work on ARM too.
If any GTK+ gurus read this, comments on the compilation
procedure are welcome.

First I compiled the Linux kernel with support for framebuffer.

In my case it was the latest kernel in the 2.4 series, which was then 2.4.25 (now it's 2.4.31).

$ tar jxvf linux-2.4.25.tar.bz2
$ cd linux-2.4.25
$ make menuconfig

Make sure the following is checked:
* Code Maturity level options -> Prompt for development and/or incomplete code/drivers
* Console Drivers -> Frame-buffer support -> Support for frame buffer Devices
* Console Drivers -> Frame-buffer support -> Vesa VGA graphics console

And compile and install the kernel.

---

Then I added, in lilo.conf:

 append="video=vesa"
 vga=785

followed by /sbin/lilo to activate the changes. Don't know how this works on ARM...

On intel, the following table can be used to choose graphic mode (vga=xxx).

Bits    640x480 800x600 1024x768
  8       769     771     773
  16      785     788     791
  32      786     789     792


DirectFB
--------

Dowonload the latest DirectFB from www.directfb.org.
In my case it was 0.9.20. Now the latest version is 0.9.22.

Unpack somewhere:
$ tar zxvf DirectFB-0.9.20.tar.gz

Write ./configure --help to see if there is a driver for your graphic card there.
Again, I don't know how it works for ARM. Maybe you can ask on the DirectFB mailing list.
But there is surely some generic option that will work without much acceleration.
For my card, the craphic driver was "nsc". Replace nsc with the correct option for your
card.

Then compile:

cd DirectFB-0.9.20/
./configure --help
./configure --with-gfxdrivers=nsc --prefix=/usr/local/directfb
export PATH=/usr/local/directfb/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/directfb/lib/pkgconfig:$PKG_CONFIG_PATH
make
make install

There are also some configure options for input devices (touchscreen, mouse, etc).
When DirecFB was compiled, for me the following list appeared:

Building Input Drivers:
  DBox2 Remote          no
  Linux Input           no
  H3600 Touchscreen     no
  MuTouch touchscreen   no
  SonyPI Jogdial        yes
  ucb1x00 Touchscreen   no
  WM97xx Touchscreen    no

Today more and more input devices has a "Linux input" driver. Look for devices when
you compile the linux kernel. Enable "Linux Input" in ./configure if your device is supported by it.


GTK+-2.0-DirectFB
-----------------

It might be possible to use the DirectFB GDK backend with a newer GTK+. But I haven't tried that.
I used the sources (from www.directfb.org) with GTK+ and the DirectFB-GDK backend in one tarball.


First configure as usual:

cd ../gtk+-directfb-2.0.9
./configure --help
./configure --prefix=/usr/local/directfb --with-gdktarget=directfb


Before compiling GTK+ make sure you have the following packages installed:

* libglib2.0-dev
* libfreetype6-dev
* libpng3-dev (or libpng12-dev)
* libtiff3g-dev

The package names are from Debian. On your system they might be named
a bit different.

First I got some strange compilation error and had to change

 #include <freetype/freetype.h>

to:

 #include <ft2build.h>
 #include FT_FREETYPE_H

This change was in:

gtk+-directfb-2.0.9/gdk/directfb/glyphsurfacecache.c

You may, or may not have to make that change. Try without first...

Then just make and make install usual.

---

To compile tour GTK+ application, set directfb first in
PKG_CONFIG_PATH:

export PKG_CONFIG_PATH=/usr/local/directfb/lib/pkgconfig:$PKG_CONFIG_PATH

Then compile with pkg-config as usual (gcc -o myapp myapp.c `pkg-config --libs --cflags gtk+-2.0`).

If it works, the executable will run the GTK+ application on the framebuffer, without X
and without any window manager (this can be added, see the directfb docs).

Good luck!


/Albert



-----Original Message-----
From: Hazzy [mailto:hazzyb4u yahoo co in]
Sent: Thu 9/1/2005 4:06 PM
To: Albert Veli
Subject: RE: Query- Gtk on Framebuffer
Hi Albert Thanx Well i m still confused ..how can i display qtk
application on target's LCD ..target is having ARM CPU
core.
can u pls tell me the way for this..

Even i have cross compiled the gtk application for
ARM..but i don't know how to display it on target
LCD..

any help will b appreciated..

Thanx Waiting for reply
Hazzy

--- Albert Veli <albert veli biosensor se> wrote:


Maybe you can try GTK+ for DirectFB.




http://www.directfb.org/index.php?path=Development%2FProjects%2FGTK%2B

I succefully tried GTK+ with DirectFB on an
intel-compatible processor card about a year ago.


/Albert

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org on behalf
of Attilio Fiandrotti
Sent: Thu 9/1/2005 10:02 AM
To: gtk-app-devel-list gnome org
Cc: Hazzy
Subject: Re: Query- Gtk on Framebuffer

as far i know framebuffer support is broken and if
you want to access the fb without using vesafb X drivers you've got to use the directframebuffer gdk backend.. or i am wrong? did someone succeded in compiling gtk+ with fb gdk backend?

ciao

attilio


Hazzy wrote:

Hi Everybody

I want to display Gtk application on

Target's(having

ARM) LCD..

I have to use GTK on the framebuffer..
Can any one help me how to use Gtk on Framebuffer

Thanx in advance
Waiting for reply
Hazzy





        

        
                
__________________________________________________________ Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]