Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 May 2000 11:12:53 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   USB Support during Install
Message-ID:  <200005081512.LAA03279@server.baldwin.cx>

next in thread | raw e-mail | index | archive | help
Hey all,

I have been working on adding USB support into our initial install
as I've mentioned previously.  Currently, the only hold-up is that
USB keyboards can't be used in the kernel userconfig.  Thus, our
install currently requires an AT or PS/2 keyboard for x86 machines
until the userconfig utility moves into the loader where it belongs.
Alpha machines should be able to work provided they can workaround
the fact that SRM currently doesn't support USB.  I have not yet
tested this stuff on an Alpha however, so no Alpha-specific patches
are in the patchset.  However, almost all of my patches can be safely
applied to enable USB support in the install, with the exception
that USB keyboards will not work during the install itself.  After
the install USB keyboards will work fine.  This patchset includes a
couple of things:

1) Add USB devices to /dev on the install floppy.
2) Add kbd1 to MAKEDEV's all) target so that we support using
   kbdcontrol to switch keyboards out of the box.
3) Add usbd and usbdevs to the install floppy in /stand.
4) Add USB support to sysintall.  This checks to see if USB was
   detected during boot-up, and if so it enables usbd in rc.conf
   and starts up usbd.
5) Turn on USB support in GENERIC.
6) Add KBD_INSTALL_CDEV into GENERIC.
7) Turn on keyboard probing in sc0.  The syscons driver will
   now use a flag documented in ukbd(4) but not in sc(4) that
   tells syscons to actively search for a keyboard device if
   none is found.  This allows USB keyboards to just be plugged
   in and instantly start working.
8) Require the atkbd0 driver to actually probe to see if a
   keyboard is there.  This allows USB keyboards to be seen by
   sc0 if an AT keyboard isn't plugged into the computer.
   This also means that you will no longer be able to plug an AT
   keyboard into a machine after it has booted and use it.  AT
   keyboards aren't designed for this anyway.  USB keyboards are
   and they work.

Notes: 7) and 8) are done via flags in GENERIC, so you can turn
   them off in your custom kernel if you like to fry your motherboard
   by plugging in AT keyboards while the computer is on.  Also, if
   both an AT keyboard and a USB keyboard are plugged into the machine
   when it is booted, the AT keyboard takes precedence.  Finally, the
   AT keyboard is only probed during boot.  So if you unplug your AT
   keyboard and plug in a USB keyboard, sc0 will still use the AT
   keyboard as its primary keyboard until you use kbdcontrol to change
   it.

The patchset for all of this is at
http://www.FreeBSD.org/~jhb/patches/usb.support.patch.  Please review
and send comments as I'd like to commit it by the end of the week.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005081512.LAA03279>