mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-29 15:44:07 +00:00
move enable_usb from /etc/functions to /etc/ash_functions so that usb keyboard can be enabled from init
Reminder: insmod is a bash script and will fail on legacy-flash boards (which should not enable USB_KEYBOARD anyway)
This commit is contained in:
parent
1617b6ccba
commit
429d8bbead
@ -85,3 +85,47 @@ combine_configs() {
|
||||
TRACE "Under /etc/functions:combine_configs"
|
||||
cat /etc/config* > /tmp/config
|
||||
}
|
||||
|
||||
enable_usb()
|
||||
{
|
||||
TRACE "Under /etc/functions:enable_usb"
|
||||
#insmod ehci_hcd prior of uhdc_hcd and ohci_hcd to suppress dmesg warning
|
||||
if ! lsmod | grep -q ehci_hcd; then
|
||||
insmod /lib/modules/ehci-hcd.ko \
|
||||
|| die "ehci_hcd: module load failed"
|
||||
fi
|
||||
if [ "$CONFIG_LINUX_USB_COMPANION_CONTROLLER" = y ]; then
|
||||
if ! lsmod | grep -q uhci_hcd; then
|
||||
insmod /lib/modules/uhci-hcd.ko \
|
||||
|| die "uhci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q ohci_hcd; then
|
||||
insmod /lib/modules/ohci-hcd.ko \
|
||||
|| die "ohci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q ohci_pci; then
|
||||
insmod /lib/modules/ohci-pci.ko \
|
||||
|| die "ohci_pci: module load failed"
|
||||
fi
|
||||
fi
|
||||
if ! lsmod | grep -q ehci_pci; then
|
||||
insmod /lib/modules/ehci-pci.ko \
|
||||
|| die "ehci_pci: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q xhci_hcd; then
|
||||
insmod /lib/modules/xhci-hcd.ko \
|
||||
|| die "xhci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q xhci_pci; then
|
||||
insmod /lib/modules/xhci-pci.ko \
|
||||
|| die "xhci_pci: module load failed"
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
if [ "$CONFIG_USB_KEYBOARD" = y ]; then
|
||||
if ! lsmod | grep -q usbhid; then
|
||||
insmod /lib/modules/usbhid.ko \
|
||||
|| die "usbhid: module load failed"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -81,51 +81,6 @@ confirm_totp()
|
||||
echo
|
||||
}
|
||||
|
||||
enable_usb()
|
||||
{
|
||||
TRACE "Under /etc/functions:enable_usb"
|
||||
#insmod ehci_hcd prior of uhdc_hcd and ohci_hcd to suppress dmesg warning
|
||||
if ! lsmod | grep -q ehci_hcd; then
|
||||
insmod /lib/modules/ehci-hcd.ko \
|
||||
|| die "ehci_hcd: module load failed"
|
||||
fi
|
||||
if [ "$CONFIG_LINUX_USB_COMPANION_CONTROLLER" = y ]; then
|
||||
if ! lsmod | grep -q uhci_hcd; then
|
||||
insmod /lib/modules/uhci-hcd.ko \
|
||||
|| die "uhci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q ohci_hcd; then
|
||||
insmod /lib/modules/ohci-hcd.ko \
|
||||
|| die "ohci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q ohci_pci; then
|
||||
insmod /lib/modules/ohci-pci.ko \
|
||||
|| die "ohci_pci: module load failed"
|
||||
fi
|
||||
fi
|
||||
if ! lsmod | grep -q ehci_pci; then
|
||||
insmod /lib/modules/ehci-pci.ko \
|
||||
|| die "ehci_pci: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q xhci_hcd; then
|
||||
insmod /lib/modules/xhci-hcd.ko \
|
||||
|| die "xhci_hcd: module load failed"
|
||||
fi
|
||||
if ! lsmod | grep -q xhci_pci; then
|
||||
insmod /lib/modules/xhci-pci.ko \
|
||||
|| die "xhci_pci: module load failed"
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
if [ "$CONFIG_USB_KEYBOARD" = y ]; then
|
||||
if ! lsmod | grep -q usbhid; then
|
||||
insmod /lib/modules/usbhid.ko \
|
||||
|| die "usbhid: module load failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
list_usb_storage()
|
||||
{
|
||||
TRACE "Under /etc/functions:list_usb_storage"
|
||||
|
Loading…
x
Reference in New Issue
Block a user