From owner-freebsd-usb@FreeBSD.ORG Wed Nov 12 12:30:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E3441065674 for ; Wed, 12 Nov 2008 12:30:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA08.emeryville.ca.mail.comcast.net (qmta08.emeryville.ca.mail.comcast.net [76.96.30.80]) by mx1.freebsd.org (Postfix) with ESMTP id 4752D8FC18 for ; Wed, 12 Nov 2008 12:30:11 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id eBPA1a00Q0EPchoA8CEB4a; Wed, 12 Nov 2008 12:14:11 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA01.emeryville.ca.mail.comcast.net with comcast id eCEA1a0042P6wsM8MCEAlr; Wed, 12 Nov 2008 12:14:11 +0000 X-Authority-Analysis: v=1.0 c=1 a=aarVl-9CAAAA:8 a=QycZ5dHgAAAA:8 a=HTTBBloA31bZZr2vb6AA:9 a=JxNATzhhykdpcfkF6iVXLfSzFeMA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 6B14E5C1A; Wed, 12 Nov 2008 04:14:10 -0800 (PST) Date: Wed, 12 Nov 2008 04:14:10 -0800 From: Jeremy Chadwick To: Andriy Gapon Message-ID: <20081112121410.GA24629@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491AC502.9000507@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Nate Eldredge , freebsd-hackers@freebsd.org, FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:30:11 -0000 On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: > on 12/11/2008 13:53 Nate Eldredge said the following: > > On Wed, 12 Nov 2008, Andriy Gapon wrote: > > > >> on 05/11/2008 17:24 Andriy Gapon said the following: > > [...] > >>> I have a legacy-free system (no PS/2 ports, only USB) and I wanted to > >>> try a kernel without atkbd and psm (with ums, ukbd, kbdmux), but was > >>> bitten hard when I made a mistake and kernel could not find/mount root > >>> filesystem. > >>> > >>> So I stuck at mountroot prompt without a keyboard to enter anything. > >>> This was repeatable about 10 times after which I resorted to live cd. > >>> > >>> Since then I put back atkbdc into my kernel. I guess BIOS or USB > >>> hardware emulate AT or PS/2 keyboard, so the USB keyboard works before > >>> the driver attaches. I guess I need such emulation e.g. for loader or > >>> boot0 configuration. But I guess I don't have to have atkbd driver in > >>> kernel. > >> > >> This turned out not to be a complete solution as it seems that there are > >> some quirks about legacy USB here, sometimes keyboard stops working even > >> at loader prompt (this is described in a different thread). > >> > >> ukbd attachment still puzzles me a lot. > >> I look at some older dmesg, e.g. this 7.0-RELEASE one: > >> http://www.mavetju.org/mail/view_message.php?list=freebsd-usb&id=2709973 > >> and see that ukbd attaches along with ums before mountroot. > >> > >> I look at newer dmesg and I see that ums attaches at about the same time > >> as before but ukbd consistently attaches after mountroot. > >> I wonder what might cause such behavior and how to fix it. > >> I definitely would like to see ukbd attach before mountroot, I can debug > >> this issue, but need some hints on where to start. > > > > I haven't been following this thread, and I'm pretty sleepy right now, > > so sorry if this is irrelevant, but I had a somewhat similar problem > > that was fixed by adding > > > > hint.atkbd.0.flags="0x1" > > > > to /boot/device.hints . To those reading, the above setting enables the following option: bit 0 (FAIL_IF_NO_KBD) By default the atkbd driver will install even if a keyboard is not actually connected to the system. This option prevents the driver from being installed in this situation. > I can try this, but I think this wouldn't help for two reasons: > 1. I already tried kernel without atkb at all > 2. if ukbd driver is not attached then I don't see any way USB keyboard > would work in non-legacy way Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 keyboard to work. None of these stages use ukbd(4) or anything -- there is no kernel loaded at this point!! Meaning: if you have a USB keyboard, your BIOS will need to have a "USB Legacy" option to cause it to act as a PS/2 keyboard, for typing in boot0/boot2/loader to work. Device hints are for kernel drivers, once the kernel is loaded. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |