qemu: Enable the mouse

Enable the mouse when running on QEMU, for ARM and x86.

This requires 'usb start' on x86. For ARM, the mouse does not work,
perhaps related to the fact that the display does not work either.

Series-to: concept
Series-cc: heinrich
Cover-letter:
mouse: Provide some support for using a mouse
This series resurects some old code that was never submitted, related to
using Nuklear with U-Boot.

It includes:
- a very simple mouse uclass
- sandbox mouse driver
- USB mouse driver, useful on x86
- EFI mouse driver, useful when running as an EFI app
- script updates to use the above with build-qemu and build-efi

It also includes a few small patches for sandbox, tests and membuf

Not everything is fully working at present:
- Mouse works on x86 QEMU (after 'usb start') but not ARM
- Mouse works on real hardware with EFI, but not with build-efi script
- Mouse times out with 'usb start', even though it does actually work

More work will be needed to tidy up these remaining issues.
END

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-09-14 14:39:38 -06:00
parent 2666becf93
commit a1e9f4782b

View File

@@ -104,7 +104,7 @@ config TWL4030_INPUT
config MOUSE
bool "Support for mice and other pointing devices"
depends on INPUT
default y if SANDBOX || EFI_APP
default y if SANDBOX || EFI_APP || MACH_QEMU
help
This allows U-Boot to access mouse input, typically needed for
graphics boot menus and the like. The driver can provide mouse
@@ -113,6 +113,7 @@ config MOUSE
config USB_MOUSE
bool "USB mouse support"
default y if MACH_QEMU
help
This enables using a USB mouse to control a feature in U-Boot,
typically a boot menu. The driver uses the USB boot interface of