mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
Merge branch 'companion-controller' of https://github.com/persmule/heads
This commit is contained in:
commit
082a4e28ee
2667
config/linux-x200.config
Normal file
2667
config/linux-x200.config
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Sign a valid directory of kexec params
|
# Sign a valid directory of kexec params
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
. /etc/config
|
||||||
. /etc/functions
|
. /etc/functions
|
||||||
|
|
||||||
rollback="n"
|
rollback="n"
|
||||||
|
@ -1,23 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Mount a USB device
|
# Mount a USB device
|
||||||
die() { echo >&2 "!!!!! $@"; exit 1; }
|
. /etc/functions
|
||||||
|
|
||||||
|
enable_usb
|
||||||
|
|
||||||
if ! lsmod | grep -q ehci_hcd; then
|
|
||||||
insmod /lib/modules/ehci-hcd.ko \
|
|
||||||
|| die "ehci_hcd: module load failed"
|
|
||||||
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 "ehci_hcd: module load failed"
|
|
||||||
fi
|
|
||||||
if ! lsmod | grep -q xhci_pci; then
|
|
||||||
insmod /lib/modules/xhci-pci.ko \
|
|
||||||
|| die "ehci_pci: module load failed"
|
|
||||||
fi
|
|
||||||
if ! lsmod | grep -q usb_storage; then
|
if ! lsmod | grep -q usb_storage; then
|
||||||
insmod /lib/modules/usb-storage.ko \
|
insmod /lib/modules/usb-storage.ko \
|
||||||
|| die "usb_storage: module load failed"
|
|| die "usb_storage: module load failed"
|
||||||
|
@ -68,6 +68,41 @@ confirm_totp()
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable_usb()
|
||||||
|
{
|
||||||
|
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_hcd; then
|
||||||
|
insmod /lib/modules/ehci-hcd.ko \
|
||||||
|
|| die "ehci_hcd: module load failed"
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
confirm_gpg_card()
|
confirm_gpg_card()
|
||||||
{
|
{
|
||||||
read \
|
read \
|
||||||
@ -84,23 +119,7 @@ confirm_gpg_card()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# setup the USB so we can reach the GPG card
|
# setup the USB so we can reach the GPG card
|
||||||
if ! lsmod | grep -q ehci_hcd; then
|
enable_usb
|
||||||
insmod /lib/modules/ehci-hcd.ko \
|
|
||||||
|| die "ehci_hcd: module load failed"
|
|
||||||
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 "ehci_hcd: module load failed"
|
|
||||||
fi
|
|
||||||
if ! lsmod | grep -q xhci_pci; then
|
|
||||||
insmod /lib/modules/xhci-pci.ko \
|
|
||||||
|| die "ehci_pci: module load failed"
|
|
||||||
sleep 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
gpg --card-status \
|
gpg --card-status \
|
||||||
|| die "gpg card read failed"
|
|| die "gpg card read failed"
|
||||||
|
@ -63,6 +63,10 @@ linux_modules-$(CONFIG_LINUX_MLX4) += drivers/net/ethernet/mellanox/mlx4/mlx4_co
|
|||||||
linux_modules-$(CONFIG_LINUX_MLX4) += drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
|
linux_modules-$(CONFIG_LINUX_MLX4) += drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
|
||||||
|
|
||||||
# USB modules for both types of controllers
|
# USB modules for both types of controllers
|
||||||
|
# older boards also need ohci and uhci
|
||||||
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/uhci-hcd.ko
|
||||||
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/ohci-hcd.ko
|
||||||
|
linux_modules-$(CONFIG_LINUX_USB_COMPANION_CONTROLLER) += drivers/usb/host/ohci-pci.ko
|
||||||
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-hcd.ko
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-hcd.ko
|
||||||
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-pci.ko
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/ehci-pci.ko
|
||||||
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-hcd.ko
|
linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-hcd.ko
|
||||||
|
Loading…
Reference in New Issue
Block a user