mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
riscv: qemu: Enable usb keyboard as an input device
This brings PCI xHCI support to QEMU RISC-V and uses a usb keyboard as one of the input devices. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
124308e67b
commit
02be57caf7
4 changed files with 16 additions and 1 deletions
|
@ -76,5 +76,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
imply VIDEO_BOCHS
|
||||
imply SYS_WHITE_ON_BLACK
|
||||
imply PRE_CONSOLE_BUFFER
|
||||
imply USB
|
||||
imply USB_XHCI_HCD
|
||||
imply USB_XHCI_PCI
|
||||
imply USB_KEYBOARD
|
||||
imply CMD_USB
|
||||
|
||||
endif
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <log.h>
|
||||
#include <spl.h>
|
||||
#include <init.h>
|
||||
#include <usb.h>
|
||||
#include <virtio_types.h>
|
||||
#include <virtio.h>
|
||||
|
||||
|
@ -41,6 +42,10 @@ int board_init(void)
|
|||
|
||||
int board_late_init(void)
|
||||
{
|
||||
/* start usb so that usb keyboard can be used as input device */
|
||||
if (CONFIG_IS_ENABLED(USB_KEYBOARD))
|
||||
usb_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,11 @@ and adding::
|
|||
|
||||
-serial stdio -device VGA
|
||||
|
||||
In addition, a usb keyboard can be attached to an emulated xHCI controller in
|
||||
RISC-V virt machine as an option of input devices by adding::
|
||||
|
||||
-device qemu-xhci,id=xhci -device usb-kbd,bus=xhci.0
|
||||
|
||||
Running with KVM
|
||||
----------------
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
/* Environment options */
|
||||
|
||||
#define CFG_STD_DEVICES_SETTINGS "stdin=serial\0" \
|
||||
#define CFG_STD_DEVICES_SETTINGS "stdin=serial,usbkbd\0" \
|
||||
"stdout=serial,vidconsole\0" \
|
||||
"stderr=serial,vidconsole\0"
|
||||
|
||||
|
|
Loading…
Reference in a new issue