Silfalion / Iphone_docker_osx_passthrough

The scripts in here allows one to passthrough a usb controller consequently an iphone to a VM created through Docker OSX, this should work but was tested with other OSs
48 stars 10 forks source link

BIND_PID is not exported by vfio-bind.sh #2

Open y0va opened 6 months ago

y0va commented 6 months ago

Acording to the documentation, docker should be started with a commandline referencing the environment variable BIND_PID. But this is not set by the script. is this the PID of vfio?
How to get it manually?

y0va commented 6 months ago

Ok, I found it myself, it's just the Address of the USB HUB, following the script workingMacosVm_without_image.sh

root@fujiserv:~/Iphone_docker_osx_passthrough# echo $DRIVER_DATA 
0000:00:1a.0,ehci-pci
root@fujiserv:~/Iphone_docker_osx_passthrough# readarray -t array <<<"$DRIVER_DATA"
root@fujiserv:~/Iphone_docker_osx_passthrough# IFS="," read -r -a newArray <<<"${array[0]}"
root@fujiserv:~/Iphone_docker_osx_passthrough# BIND_PID="${newArray[0]/0000:/}"
root@fujiserv:~/Iphone_docker_osx_passthrough# echo $BIND_PID 
00:1a.0