Update to get vbios rom location by asking ls-iommu for it

This commit is contained in:
HikariKnight 2023-03-16 17:50:59 +01:00
parent 1a91d2a27b
commit 596ec53026
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
2 changed files with 2 additions and 6 deletions

View file

@ -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" ];

View file

@ -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.