From owner-freebsd-current@FreeBSD.ORG Fri Sep 12 20:00:31 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E71181065679 for ; Fri, 12 Sep 2008 20:00:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id CC9CC8FC16 for ; Fri, 12 Sep 2008 20:00:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A4A71241F; Fri, 12 Sep 2008 13:00:31 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1A13F2D6013; Fri, 12 Sep 2008 13:00:31 -0700 (PDT) Message-ID: <48CACA5E.7010902@elischer.org> Date: Fri, 12 Sep 2008 13:00:30 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Garance A Drosihn References: <75BD7074-F561-42D5-A537-FFF44B612BFB@mac.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcel Moolenaar , Peter Wemm , freebsd-current@freebsd.org Subject: Re: serial console on 8.x (probably sio vs uart) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 20:00:32 -0000 Garance A Drosihn wrote: > Thanks for the various suggestions, I seem to have it working > now. For the benefit of anyone who finds this thread at a later > date, let me answer several of those replies in a single email. > >> > >> > uart(4) does tell you when it's the console: >>> >>> uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 on acpi0 >>> uart0: [FILTER] >>> uart0: console (115200,n,8,1) >>> >>> The first question is: do you see a line like the one above? > > No, there were no lines like that in dmesg. > >> > If not (most likely), try to boot explicitly with a serial >> > console (i.e. set boot_serial=yes at the loader prompt or >> > boot with -h). > > A 'grep -i uart /var/run/dmesg.boot' came up with no lines > matched. Nothing came up whether I do a plain 'boot', or a > 'boot -h', or 'set boot_serial=yes' followed by 'boot'. A > grep of dmesg.boot also does not bring up any sio devices. > >> He probably also needs to update his /boot/device.hints file. >> (change sio to uart) > > I did copy /usr/src/sys/i386/conf/GENERIC.hints to > /boot/device.hints on the 8.x system. That copy does have uart > entries and does not have any sio entries. I did install a new > /etc/ttys too, and that lists uart devices instead of sio devices. > > Historically, what I have done is boot up off an older (freebsd > 6.x) partition, press '6' in the boot menu to escape to the loader > prompt, and then I enter: > > unload > set currdev=disk1s4a: > boot > > (my 8.x install is on partition 4, while the 6.x install that I'm > actually booting up off of is on partition 2). Also, the file > /boot.config on both partitions has the three letters '-PD' in it. > That sequence worked fine for a few years now, long enough that I > don't really remember everything I did to set it up... :-) > > Apparently, the trick is that /boot/device.hints is processed > before I dropped into the boot loader, and thus the hints were > read from the device.hints from the original (6.x) partition. And > it seems that device.hints is not processed by the 'boot' command > itself, so the boot command I did after changing 'currdev' did not > pick up the newer device.hints on the 8.x partition. I noticed this > when I did a 'show' (with no variable name) to see what loader > variables were already set. The listing included all the hints > for the sio devices. > > So if I enter the commands: > > set hint.uart.0.at="isa" > set hint.uart.0.port="0x3F8" > set hint.uart.0.flags="0x10" > set hint.uart.0.irq="4" > > before I do the 'boot' command, then the serial console comes up OK. > > The quick and simple-minded solution for me is to create a "boot-8x" > file on the 6.x partition which has all the correct commands to boot > into 8.x, and then I can 'include' that file when I escape to the > boot-loader prompt. (It also seems that 'include /boot/device.hints' > will fail with "stack underflow" if I try that after setting currdev. > Looks like 'include' trips up handling the '#' comment line). > > In any case, I do have the serial console working now. Thanks! add the uart entries to the device.hints on the FreeBSD 6 partition. it will ignore them, but the new kernel will use them. >