Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] GTK+ for framebuffer?
@ 2013-09-03 10:09 Woody Wu
  2013-09-03 11:31 ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2013-09-03 10:09 UTC (permalink / raw)
  To: buildroot

Hi,

It seems buildroot already has GTK.  Does it can build GTK+ for running
on framebuffer (a.k.a, gtkfb)?

Thanks.

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-03 10:09 [Buildroot] GTK+ for framebuffer? Woody Wu
@ 2013-09-03 11:31 ` Thomas Petazzoni
  2013-09-04  2:40   ` Woody Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-03 11:31 UTC (permalink / raw)
  To: buildroot

Dear Woody Wu,

On Tue, 3 Sep 2013 18:09:06 +0800, Woody Wu wrote:

> It seems buildroot already has GTK.  Does it can build GTK+ for running
> on framebuffer (a.k.a, gtkfb)?

There used to be a DirectFB backend in Gtk, but it was always broken,
because nobody was maintaining it (in Gtk upstream). It was causing too
many problems in Buildroot to keep the support for such a broken
feature, so we removed it. People interested in running Gtk on DirectFB
should work with upstream to fix the issues and get the corresponding
patches merged.

These days, if you want to run Gtk, you should run X.org (which can run
on top of the framebuffer), or maybe you can explore Wayland (but I
guess it'll require Gtk 3.x, while we only have Gtk 2.x in Buildroot
for the moment).

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-03 11:31 ` Thomas Petazzoni
@ 2013-09-04  2:40   ` Woody Wu
  2013-09-04  7:35     ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2013-09-04  2:40 UTC (permalink / raw)
  To: buildroot

On Tue, Sep 03, 2013 at 01:31:45PM +0200, Thomas Petazzoni wrote:
> Dear Woody Wu,
> 
> On Tue, 3 Sep 2013 18:09:06 +0800, Woody Wu wrote:
> 
> > It seems buildroot already has GTK.  Does it can build GTK+ for running
> > on framebuffer (a.k.a, gtkfb)?
> 
> There used to be a DirectFB backend in Gtk, but it was always broken,
> because nobody was maintaining it (in Gtk upstream). It was causing too
> many problems in Buildroot to keep the support for such a broken
> feature, so we removed it. People interested in running Gtk on DirectFB
> should work with upstream to fix the issues and get the corresponding
> patches merged.
> 
> These days, if you want to run Gtk, you should run X.org (which can run
> on top of the framebuffer), or maybe you can explore Wayland (but I
> guess it'll require Gtk 3.x, while we only have Gtk 2.x in Buildroot
> for the moment).
> 
> Best regards,
> 
> Thomas

Hi, Thomas

