Attached is a patch to implement a very preliminary frame buffer device
on top of GTK/GDK, as some of you may have seen at OLS.
- Resolution is fixed to 640x480, 256 colors.
- It uses 2 threads: one for handling widget events, and another one to
update the screen every second. Calling the update routines from
gdkfb_kern.c when the screen contents are changed using
fillrect/copyarea/imgblt didn't work.
- Console and penguin logo (special UML logo) works.
- Userspace access to the frame buffer doesn't work yet.
- It works (usually ;-) on my Mobile Pentium III laptop (both 2.4.24+SKAS and
2.6.7+SKAS hosts, custom config). I get a window where I can enter
commands. Pressing some keys may make it crash.
- On my Athlon XP (2.6.7+SKAS host, config based on the Debian
kernel-image-2.6.7-1-k7 config), it crashed very early until I enlarged the
stack sizes (STACKSIZE) of the gdkfb threads. However, even then the
update thread still hangs somewhere after the initial repaint. Userland
libraries are exactly the same as on the laptop. Strange...
- You have to explicitly enable gdkfb on the kernel command line, e.g.
./linux ubd0=/home/geert/uml/root_fs init=/bin/bash console=stderr \
- It needs SKAS, since TT creates a statically linked image (libX11 needs
libpthread when statically linked, and UML crashes when just linked with
- The patch includes Gerd Knorr's (a pity I didn't manage to find you at
OLS!) clean up of the console/terminal code, with some modifications:
o I modified the stdio console (which you don't need for gdkfb) not to
panic if it cannot register its console, since it conflicts with the
normal CONFIG_VT console subsystem.
o I moved the stderr console to a separate file with its own config
option CONFIG_STDERR_CONSOLE, so you can use it even if
CONFIG_STDIO_CONSOLE is disabled.
- The code uses GTK 1.2, but 2.0 works a bit with some modifications to the
Makefiles (See gtk-config vs. pkg-config). GTK2.0 seems to always consume
the ENTER key, which prohibits you from entering input.
Enjoy, and happy hacking ;-)
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds