nanogui: displaying console and "tux" on framebuffer
Subject:
Re: displaying console and "tux" on framebuffer
From:
Jordan Crouse ####@####.####
Date:
30 Apr 2001 18:23:45 -0000
Message-Id: <0104301224200A.00902@cosmic>
The LPP is very cool, and we use it extensively here. If you don't want to
see the progress however, I suggest that you don't apply the whole progress
patch, and just replace the boot image (there are great instructions within
the LPP, as well as a couple of apps to help you do it).
However, big note: If you do use the LPP, then you will probably redirect
your console to /dev/tty2 (which redirects the kernel messages to another
console). If you do so, Microwindows tty and ttyscan drivers will *NOT* work
like you expect (since they are linked to the console). In many cases they
do not work at all. Apply the following patch to kbd_tty.c (make the same
changes to kbd_ttyscan.c if you want), and set the the envionment variable
CONSOLE to which ever tty you are running your Nano-X server on.
Clear as mud??
Jordan
--- microwin-7/src/drivers/kbd_tty.c Sat Nov 25 21:42:42 2000
+++ /projects/dorado/microwin/src/drivers/kbd_tty.c Mon Apr 2 14:04:54
2001
@@ -6,6 +6,7 @@
*
* /dev/tty TTY Keyboard Driver
*/
+#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
@@ -51,11 +52,21 @@
static int
TTY_Open(KBDDEVICE *pkd)
{
- struct termios new; /* new terminal modes */
+ char *env;
- fd = open(KEYBOARD, O_NONBLOCK);
- if (fd < 0)
- return -1;
+ int i;
+ int ledstate = 0;
+ struct termios new;
+
+ /* Open /dev/tty device*/
+
+ /* locate and open framebuffer, get info*/
+ if(!(env = getenv("CONSOLE")))
+ fd = open(KEYBOARD, O_NONBLOCK);
+ else
+ fd = open(env, O_NONBLOCK);
+
+ if (fd < 0) return -1;
if (tcgetattr(fd, &old) < 0)
goto err;