mirror of
https://github.com/h7x4/usbip-dkms-devcontainer-feature.git
synced 2025-12-24 02:20:21 +01:00
Add linux-tools, and add option to modprobe modules
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "USBIP DKMS Module",
|
||||
"id": "usbip-dkms",
|
||||
"version": "0.2.3",
|
||||
"version": "0.3.0",
|
||||
"description": "DKMS module for USBIP",
|
||||
|
||||
"installsAfter": [
|
||||
@@ -28,6 +28,11 @@
|
||||
"description": "Enable Virtual USB Device Controller (VUDC) support. This requires the kernel to have CONFIG_USB_GADGET enabled, which linux-azure (GitHub Codespaces) does not have.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"autoModprobe": {
|
||||
"description": "Automatically modprobe all modules after installation.",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
KERNEL_VERSION="${KERNELVERSION:-}"
|
||||
ENABLE_VUDC="${ENABLEVUDC:-false}"
|
||||
AUTO_MODPROBE="${AUTOMODPROBE:-true}"
|
||||
|
||||
set -euo
|
||||
|
||||
@@ -18,9 +19,10 @@ apt-get install -y --no-install-recommends \
|
||||
dkms \
|
||||
git \
|
||||
"linux-headers-$(uname -r)" \
|
||||
"linux-tools-$(uname -r)" \
|
||||
subversion
|
||||
|
||||
# Trick to be able to only download the usbip folder
|
||||
# This is a trick to download only the usbip directory, and not the entire project.
|
||||
svn export "https://github.com/torvalds/linux/tags/${KERNEL_VERSION}/drivers/usb/usbip" "/usr/src/usbip-${KERNEL_VERSION}"
|
||||
install -m644 dkms.conf "/usr/src/usbip-${KERNEL_VERSION}/dkms.conf"
|
||||
|
||||
@@ -45,3 +47,9 @@ if ! dkms build -m usbip -v "${KERNEL_VERSION}"; then
|
||||
fi
|
||||
|
||||
dkms install -m usbip -v "${KERNEL_VERSION}"
|
||||
|
||||
if [ "$AUTO_MODPROBE" != "false" ]; then
|
||||
modprobe usbip-core
|
||||
modprobe usbip-host
|
||||
modprobe vhci-hcd
|
||||
fi
|
||||
Reference in New Issue
Block a user