diff options
author | Tom Gundersen <teg@jklm.no> | 2012-12-27 18:16:36 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-12-28 01:32:13 +0100 |
commit | 833e26225b20863cd91ee5df8efb112a2a36e3d0 (patch) | |
tree | 907823a4538f087d0c48931587d91489c6db9cb6 | |
parent | 6be469d5f21309fe80d927d277d37a99db22b511 (diff) | |
download | mkinitcpio-833e26225b20863cd91ee5df8efb112a2a36e3d0.tar.gz mkinitcpio-833e26225b20863cd91ee5df8efb112a2a36e3d0.tar.xz |
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 <teg@jklm.no>
-rw-r--r-- | install/keyboard | 31 | ||||
l---------[-rw-r--r--] | install/usbinput | 29 | ||||
-rw-r--r-- | mkinitcpio.conf | 2 |
3 files changed, 33 insertions, 29 deletions
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 <<HELPEOF +This hook loads the necessary modules for keyboard devices. As a side-effect +modules for some non-keyboard input devices might be added to, but this should +not be relied on. 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 index a292345..fbfe724 100644..120000 --- a/install/usbinput +++ b/install/usbinput @@ -1,28 +1 @@ -#!/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: +keyboard
\ No newline at end of file diff --git a/mkinitcpio.conf b/mkinitcpio.conf index 1047011..7616809 100644 --- a/mkinitcpio.conf +++ b/mkinitcpio.conf @@ -49,7 +49,7 @@ FILES="" # ## NOTE: If you have /usr on a separate partition, you MUST include the # usr, fsck and shutdown hooks. -HOOKS="base udev autodetect modconf block filesystems usbinput fsck" +HOOKS="base udev autodetect modconf block filesystems keyboard fsck" # COMPRESSION # Use this to compress the initramfs image. By default, gzip compression |