[ltp] USB Keyboard

Matt Graham linux-thinkpad@linux-thinkpad.org
Tue, 27 Mar 2007 15:59:12 -0400


On Tuesday 27 March 2007 12:03, after a long battle with technology, 
Stefan Monnier wrote:
>> Is there any way to get a USB
>> keyboard recognized by Grub or another bootloader?

In general, on x86 machines, the BIOS must intercept the HID or HIDBP 
packets the USB keyboard generates, then translate those packets into 
PS/2 keyboard events.  Some BIOSes can do this.  I'm pretty sure the 
Tyan S2865 board I have at home can do that, but I don't have a USB 
keyboard to test it out on.  I don't know whether this option is 
available on Thinkpads, because there's a perfectly good PS/2 keyboard 
on all Thinkpads.

> I seem to remember some effort to try and make a Linux boot loader,
> but I can't find any trace of it anywhere.  The closest I can find is
> the kexec thingy which IIUC is not yet able to boot into Windows.

The real problem with x86 bootloaders is that they're totally dependent 
on the BIOS for most things.  For a BIOS-independent way to recognize a 
USB keyboard, you'd have to rewrite usbcore, usb-uhci and usb-ohci, and 
usbkbd (or usbhid if you're into Serious Pain) in real-mode assembly.  
This is a complete pain, so I'd be very surprised if anyone's done it.

-- 
   Q: How many surrealists does it take to change a light bulb?
   A: Two. One to hold the giraffe and the other to fill the bathtub
   with brightly colored machine tools.
There is no Darkness in Eternity/But only Light too dim for us to see