[openwrt/openwrt] x86: enable console keyboard
LEDE Commits
lede-commits at lists.infradead.org
Wed Aug 21 03:15:24 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cddda1d44db76d4d184bf6b6bb7d98a4b16e383a
commit cddda1d44db76d4d184bf6b6bb7d98a4b16e383a
Author: Mark Mentovai <mark at mentovai.com>
AuthorDate: Wed Jul 31 16:51:01 2024 -0400
x86: enable console keyboard
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 at mentovai.com>
Link: https://github.com/openwrt/openwrt/pull/16208
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/x86/64/config-6.6 | 5 +++++
target/linux/x86/generic/config-6.6 | 5 +++++
target/linux/x86/legacy/config-6.6 | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/target/linux/x86/64/config-6.6 b/target/linux/x86/64/config-6.6
index d5f86141b0..b443231120 100644
--- a/target/linux/x86/64/config-6.6
+++ b/target/linux/x86/64/config-6.6
@@ -255,7 +255,10 @@ CONFIG_HALTPOLL_CPUIDLE=y
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
CONFIG_HDMI=y
CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
CONFIG_HID_HYPERV_MOUSE=y
+CONFIG_HID_SUPPORT=y
CONFIG_HOTPLUG_CORE_SYNC=y
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
CONFIG_HOTPLUG_CORE_SYNC_FULL=y
@@ -540,6 +543,8 @@ CONFIG_TREE_SRCU=y
CONFIG_UCS2_STRING=y
CONFIG_UNACCEPTED_MEMORY=y
# CONFIG_UNWINDER_ORC is not set
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO_CMDLINE=y
# CONFIG_VIDEO_IPU3_CIO2 is not set
diff --git a/target/linux/x86/generic/config-6.6 b/target/linux/x86/generic/config-6.6
index 4c0a052c7b..6729f0e9cd 100644
--- a/target/linux/x86/generic/config-6.6
+++ b/target/linux/x86/generic/config-6.6
@@ -182,7 +182,10 @@ CONFIG_GUP_GET_PXX_LOW_HIGH=y
CONFIG_HALTPOLL_CPUIDLE=y
CONFIG_HDMI=y
CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
CONFIG_HID_HYPERV_MOUSE=y
+CONFIG_HID_SUPPORT=y
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
CONFIG_HOTPLUG_CORE_SYNC=y
@@ -449,6 +452,8 @@ CONFIG_TREE_RCU=y
CONFIG_TREE_SRCU=y
# CONFIG_UCLAMP_TASK is not set
CONFIG_UCS2_STRING=y
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
CONFIG_USB_STORAGE=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_VHOST=y
diff --git a/target/linux/x86/legacy/config-6.6 b/target/linux/x86/legacy/config-6.6
index 323f20dba6..d5c4a55e5e 100644
--- a/target/linux/x86/legacy/config-6.6
+++ b/target/linux/x86/legacy/config-6.6
@@ -133,6 +133,9 @@ CONFIG_FUNCTION_PADDING_CFI=0
# CONFIG_GIGABYTE_WMI is not set
CONFIG_GPIO_ACPI=y
CONFIG_HDMI=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HID_SUPPORT=y
# CONFIG_HIGHMEM4G is not set
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
@@ -253,6 +256,8 @@ CONFIG_SYNC_FILE=y
# CONFIG_THINKPAD_LMI is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_WMI is not set
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO_CMDLINE=y
# CONFIG_VIDEO_IPU3_CIO2 is not set
More information about the lede-commits
mailing list