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
On Thu, Dec 27, 2012 at 1:55 AM, Tom Gundersen teg@jklm.no wrote:
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.
This is what I have in mind fwiw: https://bugs.archlinux.org/task/27555.
-t
On Thu, Dec 27, 2012 at 01:55:44AM +0100, Tom Gundersen wrote:
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.
Does atkbd have modaliases? There seems to be aliases for stuff in drivers/input/serio/* and other keyboard drivers in drivers/input/keyboard/*, but I see no evidence that atkbd can be autoloaded.
Signed-off-by: Tom Gundersen teg@jklm.no
install/input | 30 ++++++++++++++++++++++++++++++
'input' seems like too generic a name, since we aren't adding drivers for things like analog joysticks or mice, but at the same time, we're adding a bunch of usb HID stuff that might be used for just that. I'm okay with the the name 'input', as I don't have any better ideas.
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
Maybe change the verbiage here to note that this hook is aimed at providing drivers for a keyboard (as we generally take anything else added as a side effect).
+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
On Thu, Dec 27, 2012 at 2:44 AM, Dave Reisner d@falconindy.com wrote:
Does atkbd have modaliases? There seems to be aliases for stuff in drivers/input/serio/* and other keyboard drivers in drivers/input/keyboard/*, but I see no evidence that atkbd can be autoloaded.
I haven't actually tried it (as I don't have the controller), however, it looks like it should work to me:
% modinfo atkbd filename: /lib/modules/3.8.0-rc1-TEG/kernel/drivers/input/keyboard/atkbd.ko license: GPL description: AT and PS/2 keyboard driver author: Vojtech Pavlik vojtech@suse.cz srcversion: 88F58DCA130FB37430C00C5 alias: serio:ty02pr22id*ex* alias: serio:ty06pr*id*ex* alias: serio:ty01pr*id*ex*
'input' seems like too generic a name, since we aren't adding drivers for things like analog joysticks or mice, but at the same time, we're adding a bunch of usb HID stuff that might be used for just that. I'm okay with the the name 'input', as I don't have any better ideas.
We could call it 'keyboard' as whatever joystick/mouse/... drivers are not used anyway in the initramfs, and we don't include any of the non-hid, non-keyboard modules.
+help() {
- cat <<HELPEOF
+This hook loads the necessary modules for input devices. Detection
Maybe change the verbiage here to note that this hook is aimed at providing drivers for a keyboard (as we generally take anything else added as a side effect).
I'll rephrase and rename to 'keyboard', you can rename back to 'input' if you prefer.
-t
On Dec 27, 2012 12:09 PM, "Tom Gundersen" teg@jklm.no wrote:
On Thu, Dec 27, 2012 at 2:44 AM, Dave Reisner d@falconindy.com wrote:
Does atkbd have modaliases? There seems to be aliases for stuff in drivers/input/serio/* and other keyboard drivers in drivers/input/keyboard/*, but I see no evidence that atkbd can be autoloaded.
I haven't actually tried it (as I don't have the controller), however, it looks like it should work to me:
% modinfo atkbd filename: /lib/modules/3.8.0-rc1-TEG/kernel/drivers/input/keyboard/atkbd.ko license: GPL description: AT and PS/2 keyboard driver author: Vojtech Pavlik vojtech@suse.cz srcversion: 88F58DCA130FB37430C00C5 alias: serio:ty02pr22id*ex* alias: serio:ty06pr*id*ex* alias: serio:ty01pr*id*ex*
Good enough for me. Thanks for checking.
'input' seems like too generic a name, since we aren't adding drivers for things like analog joysticks or mice, but at the same time, we're adding a bunch of usb HID stuff that might be used for just that. I'm okay with the the name 'input', as I don't have any better ideas.
We could call it 'keyboard' as whatever joystick/mouse/... drivers are not used anyway in the initramfs, and we don't include any of the non-hid, non-keyboard modules.
+help() {
- cat <<HELPEOF
+This hook loads the necessary modules for input devices. Detection
Maybe change the verbiage here to note that this hook is aimed at providing drivers for a keyboard (as we generally take anything else added as a side effect).
I'll rephrase and rename to 'keyboard', you can rename back to 'input' if you prefer.
Keyboard sounds fine.
-t
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 ---
v2: rename to 'keyboard' and improve the help message.
install/keyboard | 31 +++++++++++++++++++++++++++++++ install/usbinput | 29 +---------------------------- 2 files changed, 32 insertions(+), 28 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 <<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 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..fbfe724 --- /dev/null +++ b/install/usbinput @@ -0,0 +1 @@ +keyboard \ No newline at end of file
On Dec 27, 2012 12:16 PM, "Tom Gundersen" teg@jklm.no wrote:
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
v2: rename to 'keyboard' and improve the help message.
install/keyboard | 31 +++++++++++++++++++++++++++++++ install/usbinput | 29 +----------------------------
Thanks. I guess the default config needs updating too, but I'll take care of that.
2 files changed, 32 insertions(+), 28 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 <<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 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..fbfe724 --- /dev/null +++ b/install/usbinput @@ -0,0 +1 @@ +keyboard \ No newline at end of file -- 1.8.0.2
On Thu, Dec 27, 2012 at 6:36 PM, Dave Reisner d@falconindy.com wrote:
I guess the default config needs updating too, but I'll take care of that.
Thanks.
-t
arch-projects@lists.archlinux.org