Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wscons and serial console
It is told that on Jan 20, "John Klos" wrote thus:
> When the system fully boots, I get a message:
> Jan 20 07:18:15 reva getty[277]: /dev/ttyE0: Device not configured
>
> I get that in spite of what I see before that:
> wsdisplay0: screen 1 added (default, vt100 emulation)
> wsdisplay0: screen 2 added (default, vt100 emulation)
> wsdisplay0: screen 3 added (default, vt100 emulation)
> wsdisplay0: screen 4 added (default, vt100 emulation)
Screen 0 would be ttyE0, it is usually the same as console screen. When
using serial console you should turn screen 0 on in /etc/wscons.conf.
> And I cannot type on the keyboard, nor can I switch virtual consoles. The
> screen just says:
Looks like wscons isn't connecting the keyboard and screen. Probably
because kbd incorrectly always identifies itself as console keyboard, but
I need to study this a bit more.
The attached patch seems to fix this. You also need to add 'pseudo-device
wsmux' into kernel config.
? .kbd.c.swp
Index: amidisplaycc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/dev/amidisplaycc.c,v
retrieving revision 1.14
diff -u -u -r1.14 amidisplaycc.c
--- amidisplaycc.c 2003/11/12 17:42:40 1.14
+++ amidisplaycc.c 2004/01/23 13:52:51
@@ -393,6 +393,8 @@
void
amidisplaycc_cninit(struct consdev * cd)
{
+ void kbd_cninit(void);
+
void * cookie;
long attr;
int x;
@@ -425,6 +427,8 @@
&cookie, &x, &y, &attr);
wsdisplay_cnattach(&amidisplaycc_screentab[0].wsdescr,
cookie, x, y, attr);
+
+ kbd_cninit();
}
static int
Index: kbd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/dev/kbd.c,v
retrieving revision 1.46
diff -u -u -r1.46 kbd.c
--- kbd.c 2003/09/21 19:16:48 1.46
+++ kbd.c 2004/01/23 13:52:52
@@ -139,7 +139,7 @@
u_char k_rlprfx; /* MF-II rel. prefix has been seen */
u_char k_mf2;
#endif
-
+ int k_console;
#if NWSKBD>0
struct device *k_wskbddev; /* pointer to wskbd for sending strokes */
int k_pollingmode; /* polling mode on? whatever it isss... */
@@ -203,11 +203,8 @@
* Try to attach the wskbd.
*/
struct wskbddev_attach_args waa;
-
- /* Maybe should be done before this?... */
- wskbd_cnattach(&kbd_consops, NULL, &kbd_mapdata);
- waa.console = 1;
+ waa.console = kbd_softc.k_console;
waa.keymap = &kbd_mapdata;
waa.accessops = &kbd_accessops;
waa.accesscookie = NULL;
@@ -217,6 +214,17 @@
}
kbdenable();
#endif /* WSKBD */
+}
+
+void kbd_cninit(void);
+
+void
+kbd_cninit(void)
+{
+#if NWSKBD > 0
+ wskbd_cnattach(&kbd_consops, NULL, &kbd_mapdata);
+ kbd_softc.k_console = 1;
+#endif
}
/* definitions for amiga keyboard encoding. */
Home |
Main Index |
Thread Index |
Old Index