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 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 <teg@jklm.no> --- install/input | 30 ++++++++++++++++++++++++++++++ install/usbinput | 29 +---------------------------- 2 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 install/input mode change 100644 => 120000 install/usbinput diff --git a/install/input b/install/input new file mode 100644 index 0000000..4ecc5a9 --- /dev/null +++ b/install/input @@ -0,0 +1,30 @@ +#!/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 <<HELPEOF +This hook loads the necessary modules for input devices. Detection +will take place at runtime. To minimize the modules in the image, add the +autodetect hook too. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/install/usbinput b/install/usbinput deleted file mode 100644 index a292345..0000000 --- a/install/usbinput +++ /dev/null @@ -1,28 +0,0 @@ -#!/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' -} - -help() { - cat <<HELPEOF -This hook loads the necessary modules for an usb input device. Detection -will take place at runtime. To minimize the modules in the image, add the -autodetect hook too. -HELPEOF -} - -# vim: set ft=sh ts=4 sw=4 et: diff --git a/install/usbinput b/install/usbinput new file mode 120000 index 0000000..770eab4 --- /dev/null +++ b/install/usbinput @@ -0,0 +1 @@ +input \ No newline at end of file -- 1.8.0.2