initial commit to prepare for rewrite into golang for actual use
This commit is contained in:
parent
0d4f63f371
commit
5da1a88296
21 changed files with 129 additions and 1 deletions
41
old_bash_version/lib/get_GPU.sh
Executable file
41
old_bash_version/lib/get_GPU.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
function get_GPU () {
|
||||
clear
|
||||
printf "These are your graphic cards, they have to be in separate groups.
|
||||
The graphic card you want to passthrough cannot be in a group with other devices that
|
||||
does not belong to itself. Both cards must also have unique hardware ids [xxxx:yyyy]!:
|
||||
|
||||
"
|
||||
echo "#------------------------------------------#"
|
||||
"$SCRIPTDIR/utils/ls-iommu" -g -F name,device_id,optional_revision
|
||||
echo "#------------------------------------------#"
|
||||
|
||||
printf "
|
||||
Press q to quit
|
||||
"
|
||||
|
||||
read -r -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||
|
||||
case "${IOMMU_GROUP}" in
|
||||
[1-9]*)
|
||||
exec "$SCRIPTDIR/lib/get_GPU_GROUP.sh" "$IOMMU_GROUP"
|
||||
;;
|
||||
[Qq]*)
|
||||
echo "Aborted, your setup is incomplete!
|
||||
DO NOT use any of the files from $SCRIPTDIR/config !
|
||||
"
|
||||
;;
|
||||
*)
|
||||
exec "$SCRIPTDIR/lib/get_GPU.sh"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_GPU
|
||||
}
|
||||
|
||||
main
|
Loading…
Add table
Add a link
Reference in a new issue