From 833e26225b20863cd91ee5df8efb112a2a36e3d0 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 27 Dec 2012 18:16:36 +0100 Subject: hooks: rename 'usbinput' to 'keyboard' and add more modules Make the hook a bit more generic by including non-usb keyboard drivers. This should mean that any keyboard will now work in the initramfs. In addition to fixing some uncommon setups requiring additional keyboard modules, this would allow us to no longer build in the atkbd module (and hence i8042) in our stock kernels, which will remove an ugly error message on boot for systems without the i8042 controller. Signed-off-by: Tom Gundersen --- install/keyboard | 31 +++++++++++++++++++++++++++++++ install/usbinput | 29 +---------------------------- mkinitcpio.conf | 2 +- 3 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 install/keyboard mode change 100644 => 120000 install/usbinput diff --git a/install/keyboard b/install/keyboard new file mode 100644 index 0000000..91a00e7 --- /dev/null +++ b/install/keyboard @@ -0,0 +1,31 @@ +#!/bin/bash + +build() { + local major minor + + add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host' + + # As of 3.5, modaliases seem to be exported for HID + # devices, so we can leverage autodetection. + IFS=.- read major minor _ <<<"$KERNELVERSION" + if (( major > 3 || (major == 3 && minor >= 5) )); then + add_checked_modules '/hid/hid' + else + add_all_modules '/hid/hid' + fi + + add_module 'usbhid' + + add_checked_modules '/input/keyboard' +} + +help() { + cat < 3 || (major == 3 && minor >= 5) )); then - add_checked_modules '/hid/hid' - else - add_all_modules '/hid/hid' - fi - - add_module 'usbhid' -} - -help() { - cat <