groundwork for generating configs

This commit is contained in:
HikariKnight 2022-02-27 00:10:21 +01:00
parent 50e97c7aa2
commit 3b6f09ab59
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
5 changed files with 203 additions and 4 deletions

39
lib/get_USB_CTL.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/bash
function get_USB_CTL () {
printf "THIS STEP IS OPTIONAL IF YOU DO NOT PLAN TO USE ANYTHING OTHER THAN MOUSE AND KEYBOARD!
The USB Controller you want to passthrough cannot be in a group with other devices.
Passing through a whole USB Controller (a set of hardwired 1-4 usb ports on the motherboard)
is only needed if you intend to use other devices than just mouse and keyboard with the VFIO enabled VM.
"
echo "#------------------------------------------#"
exec "$SCRIPTDIR/utils/ls-iommu" | grep -i "usb controller" | cut -d " " -f 1-4,8-
echo "#------------------------------------------#"
printf "
Press q to quit
"
read -p "Which group number do you want to check?: " IOMMU_GROUP
case "${IOMMU_GROUP}" in
[1-9]*)
exec "$SCRIPTDIR/lib/get_USB_CTL_GROUP.sh" $IOMMU_GROUP
;;
[Qq]*)
echo ""
;;
*)
echo ""
;;
esac
}
function main () {
SCRIPTDIR=$(dirname `which $0`)
SCRIPTDIR="$SCRIPTDIR/.."
clear
get_USB_CTL
}
main