Date: Fri, 2 Jul 1999 11:19:41 -0400 (EDT) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: freebsd-questions@FreeBSD.ORG (FreeBSD Questions), "Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>"@cc942873-a.ewndsr1.nj.home.com Subject: Re: Serial Console Booting (fwd) Message-ID: <199907021519.LAA23528@cc942873-a.ewndsr1.nj.home.com>
next in thread | raw e-mail | index | archive | help
I got some help off-line from the most recent maintainer of the /usr/src/sys/i386/boot/biosboot/README.serial file, Kazutaka YOKOTA, with my serial booting problems. This latest email from him really cleared up some ambiguities and stale info in the existing documentation. I think this needs to find its way to the mail archives (if not a FAQ entry or into the README.serial file) so other people using serail consoles can find it. I'd like to thank Kazutaka YOKOTA again for his help and his contributions to FreeBSD. This is not the first time he's taken the time to personally help me with a problem. ----- Forwarded message from Kazutaka YOKOTA ----- To: cjclark@home.com Subject: Re: Serial Console Booting Date: Fri, 02 Jul 1999 19:06:48 +0900 From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> >> You had better use -Dh, or -P here. >> >> -Dh will direct output to both VGA and the serial port during the boot >> block, and to the serial port when the boot loader gets the control. >> >> If you use -P and the keyboard is not present, you will have the same >> effect as -Dh. If you use -P and the keyboard is present, you get >> output only on VGA. >> >> Or, you just put -h in /boot.config. This will always direct output >> to the serial port. > >I'll try this, but this is not how I interpret what the boot(8) >manpage says, > > -h toggle internal and serial consoles. You can use this to > switch console devices. For instance, if you boot from > the internal console, you can use the -h option to force > the kernel to use the serial port as its console device. > Alternatively, if you boot from the serial port, you can > use this option to force the kernel to use the internal > display as the console instead. This option has no ef- > fect if the kernel was compiled with options COMCONSOLE. > >Since I built the boot blocks with the BOOT_COMCONSOLE options, I had >assumed that means that the serial port is default, and -h would switch >to VGA. > >By the way, isn't that remark about the 'COMCONSOLE' kernel option >outdated? My kernel has the following, Ok, you are right that the last sentence "This option has no effect... option COMCONSOLE." is outdated and should be replaced. The correct description should be: "The serial port driver sio(4) have a flag to override this option. If this flag is set, the serial port will always be used as the console, regardless of the -h option. See the man page for sio(4)." The flag in question is 0x20. Anyway, BOOT_COMCONSOLE_PORT or BOOT_COMCONSOLE_SPEED in make.conf will not force the boot block and the boot loader to use the serial port. They just specify parameters IF a serial port is to be used. If you look at /etc/make.conf closely, you will find the following sentence. # By default, the system will always use the keyboard/video card as system # console. However, the boot blocks may be dynamically configured to use a # serial port in addition to or instead of the keyboard/video console. # # By default we use COM1 as our serial console port *if* we're going to use # a serial port as our console at all. (0x3E8 = COM2) ># Change sio console settings, add sio2 >device sio0 at isa? port "IO_COM1" tty irq 4 >device sio1 at isa? port "IO_COM2" flags 0x30 tty irq 3 >device sio2 at isa? port "IO_COM3" tty irq 5 >options "CONSPEED=19200" #default speed for serial console (default 9 >600) In this configuration, sio1 will always be the console ONCE the kernel is loaded by the boot loader, because 0x20 is specified to sio1. However, the console MAY or MAY NOT be a serial port while the boot block and the boot loader are running; it depends on the option written in /boot.config. If you change the flags to 0x10, the serial port will become the console only if you put -h in /boot.conf or you put -P and you detach the keyboard from the system. To summarize, Case 1: your sioX has the flags 0x10. /boot.conf console during console during console after boot block boot loader kernel is loaded --------------------------------------------------------------------------- nothing VGA VGA VGA -h serial serial serial -D serial and VGA VGA VGA -Dh serial and VGA serial serial -P, keyboard present VGA VGA VGA -P, keyboard absent serial and VGA serial serial Case 2: your sioX has the flags 0x30. /boot.conf console during console during console after boot block boot loader kernel is loaded --------------------------------------------------------------------------- nothing VGA VGA serial -h serial serial serial -D serial and VGA VGA serial -Dh serial and VGA serial serial -P, keyboard present VGA VGA serial -P, keyboard absent serial and VGA serial serial Kazu ----- End of forwarded message from Kazutaka YOKOTA ----- -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907021519.LAA23528>