Even I cannot find libgtk (neither 2.x or 3.x) in buildroot.  I enabled
a lot of options which looks like related to gtk, then I got libraries
like glib, pango, atk, etc., but just no gtk.  Where is the option to
enable it? I think I looked through all the options :(

BTW: in your opinion, GtkFB and gtk on TinyX, which one is faster?

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-04  2:40   ` Woody Wu
@ 2013-09-04  7:35     ` Thomas Petazzoni
  2013-09-05  6:02       ` Woody Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-04  7:35 UTC (permalink / raw)
  To: buildroot

Dear Woody Wu,

On Wed, 4 Sep 2013 10:40:19 +0800, Woody Wu wrote:

> Even I cannot find libgtk (neither 2.x or 3.x) in buildroot.  I
> enabled a lot of options which looks like related to gtk, then I got
> libraries like glib, pango, atk, etc., but just no gtk.  Where is the
> option to enable it? I think I looked through all the options :(

Hint: in menuconfig, hit '/', and then search for LIBGTK2. This will
show you where the option for Gtk is located, what are its
dependencies, and which of its dependencies are not satisfied at the
moment.

Here is what I have here:

Symbol: BR2_PACKAGE_LIBGTK2 [=n]
Type  : boolean
Prompt: libgtk2
  Defined at package/libgtk2/Config.in:1
  Depends on: BR2_PACKAGE_XORG7 [=n] && BR2_USE_WCHAR [=y] && BR2_TOOLCHAIN_HAS_THREADS [=y] && BR2_INSTALL_LIBSTDCPP [=y]
  Location:
    -> Target packages
       -> Libraries
 (2)      -> Graphics

This tells you that libgtk2 package is currently not selected ([=n] on
the first line). This tells you the libgtk2 package is located in
Target packages -> Libraries -> Graphics. And more importantly, the
line "Depends on:" gives you the list of dependencies. In the example
above, there are four dependencies: the last three dependencies (wchar,
threads and C++) are satisfied. However, the first dependency,
BR2_PACKAGE_XORG7 is not satisfied (see the [=n]).

So to be able to enable Gtk, you need to enable X.org.

> BTW: in your opinion, GtkFB and gtk on TinyX, which one is faster?

I have no idea as I haven't benchmarked. However, I'm not sure why you
keep talking about GtkFB: the DirectFB for Gtk is no longer maintained,
so it cannot be used. Your only reasonable option today for Gtk 2.x is
with X.org.

A while ago, I remember switching a project from Gtk/DirectFB (at the
time it was more or less working) to Gtk/X.org because it ended up
working better. I don't quite remember if it was a font rendering
problem, or a performance problem, but clearly, Gtk/X.org fixed the
problem.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-04  7:35     ` Thomas Petazzoni
@ 2013-09-05  6:02       ` Woody Wu
  2013-09-05  7:10         ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2013-09-05  6:02 UTC (permalink / raw)
  To: buildroot

On Wed, Sep 04, 2013 at 09:35:10AM +0200, Thomas Petazzoni wrote:
> Dear Woody Wu,
> 
> On Wed, 4 Sep 2013 10:40:19 +0800, Woody Wu wrote:
> 
> > Even I cannot find libgtk (neither 2.x or 3.x) in buildroot.  I
> > enabled a lot of options which looks like related to gtk, then I got
> > libraries like glib, pango, atk, etc., but just no gtk.  Where is the
> > option to enable it? I think I looked through all the options :(
> 
> Hint: in menuconfig, hit '/', and then search for LIBGTK2. This will
> show you where the option for Gtk is located, what are its
> dependencies, and which of its dependencies are not satisfied at the
> moment.
> 
> Here is what I have here:
> 
> Symbol: BR2_PACKAGE_LIBGTK2 [=n]
> Type  : boolean
> Prompt: libgtk2
>   Defined at package/libgtk2/Config.in:1
>   Depends on: BR2_PACKAGE_XORG7 [=n] && BR2_USE_WCHAR [=y] && BR2_TOOLCHAIN_HAS_THREADS [=y] && BR2_INSTALL_LIBSTDCPP [=y]
>   Location:
>     -> Target packages
>        -> Libraries
>  (2)      -> Graphics
> 
> This tells you that libgtk2 package is currently not selected ([=n] on
> the first line). This tells you the libgtk2 package is located in
> Target packages -> Libraries -> Graphics. And more importantly, the
> line "Depends on:" gives you the list of dependencies. In the example
> above, there are four dependencies: the last three dependencies (wchar,
> threads and C++) are satisfied. However, the first dependency,
> BR2_PACKAGE_XORG7 is not satisfied (see the [=n]).
> 
> So to be able to enable Gtk, you need to enable X.org.
> 
> > BTW: in your opinion, GtkFB and gtk on TinyX, which one is faster?
> 
> I have no idea as I haven't benchmarked. However, I'm not sure why you
> keep talking about GtkFB: the DirectFB for Gtk is no longer maintained,
> so it cannot be used. Your only reasonable option today for Gtk 2.x is
> with X.org.
> 
> A while ago, I remember switching a project from Gtk/DirectFB (at the
> time it was more or less working) to Gtk/X.org because it ended up
> working better. I don't quite remember if it was a font rendering
> problem, or a performance problem, but clearly, Gtk/X.org fixed the
> problem.
> 

Thoams,

Many thanks for your information.  Now I feel more clear that I should
go Gtk/X.org.  On the other side, I have no experience on running x.org
on an embeded system. What things in buildroot I should enable to build
a minimal system that can at lest run the gtk demons on TinyX? My
display is just framebuffer. I understand, the question may sounds a
little stupid.  Looking forward for your help.


-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-05  6:02       ` Woody Wu
@ 2013-09-05  7:10         ` Thomas Petazzoni
  2013-09-05  8:19           ` Woody Wu
  2013-09-09  1:39           ` Woody Wu
  0 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-05  7:10 UTC (permalink / raw)
  To: buildroot

Dear Woody Wu,

On Thu, 5 Sep 2013 14:02:35 +0800, Woody Wu wrote:

> Many thanks for your information.  Now I feel more clear that I should
> go Gtk/X.org.  On the other side, I have no experience on running x.org
> on an embeded system. What things in buildroot I should enable to build
> a minimal system that can at lest run the gtk demons on TinyX? My
> display is just framebuffer. I understand, the question may sounds a
> little stupid.  Looking forward for your help.

I believe to get things started enable BR2_PACKAGE_XORG7, enable
BR2_PACKAGE_XSERVER_XORG_SERVER, keep the KDrive/Tiny-X server type,
and enable BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV.

Then, you will have Xfbdev on your target, which is the X server. It
has a bunch of options that allows you to specify which evdev device to
use as a mouse and as a keyboard, if you have such input devices on
your system.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-05  7:10         ` Thomas Petazzoni
@ 2013-09-05  8:19           ` Woody Wu
  2013-09-09  1:39           ` Woody Wu
  1 sibling, 0 replies; 11+ messages in thread
From: Woody Wu @ 2013-09-05  8:19 UTC (permalink / raw)
  To: buildroot

On Thu, Sep 05, 2013 at 09:10:54AM +0200, Thomas Petazzoni wrote:
> Dear Woody Wu,
> 
> On Thu, 5 Sep 2013 14:02:35 +0800, Woody Wu wrote:
> 
> > Many thanks for your information.  Now I feel more clear that I should
> > go Gtk/X.org.  On the other side, I have no experience on running x.org
> > on an embeded system. What things in buildroot I should enable to build
> > a minimal system that can at lest run the gtk demons on TinyX? My
> > display is just framebuffer. I understand, the question may sounds a
> > little stupid.  Looking forward for your help.
> 
> I believe to get things started enable BR2_PACKAGE_XORG7, enable
> BR2_PACKAGE_XSERVER_XORG_SERVER, keep the KDrive/Tiny-X server type,
> and enable BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV.
> 
> Then, you will have Xfbdev on your target, which is the X server. It
> has a bunch of options that allows you to specify which evdev device to
> use as a mouse and as a keyboard, if you have such input devices on
> your system.
> 

Okay! I will try :-)

