Add support for specifying UDC that HID gadget will connect to

Currently, HID gadget always connects to the USB virtual hub port
under /sys/bus/platform/devices/1e6a0000.usb-vhub, which only works
on ASPEED platform.

This commit adds support for specifying UDC that HID gadget will
connect to, it could be useful for non-ASPEED platform. Although there
are still some other ASPEED-specific behaviors need to be addressed,
but this commit is the first step for non-ASPEED platform.

Tested:
Specify UDC by '-u' parameter and HID gadget will connect to it. Otherwise,
HID gadget will connect to the USB virtual hub port.

Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Change-Id: Ie24ed9d32cb4f7483e8d4c8b51cc5e1bb5fa94de
5 files changed
tree: b19ae1442825e09f5f29d750e56c7beed47f68e5
  1. .clang-format
  2. create_usbhid.sh
  3. ikvm_args.cpp
  4. ikvm_args.hpp
  5. ikvm_input.cpp
  6. ikvm_input.hpp
  7. ikvm_manager.cpp
  8. ikvm_manager.hpp
  9. ikvm_server.cpp
  10. ikvm_server.hpp
  11. ikvm_video.cpp
  12. ikvm_video.hpp
  13. LICENSE
  14. meson.build
  15. obmc-ikvm.cpp
  16. OWNERS
  17. README.md
  18. scancodes.hpp
  19. start-ipkvm.service
README.md

OpenBMC IpKVM Server

The obmc-ikvm application is a VNC server that provides access to the host graphics output. The application interfaces with the video device on the BMC that captures the host graphics, and then serves that video data on the RFB (remote framebuffer, also known as VNC) protocol. The application also interfaces with the BMC USB gadget device to pass HID events from the BMC to the host, allowing the user to interact with the host system.

Usage

Once the host is running and an appropriate HID gadget device is instantiated on the BMC, the application can be started with the following command: obmc-ikvm -v <video device path> -i <HID gadget device path>

For example:

obmc-ikvm -v /dev/video0 -i /dev/hidg0