From 596ec5302624a384cc6c74a990c696c0b9b2885c Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:50:59 +0100 Subject: [PATCH] Update to get vbios rom location by asking ls-iommu for it --- lib/get_GPU_GROUP.sh | 6 +----- lib/get_GPU_ROM.sh | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/get_GPU_GROUP.sh b/lib/get_GPU_GROUP.sh index 784913d..dbbd586 100755 --- a/lib/get_GPU_GROUP.sh +++ b/lib/get_GPU_GROUP.sh @@ -42,12 +42,8 @@ To return to the previous page just press ENTER without typing in anything. echo "GPU_PCI_ID=($PCI_ID) USB_CTL_ID=()" > "$SCRIPTDIR/$QUICKEMU/qemu-vfio_vars.conf" - # Get the rom PCI_ID - local ROM_PCI_ID - ROM_PCI_ID=$("$SCRIPTDIR/utils/ls-iommu" -g | grep -iP "group\s+$1:" | cut -d " " -f 5) - # Get the GPU ROM - "$SCRIPTDIR/lib/get_GPU_ROM.sh" "$ROM_PCI_ID" + "$SCRIPTDIR/lib/get_GPU_ROM.sh" "$1" # Start setting up modules if [ -d "/etc/initramfs-tools" ]; diff --git a/lib/get_GPU_ROM.sh b/lib/get_GPU_ROM.sh index 0105559..9b7efc1 100755 --- a/lib/get_GPU_ROM.sh +++ b/lib/get_GPU_ROM.sh @@ -6,7 +6,7 @@ function get_GPU_ROM () { # Get the config paths source "$SCRIPTDIR/lib/paths.sh" - VBIOS_PATH=$(find /sys/devices -name rom | grep "$1") + VBIOS_PATH=$("$SCRIPTDIR/utils/ls-iommu" -g -i "$1" --rom) echo "We will now attempt to dump the vbios of your selected GPU. Passing a VBIOS rom to the card used for passthrough is required for some cards, but not all. Some cards also requires you to patch your VBIOS romfile, check online if this is neccessary for your card.