> -- 
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-05  7:10         ` Thomas Petazzoni
  2013-09-05  8:19           ` Woody Wu
@ 2013-09-09  1:39           ` Woody Wu
  2013-09-09  7:08             ` Thomas Petazzoni
  1 sibling, 1 reply; 11+ messages in thread
From: Woody Wu @ 2013-09-09  1:39 UTC (permalink / raw)
  To: buildroot

On Thu, Sep 05, 2013 at 09:10:54AM +0200, Thomas Petazzoni wrote:
> Dear Woody Wu,
> 
> On Thu, 5 Sep 2013 14:02:35 +0800, Woody Wu wrote:
> 
> > Many thanks for your information.  Now I feel more clear that I should
> > go Gtk/X.org.  On the other side, I have no experience on running x.org
> > on an embeded system. What things in buildroot I should enable to build
> > a minimal system that can at lest run the gtk demons on TinyX? My
> > display is just framebuffer. I understand, the question may sounds a
> > little stupid.  Looking forward for your help.
> 
> I believe to get things started enable BR2_PACKAGE_XORG7, enable
> BR2_PACKAGE_XSERVER_XORG_SERVER, keep the KDrive/Tiny-X server type,
> and enable BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV.
> 
> Then, you will have Xfbdev on your target, which is the X server. It
> has a bunch of options that allows you to specify which evdev device to
> use as a mouse and as a keyboard, if you have such input devices on
> your system.
> 

Hi, Thomas

