On Fri, Mar 16, 2001 at 12:20:46PM -0500, [EMAIL PROTECTED] wrote:
> I keep finding that I really need to be able to use linuxbios to choose
> a kernel image and enter a kernel command line. This is a basic
> feature of nearly every kernel loader such a lilo and syslinux.
>
> Using kernels to load kernels definately has its place but is too space
> intensive for what I am doing.
>
> I think I heard that someone had some sort of serial console input
> code. Is this available? Is it useful? ...or should I start from
> scratch?
I've done it, though my code is pretty far forked from linuxbios-cvs. The
code should be really easy to tear out, though. Grab a tarball from
http://www.reric.net/linux/linuxbios/
and take a look at these bits of code to see if it'll work for you:
debug.c, especially debug_menu() and the kparam_* functions
printk.c, getline() stub
serial.c, serial_getline(), which uses serial_getchar() and
serial_printchar() to actually move chars to/from the port.
I'm not sure what mechanism printk uses in cvs to print chars to the
serial port, but you'll probably want to make printk and the input-echo
use the same mechanism.
And of course I should mention that this is a wonderful vehicle for
fiddling with chipset or PCI registers, changing kernel parameters,
testing memory or other hardware, adding quick-and-dirty debug tests...
Eric