Skip to content

Commit

Permalink
Blob stamping for vfio devices + DRPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopydood committed Feb 22, 2024
1 parent 6621765 commit 45fbc02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ def clear(): print("\n" * 150)
os.system("cp ./resources/ovmf/OVMF_VARS.fd ./ovmf/OVMF_VARS.fd")

if discordRPC == 1:
subprocess.Popen(["python","./scripts/drpc.py","--os",macOSVer])
if os.path.exists("./blobs/user/USR_VFIO_DEVICES.apb"):
vfioDevs = open("./blobs/user/USR_VFIO_DEVICES.apb")
vfioDevs = vfioDevs.read()
subprocess.Popen(["python","./scripts/drpc.py","--os",macOSVer,"--pt",vfioDevs])
else:
subprocess.Popen(["python","./scripts/drpc.py","--os",macOSVer])
if REQUIRES_SUDO == 1:
print(color.YELLOW+color.BOLD+"\n ⚠ "+color.END+color.BOLD+"SUPERUSER PRIVILEGES"+color.END+"\n This script uses physical device passthrough,\n and needs superuser priviledges to run.\n\n Press CTRL+C to cancel.\n"+color.END)
if discordRPC == 0:
Expand Down
3 changes: 3 additions & 0 deletions scripts/extras/vfio-passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ def autoAPSelect():

apFileM = apFileM.replace("VFIO_DEVICES="+str(currentAmount),"VFIO_DEVICES="+str(totalVD))

blob = open("./blobs/USR_VFIO_DEVICES.apb","w")
blob.write(totalVD)
blob.close()

apFileM = apFileM.replace("-device qxl-vga,vgamem_mb=128,vram_size_mb=128 ","#-device qxl-vga,vgamem_mb=128,vram_size_mb=128 # DISABLED BY VFIO-PCI PASSTHROUGH ASSISTANT")
apFileM = apFileM.replace("/OVMF_VARS.fd","/OVMF_VARS_PT.fd")
Expand Down

0 comments on commit 45fbc02

Please sign in to comment.