Subject: Serial consoles
To: None <port-i386@NetBSD.ORG>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: port-i386
Date: 04/23/1997 19:15:01
-----BEGIN PGP SIGNED MESSAGE-----
I submitted a PR today to make pc0 fail to probe if there was no
keyboard attached. My PR wasn't quite right, but a mislabelled floppy
foiled my test.
I needed to change the pccnprobe() to fail rather than pcprobe().
What I did is below. Doesn't work. Keeps rebooting. Of course, I
have no console, so it makes things a bit difficult :-)
At first, I thought it was the printf(), since there was no console
yet...
Nope. This is part of a desire to make slightly embedded NetBSD
easier to do. I just care right now about doing "remote" automated
ipsec testing, and kernel debugging. (KGDB remote comes later,
although I guess it would be useful to debug this). For my immediate
need, configuring vt0/pc0 out of the kernel works fine, but I think
that this should be easy...
void
pccnprobe(cp)
struct consdev *cp;
{
int maj;
int keyboard;
keyboard = 1;
#ifdef PCCONS_ALLOW_FAIL
/* Enable interrupts and keyboard, etc. */
if (kbc_put8042cmd(CMDBYTE)) {
/* Flush any garbage. */
kbd_flush_input();
/* Reset the keyboard. */
if (!kbd_cmd(KBC_RESET, 1)) {
keyboard = 0;
}
}
#endif
/* locate the major number */
for (maj = 0; maj < nchrdev; maj++)
if (cdevsw[maj].d_open == pcopen)
break;
/* initialize required fields */
cp->cn_dev = makedev(maj, 0);
if(keyboard)
{
cp->cn_pri = CN_INTERNAL;
}
else
{
cp->cn_pri = CN_DEAD;
}
}
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
iQB1AwUBM16XuKZpLyXYhL+BAQEK3wL/boM+1aUSfPaDPfovFVleOt+QgVInJIgS
FyGgjSq8WyZkmXi3yS9Q6wycd5tV9Q6UA9KzlwPgdis7BzLya4HZo3omXwk6yeUA
h8rtz9crjdwGg0NbqdzNx8+hu6X+PW8g
=hqC3
-----END PGP SIGNATURE-----