Skip to content

Commit

Permalink
[usb] Add basic support for USB keyboards
Browse files Browse the repository at this point in the history
When USB network card drivers are used, the BIOS' legacy USB
capability is necessarily disabled since there is no way to share the
host controller between the BIOS and iPXE.  This currently results in
USB keyboards becoming non-functional in USB-enabled builds of iPXE.

Fix by adding basic support for USB keyboards, enabled by default in
iPXE builds which include USB support.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed May 12, 2015
1 parent a8e4187 commit 3726722
Show file tree
Hide file tree
Showing 7 changed files with 680 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/config/config_usb.c
Expand Up @@ -43,3 +43,10 @@ REQUIRE_OBJECT ( ehci );
#ifdef USB_HCD_UHCI
REQUIRE_OBJECT ( uhci );
#endif

/*
* Drag in USB peripherals
*/
#ifdef USB_KEYBOARD
REQUIRE_OBJECT ( usbkbd );
#endif
1 change: 1 addition & 0 deletions src/config/defaults/pcbios.h
Expand Up @@ -39,6 +39,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define USB_HCD_XHCI /* xHCI USB host controller */
#define USB_HCD_EHCI /* EHCI USB host controller */
#define USB_HCD_UHCI /* UHCI USB host controller */
#define USB_KEYBOARD /* USB keyboards */

#define REBOOT_CMD /* Reboot command */
#define CPUID_CMD /* x86 CPU feature detection command */
Expand Down
6 changes: 6 additions & 0 deletions src/config/usb.h
Expand Up @@ -19,6 +19,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
//#undef USB_HCD_EHCI /* EHCI USB host controller */
//#undef USB_HCD_UHCI /* UHCI USB host controller */

/*
* USB peripherals
*
*/
//#undef USB_KEYBOARD /* USB keyboards */

#include <config/named.h>
#include NAMED_CONFIG(usb.h)
#include <config/local/usb.h>
Expand Down

0 comments on commit 3726722

Please sign in to comment.