mirror of
https://github.com/h7x4/usbip-dkms-devcontainer-feature.git
synced 2025-07-07 21:12:53 +02:00
Disable usbip-vudc by default
This commit is contained in:
features/usbip-dkms
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "USBIP DKMS Module",
|
"name": "USBIP DKMS Module",
|
||||||
"id": "usbip-dkms",
|
"id": "usbip-dkms",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "DKMS module for USBIP",
|
"description": "DKMS module for USBIP",
|
||||||
|
|
||||||
"installsAfter": [
|
"installsAfter": [
|
||||||
@ -23,6 +23,11 @@
|
|||||||
"v6.4"
|
"v6.4"
|
||||||
],
|
],
|
||||||
"default": ""
|
"default": ""
|
||||||
|
},
|
||||||
|
"enableVudc": {
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ DEST_MODULE_LOCATION[1]="/kernel/drivers/usb/usbip"
|
|||||||
BUILT_MODULE_NAME[2]="usbip-host"
|
BUILT_MODULE_NAME[2]="usbip-host"
|
||||||
DEST_MODULE_LOCATION[2]="/kernel/drivers/usb/usbip"
|
DEST_MODULE_LOCATION[2]="/kernel/drivers/usb/usbip"
|
||||||
|
|
||||||
BUILT_MODULE_NAME[3]="usbip-vudc"
|
# BUILT_MODULE_NAME[3]="usbip-vudc"
|
||||||
DEST_MODULE_LOCATION[3]="/kernel/drivers/usb/usbip"
|
# DEST_MODULE_LOCATION[3]="/kernel/drivers/usb/usbip"
|
||||||
|
|
||||||
AUTOINSTALL="YES"
|
AUTOINSTALL="YES"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
KERNEL_VERSION="${KERNELVERSION:-}"
|
KERNEL_VERSION="${KERNELVERSION:-}"
|
||||||
|
ENABLE_VUDC="${ENABLEVUDC:-}"
|
||||||
|
|
||||||
set -euo
|
set -euo
|
||||||
|
|
||||||
@ -11,8 +12,8 @@ if [ -z "$KERNEL_VERSION" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt update
|
apt-get update
|
||||||
apt install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
dkms \
|
dkms \
|
||||||
git \
|
git \
|
||||||
@ -28,7 +29,11 @@ sed -i "s|#MODULE_VERSION#|${KERNEL_VERSION}|" "/usr/src/usbip-${KERNEL_VERSION}
|
|||||||
export CONFIG_USBIP_CORE=m
|
export CONFIG_USBIP_CORE=m
|
||||||
export CONFIG_VHCI_HCD=m
|
export CONFIG_VHCI_HCD=m
|
||||||
export CONFIG_USBIP_HOST=m
|
export CONFIG_USBIP_HOST=m
|
||||||
export CONFIG_USBIP_VUDC=m
|
|
||||||
|
if [ -n "$ENABLE_VUDC" ]; then
|
||||||
|
export CONFIG_USBIP_VUDC=m
|
||||||
|
sed -i "s|# ||g" "/usr/src/usbip-${KERNEL_VERSION}/dkms.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
dkms add -m usbip -v "${KERNEL_VERSION}"
|
dkms add -m usbip -v "${KERNEL_VERSION}"
|
||||||
dkms build -m usbip -v "${KERNEL_VERSION}"
|
dkms build -m usbip -v "${KERNEL_VERSION}"
|
||||||
|
Reference in New Issue
Block a user