mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-25 21:59:32 +00:00
cddda1d44d
The kernel support necessary to use a console keyboard was not built on x86, affecting real and virtual machines alike. The console keyboard would function properly in GRUB, but would not work at all once Linux booted. It appeared that the console was intended to work because console video appeared on the display, including prompts to enter failsafe or select the debug log level from the keyboard, and the prompt to "Press Enter to activate this console", but there was no way to provide input to it. All keystrokes were ignored. This enables several kernel configuration options to enable HID and USB HID support (CONFIG_HID, CONFIG_HID_SUPPORT, CONFIG_HID_GENERIC, and CONFIG_USB_HID), making the keyboard functional. For alignment with armsr, CONFIG_USB_HIDDEV is also added, although not strictly necessary for keyboard support. Note that this change also causes CONFIG_HID_HYPERV_MOUSE to be enabled for x86/64 and x86/generic: it was already set in these subarchitectures' kernel configurations, but was ineffective due to CONFIG_HID being absent. The omission of keyboard support on x86 may not have been widely noticed because USB HID is not used on production OpenWrt x86 machines such as pc-engines,apu2 which only have a serial console, or with the default x86 configuration used by scripts/qemustart, which uses -nographic and does not configure a virtual physical console but instead uses a serial console. This configuration change results in, for x86_64, +40kB in kernel.bin and just over +40kB in gzip-compressed "combined" images. This should not be a problem for the non-storage-constrained x86 target. Until 2a86425de107, CONFIG_HID, CONFIG_USB_HID, and CONFIG_USB_HIDDEV were set in the target-level kernel configuration, and CONFIG_HID_GENERIC was set at the subtarget level. These are reintroduced strictly at the subtarget level by request. This applies to the 64, generic, and legacy subtargets, omitting geode. Fixes: https://github.com/openwrt/openwrt/issues/16157 Signed-off-by: Mark Mentovai <mark@mentovai.com> Link: https://github.com/openwrt/openwrt/pull/16208 Signed-off-by: Robert Marko <robimarko@gmail.com>