首先修改/etc/modprobe.conf
找到:
alias usb-controller usb-ohci
alias usb-controller1 ehci-hcd
把他改为:
alias usb-controller ohci-hcd
alias usb-controller1 ehci-hcd
修改/etc/rc.sysinit
2.6内核默认将HID编进内核,这样将不会生成hid,usbmouse,和usbkbd模块,也不会有USBMOUSE,USBKEYBOARD选项
Device Drivers--->
USB support--->
<*>USB Human Interface Device(full HID)support
[*]HID layer inout support
[ ]/dev/hiddev raw HID device support
#///////////////////////////////////////////////////////////////////
#MOdify by June.Hn.
#2.6内核中很难找到usbdevfs
#odl:
#if [ $usb = 1 -a ! -f /proc/bus/usb/devices ]; then
# action $"Mounting USB filesystem: " mount -t usbdevfs
usbdevfs /proc/bus/usb
#fi
if [ "$KERNELVER" = "2.4" ]; then
if [ $usb = 1 -a ! -f /proc/bus/usb/devices ]; then
action $"Mounting USB filesystem: " mount -t usbdevfs usbdevfs
/proc/bus/usb
fi
fi
#end
#///////////////////////////////////////////////////////////////
needusbstorage=
if [ $usb = "1" ]; then
#//////////////////////////////////////////////////////////////
#Add by June.Hn.
if [ "$KERNELVER" = "2.6" ]; then
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08"
/sys/bus/usb/devices 2>/dev/null`
#LC_ALL=C grep 'hid' /sys/bus/usb/drivers || action
$"Initializing USB HID interface: " modprobe usbhid 2>
/dev/null
else
#end
#///////////////////////////////////////////////////////////////
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08"
/proc/bus/usb/devices 2>/dev/null`
LC_ALL=C grep 'hid' /proc/bus/usb/drivers || action
$"Initializing USB HID interface: " modprobe hid 2> /dev/null
fi
#//////////////////////////////////////////////////////////
#Modify by June.Hn.
#2.6内核中被编进内核,无需加载
#old:
#action $"Initializing USB keyboard: " modprobe keybdev 2>
/dev/null
#action $"Initializing USB mouse: " modprobe mousedev 2>
/dev/null
#new:
if [ "$KERNELVER" = "2.4" ]; then
action $"Initializing USB keyboard: " modprobe keybdev 2>
/dev/null
action $"Initializing USB mouse: " modprobe mousedev 2>
/dev/null
fi
#end
#/////////////////////////////////////////////////////////////////
fi
假如把USB Human Interface Device(full
HID)support编译成模块,有USBMOUSE,USBKEYBOARD选项
Device Drivers--->
USB support--->
USB Human Interface Device(full HID)support
[*]HID layer inout support
[ ]/dev/hiddev raw HID device support
USB HID Boot Protocol drivers--->
[*]USB HIDBP Keyboard(simple Boot)support
[*]USB HIDBP Mouse(simple Boot)support
假如您要把他作为模块,请参考snoopyxp大哥的<<2.4->2.6内核升级指南>>中的这一段
# ----- KERNEL 2.6.x support ------
# This is for compatibility between kernel-2.4.x and
kernel-2.6.x
#
UNAME=`uname -r`
KERNELVER=$
if [ "$KERNELVER" = "2.6" ]; then
#
# This is kernel-2.6.x
#
KSYMS=/proc/kallsyms
KEYBDEV_NAME=usbkbd
MOUSEDEV_NAME=usbmouse
else
#
# This is kernel-2.4.x
#
KSYMS=/proc/ksyms
KEYBDEV_NAME=keybdev
MOUSEDEV_NAME=mousedev
fi
然后,
把/etc/rc.sysinit脚本文档中出现keybdev和mousedev的地方都改为$KEYBDEV_NAME和$MOUSEDEV_NAME.
把脚本文档/etc/rc.sysinit中的needusbstorage部分从:
needusbstorage=
if [ $usb = "1" ]; then
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08"
/proc/bus/usb/devices 2>/dev/null`
LC_ALL=C grep 'hid' /proc/bus/usb/drivers || action
$"Initializing USB HID interface: " modprobe hid 2> /dev/null
action $"Initializing USB keyboard: " modprobe $KEYBDEV_NAME
2> /dev/null
action $"Initializing USB mouse: " modprobe $MOUSEDEV_NAME 2>
/dev/null
fi
改为:
needusbstorage=
if [ $usb = "1" ]; then
if [ "$KERNELVER" = "2.6" ]; then
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08"
/sys/bus/usb/devices 2>/dev/null`
LC_ALL=C grep 'hid' /sys/bus/usb/drivers || action
$"Initializing USB HID interface: " modprobe usbhid 2>
/dev/null
else
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08"
/proc/bus/usb/devices 2>/dev/null`
LC_ALL=C grep 'hid' /proc/bus/usb/drivers || action
$"Initializing USB HID interface: " modprobe hid 2> /dev/null
fi
action $"Initializing USB keyboard: " modprobe $KEYBDEV_NAME
2> /dev/null
action $"Initializing USB mouse: " modprobe $MOUSEDEV_NAME 2>
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