I've already have Xfbdev started. Thanks for your help. But I have not
yet figured out a right way to pass my touchscreen device
(/dev/input/event0) to Xfbdev.  I tried something like "-mouse
evdev,,..." and "-mouse tslib,,..." but always got strange warning
messages.  Maybe you have experience on this.

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-09  1:39           ` Woody Wu
@ 2013-09-09  7:08             ` Thomas Petazzoni
  2013-09-09 13:16               ` Woody Wu
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-09  7:08 UTC (permalink / raw)
  To: buildroot

Dear Woody Wu,

On Mon, 9 Sep 2013 09:39:56 +0800, Woody Wu wrote:

> I've already have Xfbdev started. Thanks for your help. But I have not
> yet figured out a right way to pass my touchscreen device
> (/dev/input/event0) to Xfbdev.  I tried something like "-mouse
> evdev,,..." and "-mouse tslib,,..." but always got strange warning
> messages.  Maybe you have experience on this.

Here is known-working command line I was using to run Xfbdev under Qemu:

  Xfbdev -keybd evdev,,device=/dev/input/event0 -mouse evdev,,device=/dev/input/event1 &

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-09  7:08             ` Thomas Petazzoni
@ 2013-09-09 13:16               ` Woody Wu
  2013-09-09 13:35                 ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2013-09-09 13:16 UTC (permalink / raw)
  To: buildroot

On Mon, Sep 09, 2013 at 09:08:08AM +0200, Thomas Petazzoni wrote:
> Dear Woody Wu,
> 
> On Mon, 9 Sep 2013 09:39:56 +0800, Woody Wu wrote:
> 
> > I've already have Xfbdev started. Thanks for your help. But I have not
> > yet figured out a right way to pass my touchscreen device
> > (/dev/input/event0) to Xfbdev.  I tried something like "-mouse
> > evdev,,..." and "-mouse tslib,,..." but always got strange warning
> > messages.  Maybe you have experience on this.
> 
> Here is known-working command line I was using to run Xfbdev under Qemu:
> 
>   Xfbdev -keybd evdev,,device=/dev/input/event0 -mouse evdev,,device=/dev/input/event1 &
> 

Thanks for the example. Finally I found my command line was correct (I
used tslib and has not yet tried evdev with success), the problem
actually came from a xorg server bug in version 1.12.4 (which is used by
buildroot 2013.08).  I just fixed the bug in xorg and posted a patch on
this list. The bug make the the xserver option such as "device=xxxx" is
parsed as (key=device=, value=xxxx), but it should be (key=device,
value=xxxx).

Because of this bug, whatever way I tried, I always cannot get Xfbdev
started correctly.

BTW:  before I am going to try 'evdev', would you tell me what's the
major difference between using 'evdev' and 'tslib' for my touchscreen?
Which way is better?  Thanks.

Cheers,
woody


> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] GTK+ for framebuffer?
  2013-09-09 13:16               ` Woody Wu
@ 2013-09-09 13:35                 ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-09 13:35 UTC (permalink / raw)
  To: buildroot

Dear Woody Wu,

On Mon, 9 Sep 2013 21:16:47 +0800, Woody Wu wrote:

> Thanks for the example. Finally I found my command line was correct (I
> used tslib and has not yet tried evdev with success), the problem
> actually came from a xorg server bug in version 1.12.4 (which is used by
> buildroot 2013.08).  I just fixed the bug in xorg and posted a patch on
> this list. The bug make the the xserver option such as "device=xxxx" is
> parsed as (key=device=, value=xxxx), but it should be (key=device,
> value=xxxx).

Ok.

> BTW:  before I am going to try 'evdev', would you tell me what's the
> major difference between using 'evdev' and 'tslib' for my touchscreen?
> Which way is better?  Thanks.

tslib is a userspace library that you can add between the evdev input
device and X.org to apply some additional filtering and other
algorithms on the touchscreen events. See the tslib documentation for
details.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-09-09 13:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 10:09 [Buildroot] GTK+ for framebuffer? Woody Wu
2013-09-03 11:31 ` Thomas Petazzoni
2013-09-04  2:40   ` Woody Wu
2013-09-04  7:35     ` Thomas Petazzoni
2013-09-05  6:02       ` Woody Wu
2013-09-05  7:10         ` Thomas Petazzoni
2013-09-05  8:19           ` Woody Wu
2013-09-09  1:39           ` Woody Wu
2013-09-09  7:08             ` Thomas Petazzoni
2013-09-09 13:16               ` Woody Wu
2013-09-09 13:35                 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox