From owner-freebsd-current@FreeBSD.ORG Tue Aug 16 17:50:40 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3A6D16A443; Tue, 16 Aug 2005 17:50:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CF9C43D45; Tue, 16 Aug 2005 17:50:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 16 Aug 2005 14:05:11 -0400 From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 16 Aug 2005 13:44:20 -0400 User-Agent: KMail/1.8 References: <200508141735.aa69900@nowhere.iedowse.com> In-Reply-To: <200508141735.aa69900@nowhere.iedowse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508161344.22121.jhb@FreeBSD.org> Cc: Ian Dowse , current@freebsd.org Subject: Re: Loader serial baud rate control 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: Tue, 16 Aug 2005 17:50:40 -0000 On Sunday 14 August 2005 12:35 pm, Ian Dowse wrote: > In message <200508140243.aa50444@nowhere.iedowse.com>, Ian Dowse writes: > > > >Currently the baud rate used by the i386/amd64 loader for a serial > >console is hard-coded as 9600 baud and you need to recompile the > >loader to change it. Below is a patch that adds a "comconsole_speed" > >loader environment variable so that the speed can be changed from > >loader.conf or manually from the loader prompt. It doesn't quite > >do what you want though, since the loader has already printed a > >number of things by the time it reads loader.conf. Any comments? > > Following a few suggestions, here's a more extensive change that > allows you to just write "-h -S19200" for example to /boot.config, > and the setting will propagate to boot2, loader and the kernel. > The rate can be overridden from the 'boot:' prompt and also via > the loader "comconsole_speed" variable > > This adds about 50 bytes to the size of boot2, and it required a > few other boot2 changes to limit the size impact. > > The loader stage now assumes that the baud rate has already been > set if the previous stage boot loader requested a serial console > (RB_SERIAL or RB_MULTIPLE). I'm not sure if this is a reasonable > assumption in all cases? Very cool! Since it will work for this case I think it's fine: /boot/loader.conf: comconsole_speed=115200 console=comconsole -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org