1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

add script to configure system for non-root access to FPGA

This commit is contained in:
Steffen Vogel 2018-01-30 19:15:45 +01:00
parent 3047f5bb7a
commit 4f86b98fdd

18
fpga/scripts/non_root.sh Normal file
View file

@ -0,0 +1,18 @@
#!/bin/bash
IOMMU_GROUP=24
PCI_BDF="0000:03:00.0"
modprobe vfio
modprobe vfio_pci
echo "10ee 7022" > /sys/bus/pci/drivers/vfio-pci/new_id
echo ${PCI_BDF} > /sys/bus/pci/drivers/vfio-pci/bind
groupadd -f fpga
usermod -G fpga -a svg
chgrp fpga /dev/vfio/${IOMMU_GROUP}
chmod g+rw /dev/vfio/${IOMMU_GROUP}